int arrayenabled;
unsigned int arraycomponents;
const void *pointer_texcoord;
- float rgbscale, alphascale;
+ int rgbscale, alphascale;
int combinergb, combinealpha;
// FIXME: add more combine stuff
// texmatrixenabled exists only to avoid unnecessary texmatrix compares
{
if (gl_state.blendfunc1 != blendfunc1 || gl_state.blendfunc2 != blendfunc2)
{
- if (r_showtrispass)
- return;
qglBlendFunc(gl_state.blendfunc1 = blendfunc1, gl_state.blendfunc2 = blendfunc2);CHECKGLERROR
if (gl_state.blendfunc2 == GL_ZERO)
{
{
if (gl_state.depthmask != state)
{
- if (r_showtrispass)
- return;
qglDepthMask(gl_state.depthmask = state);CHECKGLERROR
}
}
{
if (gl_state.depthtest != state)
{
- if (r_showtrispass && r_showdisabledepthtest.integer)
- return;
gl_state.depthtest = state;
if (gl_state.depthtest)
{
{
if (gl_state.pointer_color || gl_state.color4f[0] != cr || gl_state.color4f[1] != cg || gl_state.color4f[2] != cb || gl_state.color4f[3] != ca)
{
- if (r_showtrispass)
- return;
gl_state.color4f[0] = cr;
gl_state.color4f[1] = cg;
gl_state.color4f[2] = cb;
}
}
-void GL_ShowTrisColor(float cr, float cg, float cb, float ca)
-{
- if (!r_showtrispass)
- return;
- r_showtrispass = 0;
- GL_Color(cr * r_showtris.value, cg * r_showtris.value, cb * r_showtris.value, ca);
- r_showtrispass = 1;
-}
-
-
void GL_LockArrays(int first, int count)
{
if (gl_state.lockrange_count != count || gl_state.lockrange_first != first)
void GL_Clear(int mask)
{
- // in showtris rendering, don't clear the color buffer as that would hide
- // the accumulated lines
- if (r_showtrispass)
- mask &= ~GL_COLOR_BUFFER_BIT;
qglClear(mask);CHECKGLERROR
}
if (!programobject)
return 0;
+ if (developer.integer >= 100)
+ {
+ int i;
+ Con_Printf("Compiling shader:\n");
+ if (vertexstrings_count)
+ {
+ Con_Printf("------ VERTEX SHADER ------\n");
+ for (i = 0;i < vertexstrings_count;i++)
+ Con_Print(vertexstrings_list[i]);
+ Con_Print("\n");
+ }
+ if (fragmentstrings_count)
+ {
+ Con_Printf("------ FRAGMENT SHADER ------\n");
+ for (i = 0;i < fragmentstrings_count;i++)
+ Con_Print(fragmentstrings_list[i]);
+ Con_Print("\n");
+ }
+ }
+
if (vertexstrings_count)
{
CHECKGLERROR
return;
}
//CHECKGLERROR
- if (r_showtrispass)
- {
- R_Mesh_Draw_ShowTris(firstvertex, numvertices, numtriangles, elements);
- return;
- }
renderstats.meshes++;
renderstats.meshes_elements += numelements;
if (gl_paranoid.integer)
void R_Mesh_ColorPointer(const float *color4f)
{
- if (r_showtrispass)
- return;
if (gl_state.pointer_color != color4f)
{
CHECKGLERROR
void R_Mesh_TexCoordPointer(unsigned int unitnum, unsigned int numcomponents, const float *texcoord)
{
gltextureunit_t *unit = gl_state.units + unitnum;
- if (r_showtrispass)
- return;
// update array settings
if (texcoord)
{
gltextureunit_t *unit = gl_state.units + unitnum;
if (unitnum >= backendimageunits)
return;
- if (r_showtrispass)
- return;
// update 1d texture binding
if (unit->t1d != tex1d)
{
gltextureunit_t *unit = gl_state.units + unitnum;
if (unitnum >= backendimageunits)
return;
- if (r_showtrispass)
- return;
// update 1d texture binding
if (unit->t1d != texnum)
{
gltextureunit_t *unit = gl_state.units + unitnum;
if (unitnum >= backendimageunits)
return;
- if (r_showtrispass)
- return;
// update 1d texture binding
if (unit->t1d)
{
gltextureunit_t *unit = gl_state.units + unitnum;
if (unitnum >= backendimageunits)
return;
- if (r_showtrispass)
- return;
// update 1d texture binding
if (unit->t1d)
{
gltextureunit_t *unit = gl_state.units + unitnum;
if (unitnum >= backendimageunits)
return;
- if (r_showtrispass)
- return;
// update 1d texture binding
if (unit->t1d)
{
void R_Mesh_TexMatrix(unsigned int unitnum, const matrix4x4_t *matrix)
{
gltextureunit_t *unit = gl_state.units + unitnum;
- if (r_showtrispass)
- return;
if (matrix->m[3][3])
{
// texmatrix specified, check if it is different
void R_Mesh_TexCombine(unsigned int unitnum, int combinergb, int combinealpha, int rgbscale, int alphascale)
{
gltextureunit_t *unit = gl_state.units + unitnum;
- if (r_showtrispass)
- return;
if (gl_combine.integer)
{
// GL_ARB_texture_env_combine