|
From: Peter E. <pe...@ei...> - 2008-10-20 12:58:20
|
Hello everyone,
I have set up Chromium (CVS version) on Windows with a simple
Tilesort/Cave-like configuration, and auto-startup is working as well
using $HOME/.crconfigs and crfaker.dll renamed to opengl32.dll. This
works fine with the application rendering into the windows created by
crserver. The original GLUT window stays empty, though.
My question now is, how can I create two OpenGL contexts in order to
render into the original GLUT Window as well? Without Chromium, I
managed to create two GLUT windows and rendering into them. But when
using the opengl32.dll-faker approach, all rendering seems to end up in
Chromium. I also tried the 'match_window_count' option.
Or do I need to go about this differently by not using the faker but by
linking to crfaker.dll explicitly and usinsg crWindowCreate() etc.? In a
second attempt, I tried this:
main()
{
glutInit(...)
glutInitDisplayMode(...)
crContext = crCreateContext_ptr(...)
crWindow = crWindowCreate_ptr(...)
glutWindow = glutCreateWindow(...)
glutDisplayFunc(renderCallback)
glutReshapeFunc(reshapeCallback)
}
And within the rendering callback:
{
renderGLUTScene();
glutSwapBuffers();
crMakeCurrent(crWindow, crContext);
renderCRScene();
crSwapBuffers(crWindow, crContext);
}
The GLUT window works this way, but the Chromium Windows don't seem to
SWAP since they show only garbage, glClear seems to have no effect (they
do refresh their contents, though). I hope synchronizing GLUT and
Chromium rendering like this is ok, as well.
Any ideas?
Peter
|