-
Notifications
You must be signed in to change notification settings - Fork 298
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
Minimal fix for list cropping problem #1274
Conversation
I was running Arch Linux with i3wm. |
|
And this reintroduces the exact bug that the code you're reverting fixes. I checked just to make sure. |
Hm that's strange, with your fix, the y coordinate for the scissor is backwards in my project but correct with your example, and vice versa without. |
Can you post the code of your project @0e4ef622? If we could get your example and mine into the same layout in the same example it could be useful. |
Here's a gist. You'll need to add an |
Thanks. I can reproduce your bug using this. |
I've created a repository which uses the code from @0e4ef622's gist to show both behaviors. |
@tdaffin I think you should move this stuff to a new issue. |
Yes, a new issue would probably be a good idea. However, once the [u32; 4] arrives down inside of the gl_graphics backend in the bind_scissor function in https://github.com/PistonDevelopers/opengl_graphics/blob/master/src/draw_state.rs and is passed to gl::Scissor then it is required to be defined relative to the lower left corner with x going left to right and y going up. See https://www.khronos.org/opengl/wiki/Scissor_Test ... At least that is what I think is going on... |
I've opened a new issue in opengl_graphics (PistonDevelopers/opengl_graphics#302) with a PR to fix it (PistonDevelopers/opengl_graphics#303) and posted a fixed version of the example that references both this PR and the one for conrod: https://github.com/tdaffin/conrod_bug/tree/fix_crop I suppose it will be necessary to bump the version number on opengl_graphics once that PR is merged so that this PR can require the fixed version of opengl_graphics. |
@0e4ef622 does the fix I made to piston2d-opengl_graphics make this this fix work for you? |
Yep, the fix works. Nice job narrowing down the bug farther than I did when I first found it. |
This may also fix #1166 |
Yes, I think this should be merged with an increment to the conrod crate version. |
FYI: A separate fix for #1166 will be required. |
OK thanks @tdaffin, I'm also interested in publishing a new version for the recent |
Includes the following changes: - A fix for list cropping in the piston backend. PistonDevelopers#1274 - Update winit and vulkano dependencies in the vulkano backend. PistonDevelopers#1278 - Improvements and fixes to vulkano backend glyph cache. PistonDevelopers#1270.
Thanks. I've just been testing the new version and all seems well... |
This fixes a problem where a scrollable canvas gets strangely cropped when inside another scrollable region.
This also applies to List, ListSelect and DropDownList.
To demonstrate the problem I've added a scrollable canvas and a List to the all_piston_window example on this commit:
tdaffin/conrod@b84ae50
I think that this will fix #955