From 045f7768d970a449ecde1c762d141d83535170c1 Mon Sep 17 00:00:00 2001 From: havoc Date: Tue, 5 Jan 2010 23:52:37 +0000 Subject: [PATCH] fix some bugs with cgGL path git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9795 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_rmain.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gl_rmain.c b/gl_rmain.c index e66f0173..deafd7d1 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -3898,7 +3898,7 @@ static void R_CG_CompilePermutation(r_cg_permutation_t *p, unsigned int mode, un CHECKGLERROR // compile the vertex program - if (vertstring[0] && (p->vprogram = cgCreateProgram(vid.cgcontext, CG_SOURCE, vertstring, CG_PROFILE_ARBVP1, NULL, NULL))) + if (vertstring[0] && (p->vprogram = cgCreateProgram(vid.cgcontext, CG_SOURCE, vertstring, vertexProfile, NULL, NULL))) { CHECKCGERROR cgCompileProgram(p->vprogram);CHECKCGERROR @@ -3929,7 +3929,7 @@ static void R_CG_CompilePermutation(r_cg_permutation_t *p, unsigned int mode, un } // compile the fragment program - if (fragstring[0] && (p->fprogram = cgCreateProgram(vid.cgcontext, CG_SOURCE, fragstring, CG_PROFILE_ARBFP1, NULL, NULL))) + if (fragstring[0] && (p->fprogram = cgCreateProgram(vid.cgcontext, CG_SOURCE, fragstring, fragmentProfile, NULL, NULL))) { cgCompileProgram(p->fprogram);CHECKCGERROR if (!cgIsProgramCompiled(p->fprogram)) @@ -4105,9 +4105,9 @@ void R_SetupShader_SetPermutationCG(unsigned int mode, unsigned int permutation) if (r_cg_permutation->vp_ModelViewMatrix) cgGLSetMatrixParameterfc(r_cg_permutation->vp_ModelViewMatrix, gl_modelview16f);CHECKCGERROR } -void CG_BindTexture(CGparameter param, int texnum) +void CG_BindTexture(CGparameter param, rtexture_t *tex) { - cgGLSetTextureParameter(param, texnum); + cgGLSetTextureParameter(param, R_GetTexture(tex)); cgGLEnableTextureParameter(param); } #endif -- 2.39.2