r_main.c File Reference

#include "r_local.h"
#include "r_program.h"
#include "r_sphere.h"
#include "r_draw.h"
#include "r_font.h"
#include "r_light.h"
#include "r_lightmap.h"
#include "r_main.h"
#include "r_geoscape.h"
#include "r_misc.h"
#include "r_error.h"
#include "../../common/tracing.h"
#include "../ui/ui_windows.h"
#include "../../ports/system.h"
Include dependency graph for r_main.c:

Go to the source code of this file.

Defines

#define INTEL_TEXTURE_RESOLUTION   1024

Functions

static void R_PrintInfo (const char *pre, const char *msg)
static void R_Strings_f (void)
 Prints some OpenGL strings.
void R_SetupFrustum (void)
static void R_Clear (void)
 Clears the screens color and depth buffer.
static void R_ClearScene (void)
void R_BeginFrame (void)
void R_RenderFrame (void)
void R_EndFrame (void)
static qboolean R_CvarCheckMaxLightmap (cvar_t *cvar)
static qboolean R_CvarCheckLights (cvar_t *cvar)
static qboolean R_CvarCheckDynamicLights (cvar_t *cvar)
static qboolean R_CvarPrograms (cvar_t *cvar)
static qboolean R_CvarPostProcess (cvar_t *cvar)
static void R_RegisterSystemVars (void)
static void R_RegisterImageVars (void)
static void R_UpdateVidDef (const vidmode_t *vidmode)
qboolean R_SetMode (void)
static qboolean R_InitExtensions (void)
 Check and load all needed and supported opengl extensions.
static void R_EnforceVersion (void)
 We need at least opengl version 1.2.1.
static qboolean R_SearchForVendor (const char *vendor)
 Searches vendor and renderer GL strings for the given vendor id.
static void R_VerifyDriver (void)
 Checks whether we have hardware acceleration.
qboolean R_Init (void)
void R_Shutdown (void)

Variables

rendererData_t refdef
rconfig_t r_config
rstate_t r_state
rlocals_t r_locals
image_tr_noTexture
image_tr_warpTexture
static cvar_tr_maxtexres
cvar_tr_brightness
cvar_tr_contrast
cvar_tr_saturation
cvar_tr_drawentities
cvar_tr_drawworld
cvar_tr_nocull
cvar_tr_isometric
cvar_tr_anisotropic
cvar_tr_texture_lod
cvar_tr_screenshot_format
cvar_tr_screenshot_jpeg_quality
cvar_tr_lightmap
cvar_tr_debug_normals
cvar_tr_debug_tangents
static cvar_tr_deluxemap
cvar_tr_ext_texture_compression
static cvar_tr_ext_s3tc_compression
static cvar_tr_ext_nonpoweroftwo
static cvar_tr_intel_hack
static cvar_tr_texturemode
static cvar_tr_texturealphamode
static cvar_tr_texturesolidmode
cvar_tr_materials
cvar_tr_checkerror
cvar_tr_drawbuffer
cvar_tr_driver
cvar_tr_shadows
cvar_tr_soften
cvar_tr_modulate
cvar_tr_swapinterval
cvar_tr_multisample
cvar_tr_wire
cvar_tr_showbox
cvar_tr_threads
cvar_tr_vertexbuffers
cvar_tr_warp
cvar_tr_lights
cvar_tr_dynamic_lights
cvar_tr_programs
cvar_tr_postprocess
cvar_tr_maxlightmap
cvar_tr_shownormals
cvar_tr_bumpmap
cvar_tr_specular
cvar_tr_hardness
cvar_tr_parallax
cvar_tr_fog
cvar_tr_flares
cvar_tr_coronas
static const cmdList_t r_commands []

Detailed Description

Definition in file r_main.c.


Define Documentation

#define INTEL_TEXTURE_RESOLUTION   1024

Definition at line 940 of file r_main.c.

Referenced by R_VerifyDriver().


Function Documentation

void R_BeginFrame ( void   ) 
static void R_Clear ( void   )  [inline, static]

Clears the screens color and depth buffer.

Definition at line 178 of file r_main.c.

References f, and R_CheckError.

Referenced by R_BeginFrame().

static void R_ClearScene ( void   )  [inline, static]
See also:
CL_ClearState

Definition at line 192 of file r_main.c.

References rendererData_t::numCoronas, rendererData_t::numEntities, and rendererData_t::numLights.

Referenced by R_EndFrame().

static qboolean R_CvarCheckDynamicLights ( cvar_t cvar  )  [static]
static qboolean R_CvarCheckLights ( cvar_t cvar  )  [static]

Definition at line 401 of file r_main.c.

References Cvar_AssertValue(), Cvar_SetValue(), cvar_s::integer, and qtrue.

Referenced by R_RegisterSystemVars().

static qboolean R_CvarCheckMaxLightmap ( cvar_t cvar  )  [static]
static qboolean R_CvarPostProcess ( cvar_t cvar  )  [static]
static qboolean R_CvarPrograms ( cvar_t cvar  )  [static]
void R_EndFrame ( void   ) 
static void R_EnforceVersion ( void   )  [inline, static]

We need at least opengl version 1.2.1.

Definition at line 906 of file r_main.c.

References Com_Error(), ERR_FATAL, and rconfig_t::versionString.

Referenced by R_Init().

qboolean R_Init ( void   ) 
static qboolean R_InitExtensions ( void   )  [static]
static void R_PrintInfo ( const char *  pre,
const char *  msg 
) [static]

Definition at line 101 of file r_main.c.

References Com_Printf(), i, and Q_strncpyz().

Referenced by R_Strings_f().

static void R_RegisterImageVars ( void   )  [static]
Note:
image cvars
See also:
R_FilterTexture

Definition at line 502 of file r_main.c.

References CVAR_ARCHIVE, Cvar_Get(), CVAR_R_IMAGES, GLHW_NVIDIA, and rconfig_t::hardwareType.

Referenced by R_Init().

static void R_RegisterSystemVars ( void   )  [static]
void R_RenderFrame ( void   ) 
static qboolean R_SearchForVendor ( const char *  vendor  )  [static]

Searches vendor and renderer GL strings for the given vendor id.

Definition at line 934 of file r_main.c.

References Q_stristr(), rconfig_t::rendererString, and rconfig_t::vendorString.

Referenced by R_VerifyDriver().

qboolean R_SetMode ( void   ) 
void R_SetupFrustum ( void   ) 
void R_Shutdown ( void   ) 
static void R_Strings_f ( void   )  [static]

Prints some OpenGL strings.

Definition at line 119 of file r_main.c.

References rconfig_t::extensionsString, R_PrintInfo(), rconfig_t::rendererString, rconfig_t::vendorString, and rconfig_t::versionString.

Referenced by R_Init().

static void R_UpdateVidDef ( const vidmode_t vidmode  )  [static]
static void R_VerifyDriver ( void   )  [inline, static]

Variable Documentation

Definition at line 58 of file r_main.c.

Definition at line 51 of file r_main.c.

Referenced by R_FilterTexture().

Definition at line 74 of file r_main.c.

Referenced by R_CheckErrorDebug().

const cmdList_t r_commands[] [static]
Initial value:
 {
    {"r_listimages", R_ImageList_f, "Show all loaded images on game console"},
    {"r_listfontcache", R_FontListCache_f, "Show information about font cache"},
    {"r_screenshot", R_ScreenShot_f, "Take a screenshot"},
    {"r_listmodels", R_ModModellist_f, "Show all loaded models on game console"},
    {"r_strings", R_Strings_f, "Print openGL vendor and other strings"},
    {"r_restartprograms", R_RestartPrograms_f, "Reloads the shaders"},

    {NULL, NULL, NULL}
}

Definition at line 373 of file r_main.c.

Definition at line 52 of file r_main.c.

Referenced by R_FilterTexture().

Definition at line 99 of file r_main.c.

Referenced by R_AddCorona(), and R_DrawCoronas().

Definition at line 63 of file r_main.c.

Definition at line 64 of file r_main.c.

cvar_t* r_deluxemap [static]

Definition at line 65 of file r_main.c.

Definition at line 75 of file r_main.c.

Definition at line 54 of file r_main.c.

Referenced by R_DrawEntities().

Definition at line 55 of file r_main.c.

Referenced by R_GetLevelSurfaceLists().

Definition at line 76 of file r_main.c.

Referenced by Rimp_Init().

Definition at line 88 of file r_main.c.

Referenced by R_ClearActiveLights(), and R_EnableDynamicLights().

Definition at line 68 of file r_main.c.

Definition at line 67 of file r_main.c.

Definition at line 66 of file r_main.c.

Referenced by R_InitGraphics().

Definition at line 98 of file r_main.c.

Referenced by R_DrawFlareSurfaces().

Definition at line 97 of file r_main.c.

Referenced by R_EnableFog().

Definition at line 95 of file r_main.c.

Referenced by R_UseMaterial().

cvar_t* r_intel_hack [static]

Definition at line 69 of file r_main.c.

Definition at line 57 of file r_main.c.

Referenced by MYgluPerspective(), and R_RecursiveWorldNode().

Definition at line 62 of file r_main.c.

Referenced by R_EnableTexture().

Definition at line 87 of file r_main.c.

Referenced by R_AddLight(), R_AddSustainedLight(), R_EnableLighting(), and R_SphereShadeGLSL().

Definition at line 73 of file r_main.c.

Referenced by R_DrawMaterialSurfaces().

Definition at line 91 of file r_main.c.

Referenced by R_BeginBuildingLightmaps().

cvar_t* r_maxtexres [static]

Definition at line 49 of file r_main.c.

Definition at line 79 of file r_main.c.

Referenced by R_FilterTexture().

Definition at line 81 of file r_main.c.

Referenced by R_InitGraphics().

Definition at line 56 of file r_main.c.

Referenced by R_CullBox(), R_CullEntity(), and R_CullSphere().

Definition at line 46 of file r_main.c.

Definition at line 96 of file r_main.c.

Referenced by R_UseMaterial().

Definition at line 53 of file r_main.c.

Referenced by R_FilterTexture().

Definition at line 60 of file r_main.c.

Referenced by R_ScreenShot().

Definition at line 61 of file r_main.c.

Referenced by R_ScreenShot().

Definition at line 77 of file r_main.c.

Referenced by R_DrawEntityEffects().

Definition at line 83 of file r_main.c.

Referenced by R_DrawBrushModel(), R_DrawModelDirect(), R_DrawModelParticle(), and R_DrawSurface().

Definition at line 92 of file r_main.c.

Referenced by R_DrawBspNormals().

Definition at line 78 of file r_main.c.

Referenced by R_BuildLightmap().

Definition at line 94 of file r_main.c.

Referenced by R_UseMaterial().

Definition at line 43 of file r_main.c.

Referenced by R_AddLightsource(), R_ArraysMask(), R_BindColorAttachments(), R_BindDefaultArray(), R_BindTexture_(), R_BlendFunc(), R_Blur(), R_BlurStack(), R_ClearActiveLights(), R_CreateFramebuffer(), R_Draw2DArray(), R_Draw3DGlobe(), R_DrawAliasStatic(), R_DrawAlphaTestSurfaces(), R_DrawBlendMeshEntities(), R_DrawBlendSurfaces(), R_DrawBlendWarpSurfaces(), R_DrawBloom(), R_DrawBspNormals(), R_DrawCoronas(), R_DrawFlareSurfaces(), R_DrawMaterialSurfaces(), R_DrawOpaqueMeshEntities(), R_DrawOpaqueSurfaces(), R_DrawOpaqueWarpSurfaces(), R_DrawSurfaces(), R_DrawSurfaceStage(), R_EnableAlphaTest(), R_EnableAnimation(), R_EnableBlend(), R_EnableBlur(), R_EnableBumpmap(), R_EnableColorArray(), R_EnableDrawAsGlow(), R_EnableDynamicLights(), R_EnableFog(), R_EnableGlowMap(), R_EnableLighting(), R_EnableRenderbuffer(), R_EnableRoughnessMap(), R_EnableShell(), R_EnableSpecularMap(), R_EnableWarp(), R_FillArrayData(), R_FontDrawTexture(), R_InitFBObjects(), R_InitPrograms(), R_LoadProgram(), R_LoadShader(), R_ProgramVariable(), R_RenderbufferEnabled(), R_ResetArrayState(), R_SelectTexture(), R_SetDefaultState(), R_SetSurfaceBumpMappingParameters(), R_SetSurfaceStageState(), R_SetSurfaceState(), R_SetVertexArrayState(), R_SetVertexBufferState(), R_ShutdownFBObjects(), R_ShutdownPrograms(), R_SortLightList_qsort(), R_StageGlow(), R_StageLighting(), R_TexEnv(), R_UpdateLightList(), R_UseFramebuffer(), R_UseMaterial(), R_UseProgram(), and R_UseViewport().

Definition at line 80 of file r_main.c.

Referenced by R_InitGraphics().

Definition at line 59 of file r_main.c.

Referenced by R_UploadTexture().

Definition at line 71 of file r_main.c.

cvar_t* r_texturemode [static]

Definition at line 70 of file r_main.c.

Definition at line 72 of file r_main.c.

Definition at line 84 of file r_main.c.

Referenced by R_RunThread().

Definition at line 85 of file r_main.c.

Referenced by R_BindBuffer(), and R_SetArrayState().

Definition at line 86 of file r_main.c.

Referenced by R_EnableWarp().

Definition at line 47 of file r_main.c.

Referenced by R_EnableWarp(), and R_InitMiscTexture().

Definition at line 82 of file r_main.c.

Referenced by R_DrawMaterialSurfaces().


Generated by  doxygen 1.6.2