Login | Register 

glGetTexImage for TOPs

Send us your requests for enhancements (RFEs)

glGetTexImage for TOPs

Postby soriak » Fri Aug 03, 2018 7:46 am


after trying several workarounds to have a more or less performant (not freezing the network for too long) way of getting the channel values of a Float texture in TD (top.sample() / toptochop), I feel like there should/must be a better way to access the texture data within python for further manipulation on the cpu.

I stumbled upon this openGL feature https://www.khronos.org/opengl/wiki/GLAPI/glGetTexImage

could this provide a performance boost for these kind of situations?
and if so, could you expose this method(or a wrapper of it) as a method on TOPs?

thanks for considering..
Posts: 43
Joined: Thu Oct 01, 2015 9:23 am

Re: glGetTexImage for TOPs

Postby malcolm » Tue Aug 07, 2018 3:43 pm

We do download the texture data is the most performant way possible using GL. Texture downloads are just slow on current GPUs, and particularly slow on Geforce level cards.

On the Python side though things could potentially get faster if we had a way to get an entire image into a single Python object, rather than requiring multiple calls to top.sample(). We've been considering this for a while, as well as a way to get texture data into a OpenCV python object directly. So far this work hasn't been scheduled yet though. Thanks for your feedback!
User avatar
Posts: 4085
Joined: Tue Nov 13, 2007 1:11 am

Re: glGetTexImage for TOPs

Postby soriak » Wed Aug 08, 2018 6:19 am

I know this introduces some probably unwanted dependency, but a numpy array would probably be the fastest* anyways and that would already work for openCV if I'm not mistaken

*at least in the sense of further manipulation
Posts: 43
Joined: Thu Oct 01, 2015 9:23 am

Return to Wishlist and RFEs

Who is online

Users browsing this forum: No registered users and 3 guests