OpenGL压缩纹理和扩展 [英] OpenGL compressed textures and extensions

查看:608
本文介绍了OpenGL压缩纹理和扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一张 nVidia Quadro NVS 295 / PCIe / SSE2 卡,当我做 glGetString(GL_EXTENSIONS)时,打印出这些值和grep forcompress,我得到这个列表


  • GL_ARB_compressed_texture_pixel_storage

  • GL_ARB_texture_compression

  • GL_ARB_texture_compression_rgtc

  • GL_EXT_texture_compression_dxt1

  • GL_EXT_texture_compression_latc

  • GL_EXT_texture_compression_rgtc

  • GL_EXT_texture_compression_s3tc

  • GL_NV_texture_compression_vtc



然后再次 glCompressedTexImage2D 表示 glGet GL_COMPRESSED_TEXTURE_FORMATS 返回支持的压缩,它只给出


  • 0x83f0 = GL_COMPRESSED_RGB_S3TC_DXT1_EXT
  • 0x83f2 = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT
  • li>
  • 0x83f3 = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT



这三个值。

现在为什么 glGet 不公开我的卡片可以处理的其他压缩格式?说LATC,RGTC或VTC?



另外为什么我在第一个列表中看不到相应的DXT3或5个扩展?

$ b
$ b

因为NVIDIA不想。真的,没有意义。 ARB甚至决定弃用GL4.3中的COMPRESSED_TEXTURE_FORMATS,但不要删除它。



总之,不要依赖特定的 glGet 。依靠扩展。如果你有GL 3.0+,那么你有 RGTC格式;这是需要由GL 3.0+。如果您有 EXT_texture_compression_s3tc ,则您使用DXT格式。如果您还有 EXT_texture_sRGB ,那么您将拥有sRGB版本的DXT格式。等等。


另外为什么我在第一个列表中看不到相应的DXT3或5个扩展?


ahem



    $ li $ 0x83f2 = GL_COMPRESSED_RGBA_S3TC_ DXT3 _EXT

这些只是S3TC的不同形式。


I've an nVidia Quadro NVS 295/PCIe/SSE2 card in which when I do glGetString(GL_EXTENSIONS), print out the values and grep for "compress", I get this list

  • GL_ARB_compressed_texture_pixel_storage
  • GL_ARB_texture_compression
  • GL_ARB_texture_compression_rgtc
  • GL_EXT_texture_compression_dxt1
  • GL_EXT_texture_compression_latc
  • GL_EXT_texture_compression_rgtc
  • GL_EXT_texture_compression_s3tc
  • GL_NV_texture_compression_vtc

But then again glCompressedTexImage2D says that glGet with GL_COMPRESSED_TEXTURE_FORMATS returns the supported compressions, which only gives

  • 0x83f0 = GL_COMPRESSED_RGB_S3TC_DXT1_EXT
  • 0x83f2 = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT
  • 0x83f3 = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT

these three values.

Now why does glGet not expose the other compression formats that my card can process? Say LATC, RGTC or VTC?

Also why am I not seeing corresponding DXT3 or 5 extensions in the first list?

解决方案

Now why does glGet not expose the other compression formats that my card can process?

Because NVIDIA doesn't want to. And really, there's no point. The ARB even decided to deprecate (though not remove) the COMPRESSED_TEXTURE_FORMATS stuff from GL 4.3.

In short, don't rely on that particular glGet. Rely on the extensions. If you have GL 3.0+, then you have the RGTC formats; that's required by GL 3.0+. If you have EXT_texture_compression_s3tc, then you have the "DXT" formats. If you have EXT_texture_sRGB as well, then you have the sRGB versions of the "DXT" formats. And so forth.

Also why am I not seeing corresponding DXT3 or 5 extensions in the first list?

ahem:

  • 0x83f2 = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT
  • 0x83f3 = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT

Those are just different forms of S3TC.

这篇关于OpenGL压缩纹理和扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆