Original Post
I''m working on an MDI OpenGL viewer and I got troubles when I am trying to add texturing to the objects I display. Actually, it seems that I need to load the texture I want to use in the OnPaint method, which means that each time I repaint the window, the texture is reloaded, which is computationally heavy and I hope avoidable.
When I try to load the texture in the constructor of my window (just like in NeHe''s tutorial''s initGL() method) and to bind it in my onPaint() method (just like in NeHe''s DrawGLScene() method)no texturing is performed. On the other hand, when I load and bind the texture in the onPaint() method, the texturing works perfectly.
Does anyone have any suggestion to fix this??
Thanks.