Guys
Based on some great advice gained here I am moving on at a pace and my app is going well…
I have a question concerning texture maps and display lists.
I pre-bulid various displaylists which contain scalar results normalized and texture mapped… I.e
glNewList 10, lstCompile
…glBegin bmTriangles
…glTexCoord2f 0.555, 0
…glVertex3f 0, 0, 0
…ETC x10000
…glEnd
glEndList
Note the texture value per vertex. This will be mapped to a texture array that will be modified in code so that the user can change colours etc
Now the question.
I also want to display the polygon edges via glPolygonOffset using a black outline and I would like to use the display list created.
Basically I can’t get it to work.
I define a black texture map but when I run my code it seems to work with either the original map or black map but not both.
In pseudo code this is what I want to do
- Display polygons in display list as filled using texture1 (fancy colours)
- Display polygons in display list as line boundaries using solid black texture (texture2)
- Render model to screen
This is the kind of thing I am doing (it doesn’t work)
glPushMatrix
…glBindTexture GL_TEXTURE_2D, bitmapImage(0, 0, 0)
…glPolygonMode faceFrontAndBack, pgmFILL
…glDisable glcPolygonOffsetFill
…glCallList 10
…glBindTexture GL_TEXTURE_2D, Black(0, 0, 0)
…glPolygonMode faceFrontAndBack, pgmLine
…glEnable glcPolygonOffsetFill
…glPolygonOffset 1, 1
…glCallList 10
glPopMatrix
Am I on the right line?
Or should I just build a copy of the display list without the textures to plot the outlines (seems way crude to have to copy the display list)
Many thanks as always
Julian