Jump to content

Borderless Window


Michael_J
 Share

Recommended Posts

I know of the methods to add title bars and what not, but I don't BELIEVE there is a way to create a border-less window. I have many users that like to use windowed mode, and prefer to not have the border (and I've seen this done in many games for this reason).

 

Thanks...

--"There is no spoon"

Link to comment
Share on other sites

Just don't pick a style that includes a titlebar.

 

example code:

window = Window:Create("borderless window", 0,0,400,300,window.Center)

context = Context:Create(window)

world = World:Create()

camera = Camera:Create()

camera:Move(0,0,-3)

light = DirectionalLight:Create()

light:SetRotation(35,35,0)

model = Model:Box()

model:SetColor(1.0,0.5,0.0)

 

while window:KeyDown(Key.Escape)==false do

if window:Closed() then break end

 

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

Time:Update()

world:Update()

world:Render()

context:Sync(true)

end

 

Note that the style 'window.Center' begins with a capital 'W' - for some reason the forum always makes this lowercase...

  • Upvote 1

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...