Favor GL_ARB_shader_texture_lod over GL_EXT_gpu_shader4.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 24 May 2011 23:15:50 -0400
changeset 1025 e3ffb7acae79
parent 1024 dbff93345a84
child 1026 7450fe55b177
Favor GL_ARB_shader_texture_lod over GL_EXT_gpu_shader4. One enables just the piece of functionality we care about for TEXLDD, the other enables a whole kitchen sink.
mojoshader.c
--- a/mojoshader.c	Tue May 24 04:38:48 2011 -0400
+++ b/mojoshader.c	Tue May 24 23:15:50 2011 -0400
@@ -3360,12 +3360,12 @@
     {
         ctx->glsl_generated_texldd_setup = 1;
         push_output(ctx, &ctx->preflight);
-        output_line(ctx, "#if GL_EXT_gpu_shader4");
-        output_line(ctx, "#extension GL_EXT_gpu_shader4 : enable");
-        output_line(ctx, "#elif GL_ARB_shader_texture_lod");
+        output_line(ctx, "#if GL_ARB_shader_texture_lod");
         output_line(ctx, "#extension GL_ARB_shader_texture_lod : enable");
         output_line(ctx, "#define texture2DGrad texture2DGradARB");
         output_line(ctx, "#define texture2DProjGrad texture2DProjARB");
+        output_line(ctx, "#elif GL_EXT_gpu_shader4");
+        output_line(ctx, "#extension GL_EXT_gpu_shader4 : enable");
         output_line(ctx, "#else");
         output_line(ctx, "#define texture2DGrad(a,b,c,d) texture2D(a,b)");
         output_line(ctx, "#define texture2DProjGrad(a,b,c,d) texture2DProj(a,b)");