mojoshader.c
changeset 1025 e3ffb7acae79
parent 1020 c0fe544e0feb
child 1026 7450fe55b177
equal deleted inserted replaced
1024:dbff93345a84 1025:e3ffb7acae79
  3358     //  enough.
  3358     //  enough.
  3359     if (!ctx->glsl_generated_texldd_setup)
  3359     if (!ctx->glsl_generated_texldd_setup)
  3360     {
  3360     {
  3361         ctx->glsl_generated_texldd_setup = 1;
  3361         ctx->glsl_generated_texldd_setup = 1;
  3362         push_output(ctx, &ctx->preflight);
  3362         push_output(ctx, &ctx->preflight);
  3363         output_line(ctx, "#if GL_EXT_gpu_shader4");
  3363         output_line(ctx, "#if GL_ARB_shader_texture_lod");
  3364         output_line(ctx, "#extension GL_EXT_gpu_shader4 : enable");
       
  3365         output_line(ctx, "#elif GL_ARB_shader_texture_lod");
       
  3366         output_line(ctx, "#extension GL_ARB_shader_texture_lod : enable");
  3364         output_line(ctx, "#extension GL_ARB_shader_texture_lod : enable");
  3367         output_line(ctx, "#define texture2DGrad texture2DGradARB");
  3365         output_line(ctx, "#define texture2DGrad texture2DGradARB");
  3368         output_line(ctx, "#define texture2DProjGrad texture2DProjARB");
  3366         output_line(ctx, "#define texture2DProjGrad texture2DProjARB");
       
  3367         output_line(ctx, "#elif GL_EXT_gpu_shader4");
       
  3368         output_line(ctx, "#extension GL_EXT_gpu_shader4 : enable");
  3369         output_line(ctx, "#else");
  3369         output_line(ctx, "#else");
  3370         output_line(ctx, "#define texture2DGrad(a,b,c,d) texture2D(a,b)");
  3370         output_line(ctx, "#define texture2DGrad(a,b,c,d) texture2D(a,b)");
  3371         output_line(ctx, "#define texture2DProjGrad(a,b,c,d) texture2DProj(a,b)");
  3371         output_line(ctx, "#define texture2DProjGrad(a,b,c,d) texture2DProj(a,b)");
  3372         output_line(ctx, "#endif");
  3372         output_line(ctx, "#endif");
  3373         output_blank_line(ctx);
  3373         output_blank_line(ctx);