Re: Compressed Textures

"Mike C. Fletcher" <[email protected]> Tue, 30 Sep 2014 15:15:50 -0400
Newsgroups gmane.comp.python.opengl.user
Message-ID <[email protected]>
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


------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net