PDA

View Full Version : Read a strided dxt1 texture



gregkwaste
03-29-2014, 09:00 PM
I have a very simple piece of code that actually presents some raw data on the screen.

The problem is that the data i am attempting to read is propably strided.

So i need somehow to tell opengl to skip a number of bytes before proceeding to the next row.
From what i searched on the net so far i found out that what i ask for is :
glPixelStorei(GL_UNPACK_ROW_LENGTH,stride)

Which defaults with stride=0 and uses whatever not zero value as a byte pad

The problem is that it does not seem to apply. To be honest it does not even alter the image in any way... I am writing it above the glCompressedTexImage command, but whatever value i put on stride, the produced image is intact. Could it be because i am using a fragment shader in order to apply the texture to the quad?

1253