Mutato Posted February 28, 2012 Posted February 28, 2012 Is it possible to get access to the pixelbuffer of a texture using the C(++) API. I looked through the documentation but couldn't find any method to allow me that. I read that it's possible in the Basic API but that isn't an option for me. Is there a possible workaround? My project really needs the capability to generate textures procedurally and it would really be a pity if I couldn't use the otherwise easy to use Leadwerks Engine for it. Thank you for your time and excuse my bad english. Quote
paramecij Posted February 28, 2012 Posted February 28, 2012 It's possible (I've done it multiple times), the workaround is by using OpenGL calls directly. (eg. glTexImage2D() etc,..) ..there is a good user written article on how to set-up and use OpenGL inside LE, so I'd start there first, and if you need further help with OpenGL just ask here Quote
Aily Posted February 28, 2012 Posted February 28, 2012 It's possible if set texture as render target, than draw on it by using shader, just like any shader drawing on screen. Here's my old demo test about it, it's in bMax, but i think it easy to convert to c++. Quote "Better" is big enemy of "good"
Mutato Posted February 28, 2012 Author Posted February 28, 2012 Thank you for your answers. The suggestion from Aily won't work for me unfortunately, but I will see into getting the OpenGL context and working directly with it. Not the elegant solution I would like to use, but I guess it can't be helped. Quote
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.