Skip to content

Backup and restore the viewport size when rendering sliders#108

Merged
itdelatrisu merged 2 commits intoitdelatrisu:masterfrom
Bigpet:viewport_fix
Jul 9, 2015
Merged

Backup and restore the viewport size when rendering sliders#108
itdelatrisu merged 2 commits intoitdelatrisu:masterfrom
Bigpet:viewport_fix

Conversation

@Bigpet
Copy link
Copy Markdown
Contributor

@Bigpet Bigpet commented Jul 8, 2015

Backup and restore the viewport size when rendering sliders. Needed because Slick tends to allocate offscreen buffers for itself only with power of two textures, so it will use another viewport when rendering to its own offscreen buffers.

Should fix #107

@Bigpet
Copy link
Copy Markdown
Contributor Author

Bigpet commented Jul 8, 2015

uh, wait one sec, there's a small error

…ecause Slick tends to allocate offscreen buffers for itself only with power of two textures, so it will use another viewport when rendering to its own offscreen buffers.
@Bigpet
Copy link
Copy Markdown
Contributor Author

Bigpet commented Jul 8, 2015

Alright, that should be it. I should really always do a complete diff before making a pull-request

@itdelatrisu
Copy link
Copy Markdown
Owner

Thanks! It doesn't seem to completely fix the issue for me, though:
ss

@Bigpet
Copy link
Copy Markdown
Contributor Author

Bigpet commented Jul 8, 2015

what's the beatmap?

@itdelatrisu
Copy link
Copy Markdown
Owner

221216 (hard)

@Bigpet
Copy link
Copy Markdown
Contributor Author

Bigpet commented Jul 8, 2015

I'm pretty sure you told me like twice already but what was your GPU again? Just asking because this doesn't happen with my Nvidia gpu, gonna try on my intel gpu next

@itdelatrisu
Copy link
Copy Markdown
Owner

Playing at 1440x900, if that matters.

@Bigpet
Copy link
Copy Markdown
Contributor Author

Bigpet commented Jul 8, 2015

Alright, I can reproduce it with my Intel card now. I'll take a look at it tomorrow

@itdelatrisu itdelatrisu added the bug label Jul 8, 2015
@itdelatrisu
Copy link
Copy Markdown
Owner

Awesome, thank you!

This doesn't actually make a difference in functionality.
The issue is that the flashlight mod uses Slicks FBO functions which
use the EXT version and Intel drivers generate the same FBO IDs twice
if the EXT and ARB versions are mixed.
@Bigpet
Copy link
Copy Markdown
Contributor Author

Bigpet commented Jul 9, 2015

Turns out the Intel drivers return the same FBO id twice if the ARB and EXT versions of framebuffers are used. And the flashlight mod calls Slick methods that use the EXT version, so I needed to use those (the only other alternatives would have been some ugly hacks).

This should remedy the situation and fix #107 in its entirety.

@itdelatrisu
Copy link
Copy Markdown
Owner

Perfect. Thanks again!

itdelatrisu added a commit that referenced this pull request Jul 9, 2015
Backup and restore the viewport size when rendering sliders
@itdelatrisu itdelatrisu merged commit 2be92ec into itdelatrisu:master Jul 9, 2015
itdelatrisu added a commit that referenced this pull request Jul 9, 2015
Set minimum OpenGL version for mmsliders to 3.0 (from 3.2) and removed an unused variable.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flashlight rendering problems with new slider style

2 participants