Comments (6)
The dll file associated with sdl2_image was copied and the texture was successfully loaded. But the controls do not look right.
from gwork.
The dll file associated with sdl2_image was copied and the texture was successfully loaded.
The first image looks like it didn't find the skin texture, so I think think the default colour is red.
But the controls do not look right.
Second image shows a (potential) scissoring/clipping bug in SDL2. See #18.
If you have the latest SDL2 and latest Gwork (gwork branch) then this should be fixed and you should no longer see this problem.
from gwork.
@billyquith Thank you for answer. I am using the latest SDL2 (2.0.5) and the latest GWork. I'll check it again.
from gwork.
void SDL2::StartClip()
{
return; //not clip
const Gwk::Rect &rect = ClipRegion();
int w, h;
SDL_GetRendererOutputSize(SDL_GetRenderer(m_window), &w, &h);
// Something wrong with clip rectangles in SDL2?
// https://bugzilla.libsdl.org/show_bug.cgi?id=2700
// => clip.y = screenHieght - clip.y - clip.h;
const SDL_Rect clip = { rect.x, h - rect.y - rect.h, rect.w, rect.h };
SDL_RenderSetClipRect(m_renderer, &clip);
}
void SDL2::EndClip()
{
return; //not clip
SDL_RenderSetClipRect(m_renderer, 0);
}
The source of the GWork I am using is the latest version. After temporarily blocking the clip processing by processing the return from StartClip and EndClip, I have confirmed that it works almost as close to normal. However, you can see that clipping is not working properly.
from gwork.
void SDL2::StartClip()
{
const Gwk::Rect &rect = ClipRegion();
const SDL_Rect clip = { rect.x, rect.y, rect.w,rect.h };
//const Gwk::Rect &rect = ClipRegion();
//int w, h;
//SDL_GetRendererOutputSize(SDL_GetRenderer(m_window), &w, &h);
//// Something wrong with clip rectangles in SDL2?
//// https://bugzilla.libsdl.org/show_bug.cgi?id=2700
//// => clip.y = screenHieght - clip.y - clip.h;
//const SDL_Rect clip = { rect.x, h - rect.y - rect.h, rect.w, rect.h };
SDL_RenderSetClipRect(m_renderer, &clip);
}
I went back to the previous revision of the issue #18 and found that it works fine. It seems to have fixed a bug related to SDL_RenderSetClipRect in the latest version of SDL2 2.0.5.
from gwork.
Thanks for reporting this. It does indeed appear to not happen any more. I put in a test for versions of SDL2 pre 2.0.5.
from gwork.
Related Issues (20)
- Created a Discord server for anyone that wants to chat on GWorK
- Segfault when clicking on ImagePanel in GworkAllegro5Sample HOT 2
- CacheToTexture Never Updates Cached Textures? HOT 1
- Refactor colour picker HOT 1
- Baking FreeType Into Gwork? HOT 12
- Reduce compiler coverage in tests
- "LARGE_INTEGER" and "QueryPerformanceCounter" problem HOT 2
- Can't build OpenGL sample with MinGW HOT 1
- Can't use GWork as cmake `subdirectory`. HOT 1
- Fix OpenGL Core for OSX HOT 2
- OpenGL* renderer: UTF-8 multi-byte symbols are not rendering HOT 17
- GLFW input handler is now working with GLFW3 HOT 1
- Resource management refactoring HOT 12
- Add WYSIWYG editor
- Support multiple renderers
- Add Font Module
- Investigate Gwk::Utility::Widen too slow HOT 1
- SFML2 Compile fails - Linux Mint 18.3 HOT 2
- Error: expression in new-declarator must have integral or enumeration type HOT 1
- OpenGL renderer broken HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gwork.