How to encapsulate textures into my display list?

Started by
0 comments, last by Gropex 22 years, 3 months ago
I use a struct to encapsulate the model loaded from the files: struct model { GLuint Texture[texture num]; GLuint NumberOfObjects; GLuint NumberOfTextures; pTextureList pTexture; pObjectList pObject; } In the display list compiling function,I add glBindTexture(....) in all those places that need diffent textures. But actually in the main program,after the whole initialization of the model struct,I called the display list and only got a model without textures.So how can I compile the display list with textures included?
Advertisement
Could it be that you forgot to call glEnable(GL_TEXTURE2D)?
Or texture coords?
I forgot to remove some comments a week ago, so that''s what came into my mind... Can''t figure out anything else at the moment

This topic is closed to new replies.

Advertisement