28 #include "../idlib/precompiled.h"
55 static void RB_RenderInteraction(
const drawSurf_t *surf ) {
65 RB_LogComment(
"---------- RB_RenderInteraction %s on %s ----------\n",
73 for (
int i = 0 ;
i < 4 ;
i++ ) {
128 common->
Printf(
"shader %s: vertexColor on a bump stage\n",
136 lastBumpStage = surfaceStage;
159 qglTexGenfv( GL_S, GL_OBJECT_PLANE, lightProject[3].ToFloatPtr() );
175 GL_NONE, GL_NONE, GL_TRUE, GL_FALSE, GL_FALSE );
184 GL_NONE, GL_NONE, GL_FALSE, GL_FALSE, GL_FALSE );
216 qglTexGenfv( GL_S, GL_OBJECT_PLANE, lightProject[3].ToFloatPtr() );
224 GL_NONE, GL_NONE, GL_FALSE, GL_FALSE, GL_FALSE );
275 GL_NONE, GL_NONE, GL_TRUE, GL_FALSE, GL_FALSE );
293 if ( !lastBumpStage ) {
294 common->
Printf(
"shader %s: diffuse stage without a preceeding bumpmap stage\n",
318 if ( !lastBumpStage ) {
319 common->
Printf(
"shader %s: specular stage without a preceeding bumpmap stage\n",
361 GL_NONE, GL_NONE, GL_FALSE, GL_FALSE, GL_FALSE );
366 GL_NONE, GL_NONE, GL_FALSE, GL_FALSE, GL_FALSE );
403 lastBumpStage =
NULL;
435 qglTexGenfv( GL_S, GL_OBJECT_PLANE, lightProject[0].ToFloatPtr() );
436 qglTexGenfv( GL_T, GL_OBJECT_PLANE, lightProject[1].ToFloatPtr() );
437 qglTexGenfv( GL_Q, GL_OBJECT_PLANE, lightProject[2].ToFloatPtr() );
466 GL_NONE, GL_NONE, GL_FALSE, GL_FALSE, GL_FALSE );
504 if ( color[0] == 0 && color[1] == 0 && color[2] == 0 ) {
544 static void RB_RenderInteractionList(
const drawSurf_t *surf ) {
555 RB_RenderInteraction(
s );
569 static void RB_RenderViewLight(
viewLight_t *vLight ) {
580 RB_LogComment(
"---------- RB_RenderViewLight 0x%p ----------\n", vLight );
628 RB_RenderViewLight( vLight );
const int GLS_DSTBLEND_ONE
#define qglTexCoordPointer
const srfTriangles_t * geo
const int GLS_DEPTHFUNC_LESS
#define qglEnableClientState
#define qglDisableClientState
#define GL_UNSIGNED_INVERT_NV
const int GetNumStages(void) const
idCVar r_skipTranslucent("r_skipTranslucent","0", CVAR_RENDERER|CVAR_BOOL,"skip the translucent interaction rendering")
const float * ToFloatPtr(void) const
idCVar r_skipSpecular("r_skipSpecular","0", CVAR_RENDERER|CVAR_BOOL|CVAR_CHEAT|CVAR_ARCHIVE,"use black for specular1")
const int GLS_DSTBLEND_SRC_ALPHA
const struct drawSurf_s * localShadows
const char * GetName(void) const
const struct drawSurf_s * globalInteractions
bool IsBlendLight() const
void RB_EnterWeaponDepthHack()
void RB_EnterModelDepthHack(float depth)
const struct viewEntity_s * space
struct vertCache_s * ambientCache
const idMaterial * material
bool IsAmbientLight() const
const viewEntity_t * currentSpace
const idMaterial * lightShader
const int GLS_DEPTHFUNC_EQUAL
struct viewLight_s * next
struct viewLight_s * viewLights
#define GL_NUM_GENERAL_COMBINERS_NV
idImage * normalCubeMapImage
const shaderStage_t * GetStage(const int index) const
idCVar r_skipBump("r_skipBump","0", CVAR_RENDERER|CVAR_BOOL|CVAR_ARCHIVE,"uses a flat surface instead of the bump map")
#define GL_PRIMARY_COLOR_NV
struct vertCache_s * dynamicTexCoords
#define GL_CONSTANT_COLOR0_NV
idImageManager * globalImages
#define GL_CONSTANT_COLOR1_NV
struct vertCache_s * lightingCache
const struct drawSurf_s * translucentInteractions
bool registerCombinersAvailable
virtual void Printf(const char *fmt,...) id_attribute((format(printf
#define GL_REGISTER_COMBINERS_NV
void RB_DrawElementsWithCounters(const srfTriangles_t *tri)
const float * ToFloatPtr(void) const
const int GLS_SRCBLEND_DST_ALPHA
#define GL_SCALE_BY_TWO_NV
const int GLS_DSTBLEND_ZERO
const float * shaderRegisters
void RB_LogComment(const char *comment,...)
void RB_NV10_DrawInteractions(void)
const struct drawSurf_s * globalShadows
const struct drawSurf_s * localInteractions
const float * ToFloatPtr(void) const
void * Position(vertCache_t *buffer)
float modelViewMatrix[16]
#define GL_EXPAND_NORMAL_NV
stageVertexColor_t vertexColor
void RB_FinishStageTexture(const textureStage_t *texture, const drawSurf_t *surf)
idVertexCache vertexCache
void GL_State(int stateBits)
void RB_StencilShadowPass(const drawSurf_t *drawSurfs)
#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV
idCVar r_useScissor("r_useScissor","1", CVAR_RENDERER|CVAR_BOOL,"scissor clip as portals and lights are processed")
void GL_SelectTexture(int unit)
#define GL_UNSIGNED_IDENTITY_NV
idCVar r_skipDiffuse("r_skipDiffuse","0", CVAR_RENDERER|CVAR_BOOL,"use black for diffuse")
void RB_BindStageTexture(const float *shaderRegisters, const textureStage_t *texture, const drawSurf_t *surf)
idVec4 ambientLightVector
idScreenRect currentScissor
void R_GlobalPlaneToLocal(const float modelMatrix[16], const idPlane &in, idPlane &out)
const float * shaderRegisters
bool Equals(const idScreenRect &rect) const
const viewDef_t * viewDef