OpenGL & DirectDraw
DirectDraw is used for fullscreen in win32 - it''s also used in Q3A.
colors = color depth in bits
You must create a window first and pass its HWND to DD_SetVideoMode().
Visit our homepage: www.rarebyte.de.st
GA
BOOL DD_SetVideoMode(HWND hwnd,int width,int height,int colors)
{
HRESULT ddrval;
ddrval=DirectDrawCreate(NULL,&dDraw,NULL);
if (ddrval!=DD_OK) return FALSE;
ddrval=dDraw->SetCooperativeLevel(hwnd,DDSCL_EXCLUSIVE/DDSCL_FULLSCREEN);
if (ddrval!=DD_OK) return FALSE;
ddrval=dDraw->SetDisplayMode(width, height, colors);
if (ddrval!=DD_OK ) return FALSE;
// Workaround for RIVA 128
ddrval=dDraw->SetCooperativeLevel(hwnd,(DDSCL_NORMAL/DDSCL_FULLSCREEN));
if (ddrval != DD_OK) return FALSE;
return TRUE;
}
colors = color depth in bits
You must create a window first and pass its HWND to DD_SetVideoMode().
Visit our homepage: www.rarebyte.de.st
GA
Then call GetDC(), SetPixelFormat(), wglCreateContext()... as usual.
Visit our homepage: www.rarebyte.de.st
GA
Visit our homepage: www.rarebyte.de.st
GA
Damn, that''s so much easier than I figured it would be...
Looks like I''ll have to try it sometime, unless OpenGL ( or OpenML rather ) comes up with a decent set of 2D functions!
#pragma DWIM // Do What I Mean!
~ Mad Keith ~
**I use Software Mode**
Looks like I''ll have to try it sometime, unless OpenGL ( or OpenML rather ) comes up with a decent set of 2D functions!
#pragma DWIM // Do What I Mean!
~ Mad Keith ~
**I use Software Mode**
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement