Original Post
🔒 Locked
Memory Maped texture
Advertisement
you've a pointer to the memory so just pass it to the opengl function to upload the texture data (assuming its a normal uncompressed bmp or DDS image, if its not you'll have to load it and convert it to a format OGL understands... as to if DevIL can do it, I've no idea).
You can try to use the low level read interface of libpng to decode part of the image, and upload that as a texture to OpenGL. But keep in mind that due to the way PNG compresses images (interlacing and row based compression), you cannot simply decode an arbitrary sub-rectangle. You must always process 8 entire rows at a time in order to get meaningful data.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement