PDA

View Full Version : display list and vertex program



divide
01-31-2007, 11:29 AM
When I record a display list while using a vertex program, what happens ? Does the display list record the result of the vertex program or does it just record the coordinates I sent trough glvertex3f ?

If my vertex program cancel some vertex, what will happen to my display list ? Will it retains only the vertex which have passed the vertex program test ?

Thanks

Zengar
01-31-2007, 11:50 AM
From all I know the display list will just record the data you send to the pipeline before it actually enters the pipeline (display list stores OpenGL commands). So if you have a vertex shader enabled or not won't make any difference. Secondly, you cannot cancel vertices on the vertex program and there is no such thing in OpenGL as "vertex program test".

zeoverlord
01-31-2007, 11:54 AM
A display list basically only records the openGL commands as they are called by the program(in a compressed form), not what happens after that.

To record the transformed vertices you need to use a geometry buffer, it can output the vertices to a VBO instead of the rasteriser.

zeoverlord
01-31-2007, 11:59 AM
Originally posted by Zengar:
there is no such thing in OpenGL as "vertex program test". I think he means the various clipping and culling operations done to the polygons.
Though this takes place just before the rasterisation stage and can not be recorded even by the geometry buffer.

divide
01-31-2007, 01:22 PM
Thanks; I thought it was possible to discard vertex, my mistake.
I could try a workaround by setting the vertex I want to discard beyond the clipping range, but I'm afraid it will still be costy as I have plenty of theses ( I retain only 1 triangle out of 30, as a ratio), from a processing point of view and from a memory point of view, because even beyond the clipping range theses unrenderable triangles will still be recorded into VBO.