Click to See Complete Forum and Search --> : Mix GDI & OpenGL in the same window?


ForeverNever
March 31st, 2009, 01:30 AM
Hello everyone,

I have a problem with mixing GDI & OpenGL in a same window.

I want to use the upper half of the window to draw GDI things, and the lower half to render OpenGL things. So, I use glViewport() to restrict the OpenGL to render in the lower half window.

I tried, but when the glClearColor() & eglSwapBuffer() done, the GDI half window is also clear by glClearColor()!!

I dont want to put the opengl rendering in a child window, also dont want to use Opengl to render the GDI things as texture.

Anybody has an idea?

calc0000
March 31st, 2009, 08:55 AM
I believe glScissor() is what you're looking for: http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/scissor.html