Multiple Windows & Rendering Contexts

I am setting up two different rendering windows for a 2048x1556 textured image, using the same fragment shader for each. Same image processing, different sizes and locations.

The first window, which was current before all texture/drawing operations displays fine. When I call glMakeCurrent to switch to the other window, then call glBegin/glEnd to redraw the geometry, and swap buffers, I only get a white texture. OpenGL doesn’t seem to know about the current texture I have just set up.

Question: How much code do I have to re-write for the second window? Speed is critical as this is a realtime movie processing app.

I am grateful for your advice.

If you are creating a texture in window1(RC1) you cannot use it in window2(RC2) unless you are sharing contexts and initializing the same texture in both the rendering contexts.

Thank you. I found that I needed to use the same rendering context provided when creating the first window for all calls to glMakeCurrent, regardless of which window is being called.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.