mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-21 20:01:43 +00:00
MacOS X fixes
This commit is contained in:
parent
3ae23b9fab
commit
5ec84cbc04
3 changed files with 8 additions and 10 deletions
|
@ -46,17 +46,16 @@ varying vec4 var_Color;
|
|||
varying vec3 var_Position;
|
||||
#endif
|
||||
|
||||
#if defined(USE_TCGEN) || defined(USE_NORMALMAP) || (defined(USE_LIGHT) && !defined(USE_FAST_LIGHT))
|
||||
#if defined(USE_TCGEN) || defined(USE_NORMALMAP) || defined(USE_LIGHT) && !defined(USE_FAST_LIGHT)
|
||||
varying vec3 var_SampleToView;
|
||||
#endif
|
||||
|
||||
#if !defined(USE_FAST_LIGHT)
|
||||
varying vec3 var_Normal;
|
||||
#endif
|
||||
|
||||
#if defined(USE_VERT_TANGENT_SPACE)
|
||||
#if defined(USE_VERT_TANGENT_SPACE)
|
||||
varying vec3 var_Tangent;
|
||||
varying vec3 var_Bitangent;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
varying vec3 var_VertLight;
|
||||
|
@ -233,7 +232,7 @@ void main()
|
|||
vec3 directedLight = var_VertLight;
|
||||
#endif
|
||||
|
||||
#if defined(USE_TCGEN) || defined(USE_NORMALMAP) || (defined(USE_LIGHT) && !defined(USE_FAST_LIGHT))
|
||||
#if defined(USE_TCGEN) || defined(USE_NORMALMAP) || defined(USE_LIGHT) && !defined(USE_FAST_LIGHT)
|
||||
vec3 SampleToView = normalize(var_SampleToView);
|
||||
#endif
|
||||
vec2 tex = var_DiffuseTex;
|
||||
|
|
|
@ -152,9 +152,6 @@ void main()
|
|||
|
||||
#if defined(USE_TCGEN) || defined(USE_NORMALMAP) || defined(USE_LIGHT) && !defined(USE_FAST_LIGHT)
|
||||
vec3 SampleToView = u_ViewOrigin - position.xyz;
|
||||
#endif
|
||||
|
||||
#if defined(USE_NORMALMAP) || defined(USE_LIGHT) && !defined(USE_FAST_LIGHT)
|
||||
var_SampleToView = SampleToView;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -334,7 +334,7 @@ static int GLSL_LoadGPUShaderText(const char *name, const char *fallback,
|
|||
return result;
|
||||
}
|
||||
|
||||
static void GLSL_LinkProgram(GLhandleARB program)
|
||||
static void GLSL_LinkProgram(GLhandleARB program, char *vpCode, char *fpCode)
|
||||
{
|
||||
GLint linked;
|
||||
|
||||
|
@ -344,6 +344,8 @@ static void GLSL_LinkProgram(GLhandleARB program)
|
|||
if(!linked)
|
||||
{
|
||||
GLSL_PrintInfoLog(program, qfalse);
|
||||
ri.Printf(PRINT_ALL, "vpCode:\n%s\n", vpCode);
|
||||
ri.Printf(PRINT_ALL, "fpCode:\n%s\n", fpCode);
|
||||
ri.Error(ERR_DROP, "\nshaders failed to link");
|
||||
}
|
||||
}
|
||||
|
@ -467,7 +469,7 @@ static int GLSL_InitGPUShader2(shaderProgram_t * program, const char *name, int
|
|||
qglBindAttribLocationARB(program->program, ATTR_INDEX_BITANGENT2, "attr_Bitangent2");
|
||||
#endif
|
||||
|
||||
GLSL_LinkProgram(program->program);
|
||||
GLSL_LinkProgram(program->program, vpCode, fpCode);
|
||||
|
||||
program->numUniforms = numUniforms;
|
||||
|
||||
|
|
Loading…
Reference in a new issue