Jump to content
Leadwerks Community

Recommended Posts

Posted

is there a comand to get the screen height, and width?

Tools:

AC3D | 3D Canvas(pro) | Texture Maker(pro) | Genetica(basic) | 3D World Studio | Fragmotion |Leadwerks 2 | XNA 4 | Visual Studio 2010 Professional | XCode 5.x |UU3D Pro

 

Programing & Scripting Languages:

C |C++ | C# | Obj-C | LUA | Javascript | PHP | Ruby

Posted

that gets the window height, width i need the screen height, width.

thanks for the sugestion, :D

Tools:

AC3D | 3D Canvas(pro) | Texture Maker(pro) | Genetica(basic) | 3D World Studio | Fragmotion |Leadwerks 2 | XNA 4 | Visual Studio 2010 Professional | XCode 5.x |UU3D Pro

 

Programing & Scripting Languages:

C |C++ | C# | Obj-C | LUA | Javascript | PHP | Ruby

Posted
screenwidth = GetSystemMetrics(0);	// returns the windows desktop width (works also in fullscreen mode)
				// cool trick: get screen width BEFORE switching to fullscreen mode, to
				// get fullscreen at native (=maximum, or user preferred) LCD resolution!
screenheight = GetSystemMetrics(1);	// returns the windows desktop height
windowwidth = GetWindowWidth();		// returns the LE window width
windowheight = GetWindowHeight();	// returns the LE window height
bufferwidth = GetBufferWidth(buf);	// returns the LE drawing buffer width (useful when you don't want
				// to draw on the whole window (speed up, cinemascope,
				// 2 player split screen, etc... ))
bufferheight = GetBufferHeight(buf);	// returns the LE drawing buffer height

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Posted

Tanks,Lumooja :)

that worked.

Tools:

AC3D | 3D Canvas(pro) | Texture Maker(pro) | Genetica(basic) | 3D World Studio | Fragmotion |Leadwerks 2 | XNA 4 | Visual Studio 2010 Professional | XCode 5.x |UU3D Pro

 

Programing & Scripting Languages:

C |C++ | C# | Obj-C | LUA | Javascript | PHP | Ruby

  • 2 weeks later...
Posted

always wondered that: lets say the users desktop resolution is 1440 x 900, but his game resolution is 800 x 600 fullscreen, how should you addept your game window to this?

 

Do you need to addept/stretch the buffersizes ?

Posted

This is actually an quite extensive topic, since there are so many possibilities and hardware specific limitations.

 

For example my GeForce 8800 GTS + Samsung 1680x1050 LCD combo can't display 16:9 ratio resolutions in fullscreen, but only 5:4 ratio and the native 1680x1050 16:10 ratio. I'm not sure if it's because of the GPU or the monitor, or both.

 

Games should allow a seperate fullscreen resolution and buffer resolution, so that the correct aspect ratio can used, and additionally also the option to use clip&pan or black borders when the monitor's ratio does not match with the game's ratio.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...