PDA

View Full Version : ARB_vertex_program & multiple textures



A027298
01-08-2003, 01:06 AM
I'm using the above extension to do my own vertex stuff. But somehow I have a problem with my textures: If I am using my vertex program, on the final image is then only the texture with the first glBindTexture-call displayed correctly. All other objects, which have another texture are drawn in plain white.

Hmmm...I really don't know what I am doing wrong. In my vertex program I just take the input texture coord and write it to the output texture coord. I do not use any texture coordinate generation, so this should be enough.

But as mentioned above, only the first texture (the first glBindT.-call) is mapped correctly.

There should be something wrong with my vertex shader, because when I do not use my vertex program all stuff is rendered correctly.

Thanks!!!

BTW: The vertices and texture coordinates are stored in display lists.

[This message has been edited by A027298 (edited 01-08-2003).]

A027298
01-08-2003, 03:15 AM
ok, please disregard the posting above. It's been solved. :-)

Another question: Is it possible to use a vertex program to do for example only my own vertex transformations but let the rest like lighting calculations doing OpenGL?

Asgard
01-08-2003, 03:40 AM
Originally posted by A027298:
Is it possible to use a vertex program to do for example only my own vertex transformations but let the rest like lighting calculations doing OpenGL?

No, the entire transform & lighting stage of the pipeline is bypassed by a vertex program.

A027298
01-08-2003, 03:47 AM
Oh my god, if I only wanna do a slightly change in the pipeline, I have to do all the rest like lighting, fog, ...by myself. ;-(...Thats bad.

vincoof
01-08-2003, 05:07 AM
Is it possible to use a vertex program to do for example only my own vertex transformations but let the rest like lighting calculations doing OpenGL?
No, but the opposite thing is possible : you can let OpenGL perform vertex transformation, and you do what you want with lighting, texture coord, etc.

jwatte
01-08-2003, 10:46 AM
Note that the standard "diffuse plus specular plus fog" shader is actually listed in code in the ARB_vertex_program spec.

Korval
01-08-2003, 12:55 PM
No, but the opposite thing is possible : you can let OpenGL perform vertex transformation, and you do what you want with lighting, texture coord, etc.

That's only for NV_vertex_program(1_1), right? Or does the ARB one let you do it too?

vincoof
01-08-2003, 01:04 PM
In ARB spec you can find it under the chapter : 2.14.4.5.1, Position-Invariant Vertex Program Option