浏览代码

GL: Added check for texture formats.

Branimir Karadžić 11 年之前
父节点
当前提交
80b7ad4d2f
共有 2 个文件被更改,包括 17 次插入1 次删除
  1. 1 1
      src/image.cpp
  2. 16 0
      src/renderer_gl.h

+ 1 - 1
src/image.cpp

@@ -19,7 +19,7 @@ namespace bgfx
 		{  8, 4, 4, 16 }, // BC5
 		{  8, 4, 4, 16 }, // BC5
 		{  4, 4, 4,  8 }, // ETC1
 		{  4, 4, 4,  8 }, // ETC1
 		{  4, 4, 4,  8 }, // ETC2
 		{  4, 4, 4,  8 }, // ETC2
-		{  4, 4, 4,  8 }, // ETC2A
+		{  8, 4, 4, 16 }, // ETC2A
 		{  4, 4, 4,  8 }, // ETC2A1
 		{  4, 4, 4,  8 }, // ETC2A1
 		{  2, 8, 4,  8 }, // PTC12
 		{  2, 8, 4,  8 }, // PTC12
 		{  4, 4, 4,  8 }, // PTC14
 		{  4, 4, 4,  8 }, // PTC14

+ 16 - 0
src/renderer_gl.h

@@ -115,6 +115,10 @@ typedef uint64_t GLuint64;
 #	define GL_RED 0x1903
 #	define GL_RED 0x1903
 #endif // GL_RED
 #endif // GL_RED
 
 
+#ifndef GL_RED_INTEGER
+#	define GL_RED_INTEGER 0x8D94
+#endif // GL_RED_INTEGER
+
 #ifndef GL_GREEN
 #ifndef GL_GREEN
 #	define GL_GREEN 0x1904
 #	define GL_GREEN 0x1904
 #endif // GL_GREEN
 #endif // GL_GREEN
@@ -123,6 +127,10 @@ typedef uint64_t GLuint64;
 #	define GL_BLUE 0x1905
 #	define GL_BLUE 0x1905
 #endif // GL_BLUE
 #endif // GL_BLUE
 
 
+#ifndef GL_RGBA_INTEGER
+#	define GL_RGBA_INTEGER 0x8D99
+#endif // GL_RGBA_INTEGER
+
 #ifndef GL_RGB10_A2
 #ifndef GL_RGB10_A2
 #	define GL_RGB10_A2 0x8059
 #	define GL_RGB10_A2 0x8059
 #endif // GL_RGB10_A2
 #endif // GL_RGB10_A2
@@ -135,6 +143,14 @@ typedef uint64_t GLuint64;
 #	define GL_RGBA16F 0x881A
 #	define GL_RGBA16F 0x881A
 #endif // GL_RGBA16F
 #endif // GL_RGBA16F
 
 
+#ifndef GL_R16UI
+#	define GL_R16UI 0x8234
+#endif // GL_R16UI
+
+#ifndef GL_RGBA16UI
+#	define GL_RGBA16UI 0x8D76
+#endif // GL_RGBA16UI
+
 #ifndef GL_COMPRESSED_RGB_S3TC_DXT1_EXT
 #ifndef GL_COMPRESSED_RGB_S3TC_DXT1_EXT
 #	define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
 #	define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
 #endif // GL_COMPRESSED_RGB_S3TC_DXT1_EXT
 #endif // GL_COMPRESSED_RGB_S3TC_DXT1_EXT