mojoshader_opengl.c
changeset 1311 448b82b26acb
parent 1277 da61410edbc9
equal deleted inserted replaced
1310:9f3b98d12a37 1311:448b82b26acb
  2925             ctx->bound_program->current_vpos_flip[1] = vposFlip[1];
  2925             ctx->bound_program->current_vpos_flip[1] = vposFlip[1];
  2926         } // if
  2926         } // if
  2927     } // if
  2927     } // if
  2928 
  2928 
  2929 #ifdef MOJOSHADER_FLIP_RENDERTARGET
  2929 #ifdef MOJOSHADER_FLIP_RENDERTARGET
  2930     assert(ctx->bound_program->vs_flip_loc != -1);
  2930     if (ctx->bound_program->vs_flip_loc != -1)
  2931 
  2931     {
  2932     /* Some compilers require that vpFlip be a float value, rather than int.
  2932         /* Some compilers require that vpFlip be a float value, rather than int.
  2933      * However, there's no real reason for it to be a float in the API, so we
  2933          * However, there's no real reason for it to be a float in the API, so we
  2934      * do a cast in here. That's not so bad, right...?
  2934          * do a cast in here. That's not so bad, right...?
  2935      * -flibit
  2935          * -flibit
  2936      */
  2936          */
  2937     const int flip = renderTargetBound ? -1 : 1;
  2937         const int flip = renderTargetBound ? -1 : 1;
  2938     if (flip != ctx->bound_program->current_flip)
  2938         if (flip != ctx->bound_program->current_flip)
  2939     {
  2939         {
  2940         ctx->glUniform1f(ctx->bound_program->vs_flip_loc, (float) flip);
  2940             ctx->glUniform1f(ctx->bound_program->vs_flip_loc, (float) flip);
  2941         ctx->bound_program->current_flip = flip;
  2941             ctx->bound_program->current_flip = flip;
       
  2942         } // if
  2942     } // if
  2943     } // if
  2943 #endif
  2944 #endif
  2944 } // MOJOSHADER_glViewportInfo
  2945 } // MOJOSHADER_glViewportInfo
  2945 
  2946 
  2946 
  2947