Jump to content

Fullscreen in Lua


Rick
 Share

Recommended Posts

http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/window/windowcreate-r462

 

What are the constants for Lua for the last param? I tried just 1-5 (since the constants are just numbers I assume) and I can't seem to get fullscreen. I would get 2 values that wouldn't produce a border, which is one of the values, but they both were not taking up the fullscreen. Just what I defined as the resolution (say 1024x768) but my monitor is higher than that. I would expect it to convert my monitor to that resolution and then take up the entire screen. What am I missing?

Link to comment
Share on other sites

I don't think it crashes, I think it switches out of that window.

function App:Start()

--Create a window

self.window = Window:Create("",0,0,1024,768,Window.FullScreen)

self.context = Context:Create(self.window)

self.world = World:Create()

local camera = Camera:Create()

camera:Move(0,0,-3)

local light = DirectionalLight:Create()

light:SetRotation(35,35,0)

 

self.model = Model:Box()

self.model:SetColor(0.0,0.0,1.0)

 

return true

end

 

function App:Loop()

 

if self.window:Closed() or self.window:KeyHit(Key.Escape) then return false end

 

self.model:Turn(0,Time:GetSpeed(),0)

 

Time:Update()

self.world:Update()

self.world:Render()

self.context:Sync(false)

 

return true

end

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

It does that also, but yeah it crashes as well. I get the "ProgramName as stopped working" msg after a bunch of stuff gets loaded (I can see via the dos window that gets created). Without Window.FullScreen everything works.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...