Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Varokas Panusuwan

OpenGL OpenGL & DirectDraw

This topic is 6923 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
DirectDraw is used for fullscreen in win32 - it''s also used in Q3A.

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

Share this post


Link to post
Share on other sites
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**

Share this post


Link to post
Share on other sites
Err... Excuse me
You mean lpSurface->GetDC(...); right?
or just GetDC(...);
Because if it is a DirectDraw Buffer
I must call lpSurface->ReleaseDC(..) before I
blit in to another surface.
As you can see I'm only the beginner


Edited by - Varokas Panusuwan on 5/6/00 2:44:23 AM

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!