Closed edward-san closed 8 years ago
I was worried about this; I did a little compatibility survey on #rust-gamedev and it seemed fine though. I bumped the OpenGL requirement to 3.3, but I guess I shouldn't have.
The reason I had to do this was because I'm using a BUFFER_TEXTURE
instead of a uniform array in static.vert
because glium doesn't support uniform arrays (they're slightly obsolete in a sense, thanks to uniform blocks and buffer textures).
I should try switching back to a uniform array with a glium workaround. I'll have a look tonight, sorry about the breakage! :(
Hi @edward-san ! Sorry it took me a while to get to this; I merged #64 which (since you mention your drivers support 3.1 core), should make it work on your machine again. Could you please try and let me know? Thanks!
Yes, it opens fine, but the rendering is now different from before. See this screenshot:
Is the problem that 'washed-out'-ness? Can't easily tell from the screenshot.
Would you mind checking out the old version (say git checkout 151b93a2d92c46aa8002edf69970dbe54c1f7637
) and send me a comparison screenshot, please?
Oops, sorry for that. Here:
Thanks a lot @edward-san ! Good news is I managed to reproduce this by using my laptop's nvidia card instead of the integrated one. I'll try to find what's happening; working theory: BUFFER_TEXTURE is used to just store numbers, but it is a texture so sRGB correction hits somewhere where it didn't used to, muddling everything up.
Is there a way to disable the shader stuff so it could be run on OpenGL 1.x?
This way it could even start working on GLES arm devices using the glshim wrapper.
@petevine In short, not easily: glium (the library used for OpenGL calls) doesn't support the fixed function pipeline and even if it did it's not clear that it would be easy to achieve all the effects needed using it. You're better off with a software renderer at that point. If you have some ideas or want to discuss this further, could you please file a different issue?
Regarding this actual issue. Having investigated more, it seems to be entirely unrelated to the buffer texture thing: even just clearing the screen looks different. The bug is triggered only by running the glium version with the nvidia card. Switching to the pre-glium version of the code or to the integrated gpu both fix it.
New theory: something in the initialisation of glium messes with gamma/brightness somehow.
OK so the issue was that if the device is SRGB capable, then glium assumes an SRGB framebuffer by default. I had to change everything to use SRGB everywhere and that seems to have fixed it on my nvidia card.
@edward-san Could you please check whether this works for you now?
@cristicbz yes, it fixed the issue.
Yay, great, thanks for filing and being patient!
Since commit 65dbb735249badebce7298ba97a8490d2bc20506 , when I try to run rs_doom, compiled with nightly rustc (
1.6.0-nightly (8ca0acc25 2015-10-28)
), I get this message:I'm on Ubuntu 14.04 x86_64, running on this laptop with the following specs:
CPU: Intel Core i3-2328M GPU: Intel Sandybridge Mobile
the mesa driver supports Opengl 3.0 and 3.1(core profile), if it might help.