I'm porting an engine from D3D to OpenGL, but I have can't find in the docs if there's an equivalent for D3DTSS_TEXCOORDINDEX in OpenGL.
The idea is, I have one set of texture coordinates for the mesh, but I want to use it at two texture stages.
In D3D this can be done with:
pD3DDev->SetTextureStageState(1, D3DTSS_TEXCOORDINDEX, 0);
The workaround I can think of is using "glTexCoordPointer" for both stages with the same address, but it really complicates code.
(Setting up data sources and setting up render states are separated in the code, and for a good reason.)
And I don't know how well it will work out on the long run if I want to support VAOs.
Btw, D3DTSS_TEXCOORDINDEX can also enable TexGen. Looking at the docs I can't find the equivalent of D3DTSS_TCI_CAMERASPACENORMAL. Is there such a thing in OpenGL?
The idea is, I have one set of texture coordinates for the mesh, but I want to use it at two texture stages.
In D3D this can be done with:
pD3DDev->SetTextureStageState(1, D3DTSS_TEXCOORDINDEX, 0);
The workaround I can think of is using "glTexCoordPointer" for both stages with the same address, but it really complicates code.
(Setting up data sources and setting up render states are separated in the code, and for a good reason.)
And I don't know how well it will work out on the long run if I want to support VAOs.
Btw, D3DTSS_TEXCOORDINDEX can also enable TexGen. Looking at the docs I can't find the equivalent of D3DTSS_TCI_CAMERASPACENORMAL. Is there such a thing in OpenGL?