Not surprisingly, I’ve run into some more “trouble”.
I mentioned briefly quite a few posts back that I was suffering from some issues with alpha testing. Most notably so from it not working at all.
I dug a bit deeper into it and it seems like my OpenGL context somehow got the idea that GL_ALPHA_TEST is in fact deprecated and therefore completely unsupported.
I admit I’m not entirely sure as to why this happened just now, and why it seems to be local to my current project…

I don’t really know what to make of it.
At first I thought is was a driver bug, seeing as how it stopped working suddenly. But then I updated my drivers like 2 times without any notable effect so that possibility isn’t a factor. (+ my older projects still work and they use GL_ALPHA_TEST.)
Now I don’t know what to say. I can still alpha test in my shader, but I fear that it may suffer performance impacts. And it has
already with my “vegetation test” a few posts back.
Though to be completely honest it does seem like alpha testing may take a turn for a shader based approach in the future, if not already. I think that DirectX 10 and later perform alpha testing in shaders because they disabled the possibility to do so otherwise from DirectX 9.
Seems to be reasonable that modern OpenGL versions use something akin to this…

Or something like that, I don’t really know. It’s kind of a mind-effer…

Edit: And yes, my OpenGL context is backwards compatible so that’s not the problem here.

Edit #2: Alright. My friend confirmed that GL_ALPHA_TEST and its kin is in fact deprecated. So I’m sticking to my manual alpha testing. It’s good to know I’m not going insane. The moment I saw that glEnable(GL_ALPHA_TEST) generated GL_INVALID_ENUM and some other errors no matter what I tried, I was all but sure I’d gone of the deep end.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s