Click here to Skip to main content
15,887,304 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have DDS textures (DXT1, DXT3, DXT5) in a memory buffer. I want to convert these to QImages. The textures are in main memory not in the graphics card memory. I have searched Qt's documentation extensively and believe this can't be done with one simple function. It can be done by writing the buffer to a temporary file, and then loading from that, but that is very undesirable in my application. My application has an OpenGL context that can be used, but I don't know how to proceed.

What I have tried:

The most promising result of my research has been to use a QOpenGLFrameBufferObject. This has a .toImage() member function. However, my OpenGL knowledge is not sufficient to draw the texture to the frame buffer object.
Posted
Updated 6-Jan-18 19:44pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900