Ruki Posted October 16, 2012 Posted October 16, 2012 I'm currently porting over my existing game structure into Leadwerks engine and I'm having trouble on how to draw a flat 2D texture with specific UV coordinates. That is, rendering a specific part of a texture onto the screen. This is for my GUI elements. I can only find DrawImage, which seems to work, but will only draw the entire texture, and not specifically a portion of the texture. Should I be using some other function? Thank you DrawImage(texture, 50, 50, 200, 400); Do I have to use some OpenGL commands? I've previously achieved this in DX9 by drawing a trianglestrip and passing in the UV coordinates Sorry if this is a dumb question. Thank you Quote
Ruki Posted October 16, 2012 Author Posted October 16, 2012 I'm not sure If i made myself clear, I want to be able to draw seperate GUI elements that are stored in one texture. I know how to convert the x/y pixel coordinates into UV floats, I just don't know which function I should be using in Leadwerks to render it. Thanks Quote
macklebee Posted October 16, 2012 Posted October 16, 2012 see here and here. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel
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.