Re: [PyOpenGL-Users] Compressed Textures
Brought to you by:
mcfletch
|
From: Mike C. F. <mcf...@vr...> - 2014-09-30 19:15:58
|
On 14-09-27 01:02 PM, Alejandro Segovia wrote:
> Hey guys,
>
> I'm having trouble figuring out how the binding works for the S3TC
> compressed textures extension.
I don't see anywhere in your code where you are compressing the content
with s3tc_dxt5 compression. I believe (though I have no experience using
compressed textures), that if you're just trying to get the GL to use an
internal format with compression you need something like:
glTexImage2D(
GL_TEXTURE_2D, 0,
GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, # internal format...
ix, iy, 0,
GL_RGBA,
GL_UNSIGNED_BYTE,
image
)
so that the GL will do the compression of the data. Incidentally,
there's a bug in the handling of uploading compressed texture data
(refactoring error), a fix for that should go out in the next release.
Sample code here:
http://bazaar.launchpad.net/~mcfletch/openglcontext/trunk/view/head:/tests/nehe6_compressed.py
HTH,
Mike
--
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.com
|