gpt4 book ai didi

OpenGL 压缩纹理和扩展

转载 作者:行者123 更新时间:2023-12-04 17:11:13 27 4
gpt4 key购买 nike

我有一个 nVidia Quadro NVS 295/PCIe/SSE2 卡,当我这样做时 glGetString(GL_EXTENSIONS) ,打印出“压缩”的值和 grep,我得到这个列表

  • 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 glGetGL_COMPRESSED_TEXTURE_FORMATS返回支持的压缩,它只给出
  • 0x83f0 = GL_COMPRESSED_RGB_S3TC_DXT1_EXT
  • 0x83f2 = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT
  • 0x83f3 = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT

  • 这三个值。

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

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

    最佳答案

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



    因为 NVIDIA 不想。真的,没有任何意义。 ARB 甚至决定弃用(虽然没有删除)GL 4.3 中的 COMPRESSED_TEXTURE_FORMATS 内容。

    简而言之,不要依赖那个特定的 glGet .依靠扩展。如果您有 GL 3.0+,那么您就有 the RGTC formats ;这是 GL 3.0+ 所要求的。如果您有 EXT_texture_compression_s3tc ,那么您就有了“DXT”格式。如果您有 EXT_texture_sRGB as well ,那么您就有了“DXT”格式的 sRGB 版本。等等。

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



    咳咳:

    • 0x83f2 = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT
    • 0x83f3 = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT


    这些只是 S3TC 的不同形式。

    关于OpenGL 压缩纹理和扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12358863/

    27 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com