VBO + DisplayLists

I’m using OpenTk to make a quick prototype and am having a general OpenGL problem. I load an image into a heightmap using the image to create triangle vertices as well as using the image as a texture for those vertices. Both the texture and the vertices are loaded into a VBO. Everything looks great when I render only my VBO but if I render a grid plane or cube bounding box around the VBO as a Display List the display list colors are very dark. The VBO colors look fine but the DL is just too dark. Upon exiting when I’m cleaning up my memory momentarily the DLs are colored perfectly and then the app quits. :slight_smile: BTW - I have no lighting in my app, just uses defaults.

So my question is, is there some voodoo i need to perform in order to have VBOs play nice with DLs? Or are they incompatible.


My guess is that you changed some state that the DL depends on.

Thanks. What it ended up being, thanks to Fiddler in the OpenTk forums, was I needed to disable texturing before drawing my display lists and then enable texturing before drawing my VBOs.

Sounds like exactly what you’re suggesting too. I just didn’t realize that texturing would affect Display Lists that way.

Thanks again,

Every state is kept until asked to change.
Your display list should contains glDisable(GL_TEXTURE_2D) if no texture is wanted.