29 #include "../idlib/precompiled.h"
72 static void RB_NV20_BumpAndLightFragment(
void ) {
89 GL_NONE, GL_NONE, GL_TRUE, GL_FALSE, GL_FALSE );
100 GL_NONE, GL_NONE, GL_FALSE, GL_FALSE, GL_FALSE );
112 GL_NONE, GL_NONE, GL_FALSE, GL_FALSE, GL_FALSE );
122 GL_NONE, GL_NONE, GL_FALSE, GL_FALSE, GL_FALSE );
146 static void RB_NV20_DI_BumpAndLightPass(
const drawInteraction_t *din,
bool monoLightShader ) {
147 RB_LogComment(
"---------- RB_NV_BumpAndLightPass ----------\n" );
191 if ( monoLightShader ) {
200 RB_NV20_BumpAndLightFragment();
213 static void RB_NV20_DiffuseColorFragment(
void ) {
230 GL_NONE, GL_NONE, GL_FALSE, GL_FALSE, GL_FALSE );
234 GL_NONE, GL_NONE, GL_FALSE, GL_FALSE, GL_FALSE );
262 RB_LogComment(
"---------- RB_NV20_DiffuseColorPass ----------\n" );
304 RB_NV20_DiffuseColorFragment();
323 static void RB_NV20_SpecularColorFragment(
void ) {
374 GL_NONE, GL_NONE, GL_FALSE, GL_FALSE, GL_FALSE );
386 GL_NONE, GL_NONE, GL_FALSE, GL_FALSE, GL_FALSE );
415 RB_LogComment(
"---------- RB_NV20_SpecularColorPass ----------\n" );
457 RB_NV20_SpecularColorFragment();
477 static void RB_NV20_DiffuseAndSpecularColorFragment(
void ) {
557 static void RB_NV20_DI_DiffuseAndSpecularColorPass(
const drawInteraction_t *din ) {
558 RB_LogComment(
"---------- RB_NV20_DI_DiffuseAndSpecularColorPass ----------\n" );
591 RB_NV20_DiffuseAndSpecularColorFragment();
629 RB_NV20_DI_BumpAndLightPass( din,
false );
630 RB_NV20_DI_DiffuseColorPass( din );
631 RB_NV20_DI_SpecularColorPass( din );
649 RB_NV20_DI_BumpAndLightPass( din,
true );
650 RB_NV20_DI_DiffuseAndSpecularColorPass( din );
656 RB_NV20_DI_BumpAndLightPass( din,
false );
657 RB_NV20_DI_DiffuseColorPass( din );
658 RB_NV20_DI_SpecularColorPass( din );
669 static void RB_NV20_CreateDrawInteractions(
const drawSurf_t *surf ) {
784 RB_LogComment(
"---------- RB_RenderViewLight 0x%p ----------\n", vLight );
847 common->
Printf(
"---------- R_NV20_Init ----------\n" );
864 RB_NV20_BumpAndLightFragment();
868 RB_NV20_DiffuseColorFragment();
872 RB_NV20_SpecularColorFragment();
876 RB_NV20_DiffuseAndSpecularColorFragment();
881 common->
Printf(
"---------------------------------\n" );
const int GLS_DSTBLEND_ONE
#define qglTexCoordPointer
const srfTriangles_t * geo
const int GLS_DEPTHFUNC_LESS
void GL_SelectTextureNoClient(int unit)
PFNGLVERTEXATTRIBPOINTERARBPROC qglVertexAttribPointerARB
#define qglEnableClientState
#define qglDisableClientState
void GL_CheckErrors(void)
stageVertexColor_t vertexColor
#define GL_UNSIGNED_INVERT_NV
idCVar r_skipTranslucent("r_skipTranslucent","0", CVAR_RENDERER|CVAR_BOOL,"skip the translucent interaction rendering")
idCVar r_useShadowVertexProgram("r_useShadowVertexProgram","1", CVAR_RENDERER|CVAR_BOOL,"do the shadow projection in the vertex program on capable cards")
const float * ToFloatPtr(void) const
PFNGLDISABLEVERTEXATTRIBARRAYARBPROC qglDisableVertexAttribArrayARB
GLuint fragmentDisplayListBase
const struct drawSurf_s * localShadows
const struct drawSurf_s * globalInteractions
idCVar r_useNV20MonoLights("r_useNV20MonoLights","1", CVAR_RENDERER|CVAR_INTEGER,"use pass optimization for mono lights")
bool IsBlendLight() const
struct vertCache_s * ambientCache
const idMaterial * lightShader
void RB_NV20_DrawInteractions(void)
const int GLS_DEPTHFUNC_EQUAL
void RB_CreateSingleDrawInteractions(const drawSurf_t *surf, void(*DrawInteraction)(const drawInteraction_t *))
struct viewLight_s * next
idImage * ambientNormalMap
struct viewLight_s * viewLights
#define GL_NUM_GENERAL_COMBINERS_NV
idImage * normalCubeMapImage
PFNGLENABLEVERTEXATTRIBARRAYARBPROC qglEnableVertexAttribArrayARB
idImage * lightFalloffImage
PFNGLBINDPROGRAMARBPROC qglBindProgramARB
#define GL_PRIMARY_COLOR_NV
int GetInteger(void) const
#define GL_CONSTANT_COLOR0_NV
idImageManager * globalImages
bool ARBVertexProgramAvailable
#define GL_CONSTANT_COLOR1_NV
const struct drawSurf_s * translucentInteractions
bool registerCombinersAvailable
#define GL_SECONDARY_COLOR_NV
void RB_NV20_DependentAmbientPass(void)
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
void RB_LogComment(const char *comment,...)
const struct drawSurf_s * globalShadows
idVec4 lightProjection[4]
const struct drawSurf_s * localInteractions
const float * ToFloatPtr(void) const
void * Position(vertCache_t *buffer)
const struct drawSurf_s * nextOnLight
#define GL_VERTEX_PROGRAM_ARB
PFNGLPROGRAMENVPARAMETER4FVARBPROC qglProgramEnvParameter4fvARB
#define GL_EXPAND_NORMAL_NV
idVertexCache vertexCache
void SetBool(const bool value)
void GL_State(int stateBits)
void RB_StencilShadowPass(const drawSurf_t *drawSurfs)
idCVar r_useCombinerDisplayLists("r_useCombinerDisplayLists","1", CVAR_RENDERER|CVAR_BOOL|CVAR_NOCHEAT,"put all nvidia register combiner programming in display lists")
#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
typedef GLuint(APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC)(GLsizei range)
idScreenRect currentScissor
void RB_NV20_DependentSpecularPass(const drawInteraction_t *din)
const viewDef_t * viewDef