03-30-2017 12:46 AM
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 1280, 720, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
I would change the first GL_RGBA to GL_R32F (see doc), the 2nd to
GL_RED since it’s one channel and GL_UNSIGNED_BYTE to GL_FLOAT:
glTexImage2D(GL_TEXTURE_2D, 0, GL_R32F, 1280, 720, 0, GL_RED, GL_FLOAT, NULL);
https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glTexImage2D.xhtml
But GL_R32F is not available for me in the Oculus SDK. Can you give me any pointers? I've looked for the definition of it in the SDK, but I couldn't find it. Using GL_RGBA instead just gives me "interpret float as 4 uchar" noise.
03-30-2017 04:23 AM
The oculus sdk doesn't intercept opengl calls, you can render like normal for the most part. You need the oculus provided texture to render into, but you can make your own textures for other uses like normal.
04-03-2017 12:33 AM