Dialog OpenGL + Fenetre OpenGL = Blocage.
Bonjour, Ca resume bien mon equation.
J'ai un projet VC6.0 du type SDI, avec une vue opengl.
Par une action du menu, j'ouvre un dialogue contenant une fenetre (CWnd) OpenGL.
Au lancement de l'exe la vue réagie à la sourie puis des qu'on ouvre le dialog, celui prend la main. Bien
Une fois le dialog fermé, la vue ne prend plus la main !!!!
Merci pour toute suggestion.
Les deux fentres sont initialisée de la meme facon :
Citation:
static PIXELFORMATDESCRIPTOR pfd =
{
sizeof(PIXELFORMATDESCRIPTOR),
1,
PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_GENERIC_ACCELERATED | PFD_DOUBLEBUFFER,
PFD_TYPE_RGBA,
32, // bit depth
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
16, // z-buffer depth
0, 0, 0, 0, 0, 0, 0,
};
// Get device context only once.
m_hdc = GetDC()->m_hDC;
// Pixel format.
m_nPixelFormat = ChoosePixelFormat(m_hdc, &pfd);
SetPixelFormat(m_hdc, m_nPixelFormat, &pfd);
// Create the OpenGL Rendering Context.
m_hrc = wglCreateContext(m_hdc);
wglMakeCurrent(m_hdc, m_hrc);
// Basic Setup:
//
// Set color to use when clearing the background.
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClearDepth(1.0f);
// Turn on backface culling
glFrontFace(GL_CCW);
glCullFace(GL_BACK);
// Turn on depth testing
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);