norbert Posted December 9, 2011 Share Posted December 9, 2011 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 Quote Link to comment Share on other sites More sharing options...
Canardia Posted December 9, 2011 Share Posted December 9, 2011 DrawImage(GetColorBuffer:TTexture(Self.Buffer), Self.posX, Self.posY+Self.height, Self.width, -Self.height) Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Rick Posted December 9, 2011 Share Posted December 9, 2011 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. Quote Link to comment Share on other sites More sharing options...
norbert Posted December 9, 2011 Author Share Posted December 9, 2011 Hi Rick, thank you, That's exactly what I mean. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.