![]() Additionally, the window class attribute should not include the CS_PARENTDC style.Īfter reading that, I have to ask: Did you write the "other process" or have access to its source? If it is already rendering in opengl, according to msdn then you cannot set pixel format again, and according to SwapBuffers doc, you cannot swap buffers if there isnt a back buffer, only guessing here but perhaps the other process already has set the pixel format and didnt specify a back buffer? ![]() As a result, an OpenGL window should be created with the WS_CLIPCHILDREN and WS_CLIPSIBLINGS styles. Because of this, only device contexts retrieved for the client area of an OpenGL window are allowed to draw into the window. The wglCreateContext function creates a rendering context for drawing on the device in the selected pixel format of the device context.Īn OpenGL window has its own pixel format. You should select a pixel format in the device context before calling the wglCreateContext function. Once a window''s pixel format is set, it cannot be changed. ![]() An application can only set the pixel format of a window one time. Setting the pixel format of a window more than once can lead to significant complications for the Window Manager and for multithread applications, so it is not allowed. If hdc references a window, calling the SetPixelFormat function also changes the pixel format of the window.
0 Comments
Leave a Reply. |