PDA

View Full Version : Problem with texture objects on indexed lists



gummibaer
02-20-2012, 06:25 AM
I have a problem with multiple usage of texture objects. (I am working on an old FORTRAN application in a Windows environment so there is not much sense to post code here, I assume)

I have two windows in one thread, a 2D-window and a 3D-window. Starting my application the 2D-window is created. In the WM_CREATE clause I create a number of texture objects. They show fine, when I render them to GL_QUADS in WM_PAINT. Switching to the 3D- window hides the 2D-window. I build indexed vertex and texture coords lists in the WM_CREATE clause and want to use the same texture objects in this window as before. But they do not show, my objects remain white.

If I do not bind my texture objects but reload the textures by new calls to glTexImage2D within the WM_PAINT clause of this window the textures get rendered to my objects okay. So I guess I managed glMakeCurrent all right but the problem is in the texture objects. What to do ?
Any help would be appreciated.
Norbert

ZbuffeR
02-20-2012, 07:37 AM
Either use wglShareLists across the windows, or this :
http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=237114#Post2371 14

gummibaer
02-20-2012, 09:33 AM
AAaah. I was under the impression to do just what is detailed in this thread, but in fact I was handeling two different rendering contexts.

Thanks for the push.
May the way from your pub to your home allways go downhill.

Norbert