mettli / guichan

Automatically exported from code.google.com/p/guichan
Other
0 stars 0 forks source link

setTitleBarHeight(0) causes GL_INVALID_VALUE #93

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Creating a window with a 0 height title bar can lead to GL_INVALID_VALUE
errors.

What steps will reproduce the problem?
1. Create a custom window 
2. call setTitleBarHeight with value of zero
3. Show window

What is the expected behaviour? What happens instead?
Expected: Would expect to render a window with no title bar.
Actual: Sometimes a GL_INVALID_VALUE error occurs as glScissor in
pushClipArea (src/opengl/openglgraphics.cpp) is passed a negative value.

window.cpp's draw() methiod has the following line;

        graphics->pushClipArea(Rectangle(0, 0, getWidth(),
getTitleBarHeight() - 1));

If getTitleBarHeight is 0, then -1 is passed into this function. As a
result, the clip stack contains an invalid state.

What version of the product are you using? On what operating system? Which
back-end (SDL/Allegro/OpenGL/other)?

OS: Ubuntu-eee 8.04.1
Guichan 0.8.1 (tar.gz)
Using OpenGL/SDL application

Please provide any additional information below.

Original issue reported on code.google.com by si...@simongoodall.co.uk on 5 Oct 2008 at 4:40

GoogleCodeExporter commented 9 years ago
This has already been fixed by Olof in the development version, which does some 
more
validation in pushClipArea. Thanks for reporting!

Original comment by b.lindeijer on 6 Oct 2008 at 8:03