bfops
bfops

Reputation: 5678

Where are all the glTexParameters in OpenGL 3?

OpenGL 2 and 4 both define extensive sets of parameters for glTexParameter (https://www.opengl.org/sdk/docs/man2/xhtml/glTexParameter.xml). But only a few seem to exist in OpenGL 3 - where did they go? If they don't exist, what do I do instead of using, e.g. GL_TEXTURE_COMPARE_MODE, GL_TEXTURE_COMPARE_FUNC, GL_DEPTH_TEXTURE_MODE?

Upvotes: 1

Views: 376

Answers (1)

Reto Koradi
Reto Koradi

Reputation: 54572

GL_TEXTURE_COMPARE_MODE and GL_TEXTURE_COMPARE_FUNC are still there in OpenGL 3.x. You can find them on the man page here:

https://www.opengl.org/sdk/docs/man3/xhtml/glTexParameter.xml

GL_DEPTH_TEXTURE_MODE is not necessary anymore with the programmable pipeline. It controlled which color component(s) received the value when sampling a depth texture. Once you do the texture sampling in your own GLSL code, you have full control over how the sampled value is used.

The spec says about deprecating GL_DEPTH_TEXTURE_MODE:

Depth texture mode - DEPTH_TEXTURE_MODE. Section 3.8.16 is to be changed so that r is returned to texture samplers directly, and the OpenGL Shading Language 1.30 Specification is to be changed so that (r,r,r,1) is always returned from depth texture samplers in this case.

Upvotes: 4

Related Questions