win32-tweak opengl display method
This commit is contained in:
parent
533b810efe
commit
24647e57e0
|
@ -1511,12 +1511,13 @@ static void OGL_DoDisplay()
|
||||||
ScreenToClient(hwnd,(LPPOINT)&dr[i].right);
|
ScreenToClient(hwnd,(LPPOINT)&dr[i].right);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//clear entire area, for cases where the screen is maximized
|
//clear entire area, for cases where the screen is maximized
|
||||||
glClearColor(0,0,0,0);
|
glClearColor(0,0,0,0);
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
|
||||||
|
glDisable(GL_LIGHTING);
|
||||||
|
glDisable(GL_DEPTH_TEST);
|
||||||
|
|
||||||
//use clear+scissor for gap
|
//use clear+scissor for gap
|
||||||
if(video.screengap > 0)
|
if(video.screengap > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -75,15 +75,14 @@ bool initContext(HWND hwnd, HGLRC *hRC, HDC *hdc)
|
||||||
memset(&pfd,0, sizeof(PIXELFORMATDESCRIPTOR));
|
memset(&pfd,0, sizeof(PIXELFORMATDESCRIPTOR));
|
||||||
pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR);
|
pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR);
|
||||||
pfd.nVersion = 1;
|
pfd.nVersion = 1;
|
||||||
pfd.dwFlags = PFD_SUPPORT_OPENGL;
|
pfd.dwFlags = PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW;
|
||||||
pfd.iPixelType = PFD_TYPE_RGBA;
|
pfd.iPixelType = PFD_TYPE_RGBA;
|
||||||
pfd.cColorBits = 24;
|
pfd.cColorBits = 24;
|
||||||
pfd.cDepthBits = 24;
|
|
||||||
pfd.cAlphaBits = 8;
|
pfd.cAlphaBits = 8;
|
||||||
pfd.cStencilBits = 8;
|
|
||||||
pfd.iLayerType = PFD_MAIN_PLANE;
|
pfd.iLayerType = PFD_MAIN_PLANE;
|
||||||
PixelFormat = ChoosePixelFormat(oglDC, &pfd);
|
PixelFormat = ChoosePixelFormat(oglDC, &pfd);
|
||||||
SetPixelFormat(oglDC, PixelFormat, &pfd);
|
SetPixelFormat(oglDC, PixelFormat, &pfd);
|
||||||
|
printf("GL display context pixel format: %d\n",PixelFormat);
|
||||||
|
|
||||||
*hRC = wglCreateContext(oglDC);
|
*hRC = wglCreateContext(oglDC);
|
||||||
if (!hRC)
|
if (!hRC)
|
||||||
|
@ -123,8 +122,8 @@ static bool makeBootstrapContext()
|
||||||
pfd.dwFlags = PFD_SUPPORT_OPENGL;
|
pfd.dwFlags = PFD_SUPPORT_OPENGL;
|
||||||
pfd.iPixelType = PFD_TYPE_RGBA;
|
pfd.iPixelType = PFD_TYPE_RGBA;
|
||||||
pfd.cColorBits = 24;
|
pfd.cColorBits = 24;
|
||||||
pfd.cDepthBits = 24;
|
|
||||||
pfd.cAlphaBits = 8;
|
pfd.cAlphaBits = 8;
|
||||||
|
pfd.cDepthBits = 24;
|
||||||
pfd.cStencilBits = 8;
|
pfd.cStencilBits = 8;
|
||||||
pfd.iLayerType = PFD_MAIN_PLANE;
|
pfd.iLayerType = PFD_MAIN_PLANE;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue