Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Fullscreen Question

Author
Message
Cole Xemi
16
Years of Service
User Offline
Joined: 20th Aug 2008
Location:
Posted: 6th Sep 2008 20:40
When I set the size for the window, then maximize the window, everything gets stretched. I'm wondering if I could have my game full screen but have the the game in the middle of the window, 460 by 540. everything around it would be black. Attached Image is what this should look like. Done in paint

Attachments

Login to view attachments
RancidRat
16
Years of Service
User Offline
Joined: 19th Feb 2008
Location:
Posted: 7th Sep 2008 00:10 Edited at: 7th Sep 2008 00:14
for full screen you can use:

dbSetWindowOff ( );

and then maybe set the resolution:

e.g. dbSetDisplayMode ( 800 , 600 , 32 );

to crop the area, maybe you can look at this:

dbSetCameraView
This command will set the viewport of the camera. The viewport is the actual area on screen where all 3D is drawn. The default viewport area is the entire screen, but can be specified using this command.

Syntax
void dbSetCameraView ( float fLeft, float fTop, float fRight, float fBottom )
void dbSetCameraView ( int iCamera, float fLeft, float fTop, float fRight, float fBottom )
Cole Xemi
16
Years of Service
User Offline
Joined: 20th Aug 2008
Location:
Posted: 7th Sep 2008 01:04
What do "fLeft", "fTop", "fRight", and "fBottom" represent? I thought each point had an X/Y/Z not just one point? How do I get this function to work? Could someone please give an example.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 7th Sep 2008 01:58
Those 4 values specify the viewport, ie the rectangle where all the 3D rendering takes place. You only need 4 values to do this - the top left corner (fLeft, fTop) and the bottom right corner (fright, fBottom). These are also screen coordinates, not 3D points.

Cole Xemi
16
Years of Service
User Offline
Joined: 20th Aug 2008
Location:
Posted: 7th Sep 2008 03:21
This game i'm creating is 2D not 3D. So how would I make the viewport 480 by 540 in the center of the screen. I still do not understand this.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 7th Sep 2008 21:24
i guess that you should still do a test with the viewport command. even though you are using 2d, i think dgdk draws all 2d as 3d planes internally.

Login to post a reply

Server time is: 2024-09-30 05:27:34
Your offset time is: 2024-09-30 05:27:34