فهرست منبع

GL_ARB_texture_multisample is written against OGL 3.1.

Dario Manesku 9 سال پیش
والد
کامیت
fc03aaab57
1فایلهای تغییر یافته به همراه6 افزوده شده و 7 حذف شده
  1. 6 7
      src/renderer_gl.cpp

+ 6 - 7
src/renderer_gl.cpp

@@ -5067,10 +5067,9 @@ namespace bgfx { namespace gl
 						;
 						;
 					const bool usesIUsamplers = !!bx::findIdentifierMatch(code, s_uisamplers);
 					const bool usesIUsamplers = !!bx::findIdentifierMatch(code, s_uisamplers);
 					const bool usesTexelFetch = !!bx::findIdentifierMatch(code, s_texelFetch);
 					const bool usesTexelFetch = !!bx::findIdentifierMatch(code, s_texelFetch);
-					const bool usesTextureMS  = !!bx::findIdentifierMatch(code, s_ARB_texture_multisample);
 
 
 					uint32_t version =
 					uint32_t version =
-						  usesIUsamplers || usesTexelFetch || usesTextureMS ? 130
+						  usesIUsamplers || usesTexelFetch ? 130
 						: usesTextureLod ? 120
 						: usesTextureLod ? 120
 						: 0
 						: 0
 						;
 						;
@@ -5088,11 +5087,6 @@ namespace bgfx { namespace gl
 						}
 						}
 					}
 					}
 
 
-					if (usesTextureMS)
-					{
-						writeString(&writer, "#extension GL_ARB_texture_multisample : enable\n");
-					}
-
 					if (130 <= version)
 					if (130 <= version)
 					{
 					{
 						if (m_type == GL_FRAGMENT_SHADER)
 						if (m_type == GL_FRAGMENT_SHADER)
@@ -5208,6 +5202,11 @@ namespace bgfx { namespace gl
 							}
 							}
 						}
 						}
 
 
+						if (!!bx::findIdentifierMatch(code, s_ARB_texture_multisample))
+						{
+							writeString(&writer, "#extension GL_ARB_texture_multisample : enable\n");
+						}
+
 						if (0 != fragData)
 						if (0 != fragData)
 						{
 						{
 							writeStringf(&writer, "out vec4 bgfx_FragData[%d];\n", fragData);
 							writeStringf(&writer, "out vec4 bgfx_FragData[%d];\n", fragData);