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

0.4.2 breaks sprite rendering on linux #28

Closed
growlercab opened this Issue Feb 24, 2015 · 5 comments

Comments

Projects
None yet
2 participants
@growlercab
Contributor

growlercab commented Feb 24, 2015

Hi,

I just tried 0.4.2 on linux and I get a black screen with no sprites rendered. When I downgrade back to Dgame 0.4.1 the app works again.

My test app is the DInvaders demo on the Dgame website on linux.

Thanks,
stew

@growlercab

This comment has been minimized.

Contributor

growlercab commented Feb 24, 2015

OK, I had a look and it was this commit: 952a39b

tip also fails to render: 3a84684

When I run the app with Dgame 0.4.2 it picks up OpenGL 3.0, as expected because Window asked for it

Derelict loaded GL version: GL30 (GL30), available GL version: 3.0.0 NVIDIA 346.35

Manually editing Window.d to remove the code which sets the context version attributes and the app works OK, picking up OpenGL 4.5:

Derelict loaded GL version: GL45 (GL45), available GL version: 4.5.0 NVIDIA 346.35

I'm not sure of a fix that won't break MAC but I'll look into it.

Cheers,
stew

@growlercab

This comment has been minimized.

Contributor

growlercab commented Feb 24, 2015

OK, I can get it to work if I comment out this line:

//SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS,SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG);

It seems for nVidia 346.35 Linux drivers setting this bit breaks rendering.

Is it possible to put a version(MAC_OSX){} block around this code? I'd rather be using GL 4.5.0 than 3.0 when possible.

I also found this from the OpenGL WIKI: https://www.opengl.org/wiki/Core_And_Compatibility_in_Contexts

Platform Issue (MacOSX): When MacOSX 10.7 introduced support for OpenGL beyond 2.1, they also introduced the core/compatibility dichotomy. However, they did not introduce support for the compatibility profile itself. Instead, MacOSX gives you a choice: core profile for versions 3.2 or higher, or just version 2.1. There is no way to get access to features after 2.1 and still access the Fixed Function Pipeline.
[snip]
Recommendation: You should never use the forward compatibility bit. It had a use for GL 3.0, but once 3.1 removed most of the stuff, it stopped having a use.

As I understand it that means MAC doesn't even support 3.0 or 3.1 so you need to set that version to 3.2 or 2.1. But I don't know MAC or this issue that well so I could be totally wrong :)

@growlercab

This comment has been minimized.

Contributor

growlercab commented Feb 24, 2015

PR: #29

@Dgame

This comment has been minimized.

Owner

Dgame commented Feb 24, 2015

Thanks for your effort. I will ask him, if that works on his PC. If so, I will gladly merge this PR. :)

@Dgame

This comment has been minimized.

Owner

Dgame commented Feb 25, 2015

Should be fixed now.

@Dgame Dgame closed this Feb 25, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment