Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clip rectangles in the command list can be inverted #25

Closed
hexateron opened this issue Aug 17, 2014 · 3 comments
Closed

Clip rectangles in the command list can be inverted #25

hexateron opened this issue Aug 17, 2014 · 3 comments

Comments

@hexateron
Copy link

In certain cases the clip rectangle in the command lists can have the max bounds (z,w) less than the min bounds (x,y). In the OpenGL example, expand the "Child regions" section and scroll the "With borders" all the way down. Then expand the "Widgets" section. The column separator for the "With border" widget is not clipped properly:

cliprectbug

In this case, a negative height is passed to glScissor, which causes an invalid value error (GL_INVALID_VALUE).

@ocornut
Copy link
Owner

ocornut commented Aug 17, 2014

Nice find! I didn't notice until now because the renderer I use doesn't use glScissor() and clip in another manner. That is to say, the application could skip the draw call - but the correct fix is that ImGui should clip the column itself earlier in the pipe. I'll work on that.

@ocornut
Copy link
Owner

ocornut commented Aug 17, 2014

I pushed a fix for the visual glitch.

Not 100% happy with the fix yet as the outer border for the window gets created into a vertex buffer and rendered, and then completely clipped. It should be discarded entirely so as not to waste a draw call for nothing. Will close the bug once it is fixed.

@ocornut
Copy link
Owner

ocornut commented Aug 17, 2014

Should be fixed now!

@ocornut ocornut closed this as completed Aug 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants