Jump to content

GUI Render inner Window


norbert
 Share

Recommended Posts

Hi,

i am start to wite a GUI Skin Engine.

 

I have a question about Render Elemements inside a Window.

 

My Idea is to create a seperate buffer for each Window.

The Window Buffer has the same size as the Window inner Part.

 

The Problem is that the

DrawImage(GetColorBuffer:TTexture(Self.Buffer), Self.posX,Self.posY, Self.width, Self.height)

Texture are flipped.

 

Or someone has an idea for a better method, Pixmaps ?

 

Gruß

Norbert

post-2073-0-69084200-1323426829_thumb.jpg

Link to comment
Share on other sites

I think this plays into my question of SetViewport. I think that will clip any drawing after it to the rectangle you pass to it. Go to the Lua code assets and look for Josh's GUI. Then look at the control.lua and inside DrawKids he uses something like SetViewport(Vec4(self.gx, self.gy, self.width, self.height)) and then draws the control. When he's done he calls it passing null which must reset it to the entire screen again.

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...