Search the Community
Showing results for tags 'resolution'.
Found 3 results
This is a simple script that will let you get the desktops current resolution. It has not been tested in linux. It creates a hidden window, Maximizes it, and gets the window size. That's it. It returns a Vec2(). DO NOT USE IF THE PROGRAM IS ALREADY FULLSCREEN. It will cause you some annoyances. function GetDesktopResolution() --Vec2() -- get current desktop resolution ; Super quick and dirty method, works on windows dont know about linux local launchertestwindow = Window:Create(System.AppName,0,0,1024,768,Window.Tool) launchertestwindow:Maximize() local desktopres = Vec2(launchertestwindow:GetWidth(),launchertestwindow:GetHeight()) launchertestwindow:Release() return desktopres end
I noticed that just recently (4.4) the engine supports terrains as big as 8192x8192 if you Set exterrain=1 in the Leadwerks.cfg Awesome! Im just curious if this affects the terrain detail? Does it simply double the scale of the terrain and therefore reduce the detail by half, or does the resolution remain the same? Also, I read that the engine has not supported terrain shadows since about LE2.5, is this true? Not having terrain shadows is kind of a deal breaker for me, is there any chance this will return in the future? Thank you!
Hey all, I've just ran through all the forum posts about resolutions and everything and none of them seem to mention something that context:GetWidth and context:GetHeight don't do which is take into account the resolution at which the player is playing the game at. Here's an example of what I'm talking about: --Battery begin local battL =math.floor((context:GetWidth()))/2 - 775 local battY =math.floor((context:GetHeight()))/2 + 425 local battX =math.floor((context:GetWidth()))/2 - 800 local battery_percent = self.battery_level / self.battery_max_level --calculate the percentage of battery power remaining context:SetColor( 1 - battery_percent, battery_percent, 0, 1) --as the battery dies the red component increases while the green decreases context:DrawRect( battX, battY, battL * battery_percent, 20) --rectangle width is dependent on the percentage of battery remaining. Wider with more power. --Battery end This is the post render part of the script I use for the flashlight bar. Here's how it looks in my native 1920x1080 display: And here's how it looks in the native leadwerks display 1024x768 See the difference? The flashlight bar doesn't show up and the interaction text is way too close to the middle of the screen, so my question is, is there an easy way to take the player's resolution and dynamically change the draw functions so they fit the screen no matter the resolution used?