EvilNoodle Posted November 29, 2009 Share Posted November 29, 2009 Hello all, A while ago when I was working with the DarkGDK from "The Game Creators" I started building a fairly flexible event based GUI system which I am planning to port to Leadwerks. The GDK version used sprites to render simple controls on top of the 3D content which gave them the ability to be made transparent and rotated etc. I have started porting to Leadwerks using the 2D draw commands as a starting point but I can see some problems with continuing this approach... For example The 2D commands work and work well but at the moment I am not seeing any obvious way to make content drawn with them transparent. Do any of you guys know how I can draw 2D content (or 3D that looks like 2D) to the screen for a GUI where I can set transparency on the components? Ideally I would like to be able to treat GUI components like any other entity - materials etc. What I want to do as a starting point is render an image loaded from file to the screen on top of all other content using the following arguments... xPos = 0.25 (25% of the displayable screen from the left) yPos = 0.25 (25% of the displayable screen from the top) width = 0.5 (50% of the displayable screen) height = 0.5 (50% of the displayable screen) alpha = 0.5 (50% transparent) Resulting in an image drawn with 50% transparency exactly half the size of the display and perfectly centred. Thanks EvilNoodle Quote Link to comment Share on other sites More sharing options...
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.