I have to render to 4 different Windows in my programm! So I create a HGLRC for each Window.
If I had to render in the first Window I call
If I had to render in the second Window I call
and so on…
That works very well but every time I call
wglMakeCurrent(); I loose my textures!
I need the textures only in the first Window! So what can I do?
Try to share your textures between rendering contexts (if i remember well), or better, share one RC between windows… (less resources used, much faster rendering)
Are you passing the same DC every time? The textures should always be there for your first window in that case.
Look up wglShareLists on http://msdn.microsoft.com/ for the solution to this problem.
thanks for your answers!
“share one RC between windows…” Yes that would be the best Way but how?
// Render to first Window (no problems, all textures are OK)
// try to render to second window (no results)
The hRC was created for the first window’s dc and it works only with the first window’s dc!
But not with the dc of the second or third Window.
I hope someone can help me.
excuse my english.
You have to release to rc from the first windows dc before you can use it for the next window.
Release like this:-
I dont know why but that doesn’t work.
I dont get eny results in the other Windows, only in the first Window!
How can I Share only my textures between RC’s using wglShareLists(); Without creating Display Lists for all my Polygons?