View Full Version : GL_RGBD

10-25-2005, 07:41 AM
How to make the texture with internal format RGBD?
In order to execute similary code:


glCopyTexImage2D (GL_TEXTURE_2D, 0, GL_RGB16, ...);
glCopyTexImage2D (GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT16, ...);

This is don't work.

10-25-2005, 09:04 AM
There's no such thing as a single texture with color and depth information. They need to be two separate textures (perhaps of the same size).

10-25-2005, 10:07 AM
Thanks, interestingly on D3D it is possible?

10-25-2005, 10:09 AM
Is it a question ? If so, it's not a DX forum :)

10-25-2005, 10:27 AM
You could just use a RGBA16 texture and a simple fragment shader that writes the Alpha value do depth and replaces the alpha value with 1.


10-25-2005, 12:39 PM
I'am had jump over these (similar) procedures.
In general it is clear. Thanks.

10-25-2005, 02:47 PM
Originally posted by Racoon:
Thanks, interestingly on D3D it is possible?Maybe in a IDirect3DSurface9, but not with a IDirect3DTexture9.

A surface in D3D is kind of (just a little) like a FBO (Frame Buffer Object) in GL. It can contain color info, depth, etc. So maybe you would be interested in using FBOs. :) Although an FBO can contain multiple color attachments whereas a d3d surface can't (as far as I know).

10-25-2005, 10:01 PM
Ok, but the FBO is like are primary buffers in this sense.

Zulfiqar Malik
10-26-2005, 12:56 AM
[OFF-TOPIC] D3D does not support 16-bit floating point color and depth values in the same surface and/or texture. Even if some third party software does it, it'll be doing it in software.

10-26-2005, 06:13 AM
Originally posted by Racoon:
Ok, but the FBO is like are primary buffers in this sense.Yes, you render to them. Use them for render to texture (RTT). They are simple enough to use.

To everyone else, I'm sure D3D is wonderdul, but how is this relevant?

Zulfiqar Malik
10-26-2005, 06:27 AM
It was a bit relevant in this particular case (particularly since the author seems to have used D3D) and it can be quite relevant some other times too, and if need be, i don't see any crime in making comparisons between OpenGL and D3D on this particular forum (or elsewhere).
Sometimes features in OpenGL specifications (especially recently) are "inspired" from D3D and explicit references are given in some specs (and/or research papers by nVidia and ATI).
Nobody is discussing D3D over here, its just some feature set comparison, and its always good to know your "enemy".

<speculation> oh god, here comes a flame war ;) </speculation>