I trying to use the FBO by Android OpenGLES 2.0
I can render to a color texture then render to the screen
now I want to render to a depth texture! but I didnt found the attr name GL_DEPTH_TEXTURE_MODE. is it not support in opengles?
Asked
Active
Viewed 549 times
0

Nicol Bolas
- 449,505
- 63
- 781
- 982
1 Answers
4
GL_DEPTH_TEXTURE_MODE
has nothing to do with rendering to a depth texture. That's old fixed-function stuff from desktop OpenGL 2.1. Rendering to a depth texture only requires creating a texture with a depth internal format, and then attaching it to the GL_DEPTH_ATTACHMENT
of an FBO.

Nicol Bolas
- 449,505
- 63
- 781
- 982
-
Is there a list of what is not "modern" OpenGL and what is? There are so many things that I don't know and I hate to go on a wild goose chase just because I didn't know that that API was fixed function... – John Leidegren Aug 30 '16 at 18:25
-
1@JohnLeidegren: Generally speaking, any [OpenGL learning materials that use core profile OpenGL](https://www.opengl.org/wiki/Getting_Started#Tutorials_and_How_To_Guides) or OpenGL ES 2.0 will tell you that up-front. So just avoid the ones that don't say what version of OpenGL they're using. As for a list, you can always use the [OpenGL reference pages](https://www.opengl.org/sdk/docs/man/) or [GL Wiki](https://www.opengl.org/wiki/Main_Page) to know what's core and what is not. – Nicol Bolas Aug 30 '16 at 19:16
-
...and here I was just thinking what exactly is the meaning of the term "core". Clearly this is the answer to my question. – John Leidegren Aug 31 '16 at 09:53