Quantcast
Viewing all articles
Browse latest Browse all 40524

[RPI] ofImage allocating double the space than needed?

I'm not sure about the memory but if you just need the texture but not the pixels, you can use:

ofLoadImage(...)

for example:

ofTexture myTex;
....
ofLoadImage(myTex, "mypicture.jpg");

this will load the image directly into the gpu and bypass storing the pixels on the cpu.

likewise, if you just need the pixels and not the texture, you can use ofLoadImage( ... ) to load a file into an ofPixels object.


Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>