From: havoc Date: Tue, 5 Jan 2010 23:52:37 +0000 (+0000) Subject: fix some bugs with cgGL path X-Git-Tag: xonotic-v0.1.0preview~230^2~672 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=045f7768d970a449ecde1c762d141d83535170c1;hp=04b9f2c16039ab05fee8cf6de193eabd04202103 fix some bugs with cgGL path git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9795 d7cf8633-e32d-0410-b094-e92efae38249 --- 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