diff --git a/code/renderer/tr_backend.c b/code/renderer/tr_backend.c index b467afb6..b874cc43 100644 --- a/code/renderer/tr_backend.c +++ b/code/renderer/tr_backend.c @@ -719,7 +719,7 @@ Stretches a raw 32 bit power of 2 bitmap image over the given screen rectangle. Used for cinematics. ============= */ -void RE_StretchRaw (int x, int y, int w, int h, int cols, int rows, const byte *data, int client, qboolean dirty) { +void RE_StretchRaw (int x, int y, int w, int h, int cols, int rows, int components, const byte* data) { int i, j; int start, end; @@ -745,23 +745,21 @@ void RE_StretchRaw (int x, int y, int w, int h, int cols, int rows, const byte * ri.Error (ERR_DROP, "Draw_StretchRaw: size not a power of 2: %i by %i", cols, rows); } - GL_Bind( tr.scratchImage[client] ); + GL_Bind( tr.scratchImage[0] ); // if the scratchImage isn't in the format we want, specify it as a new texture - if ( cols != tr.scratchImage[client]->width || rows != tr.scratchImage[client]->height ) { - tr.scratchImage[client]->width = tr.scratchImage[client]->uploadWidth = cols; - tr.scratchImage[client]->height = tr.scratchImage[client]->uploadHeight = rows; + if ( cols != tr.scratchImage[0]->width || rows != tr.scratchImage[0]->height ) { + tr.scratchImage[0]->width = tr.scratchImage[0]->uploadWidth = cols; + tr.scratchImage[0]->height = tr.scratchImage[0]->uploadHeight = rows; qglTexImage2D( GL_TEXTURE_2D, 0, GL_RGB8, cols, rows, 0, GL_RGBA, GL_UNSIGNED_BYTE, data ); qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP ); qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP ); } else { - if (dirty) { - // otherwise, just subimage upload it so that drivers can tell we are going to be changing - // it and don't try and do a texture compression - qglTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, cols, rows, GL_RGBA, GL_UNSIGNED_BYTE, data ); - } + // otherwise, just subimage upload it so that drivers can tell we are going to be changing + // it and don't try and do a texture compression + qglTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, cols, rows, GL_RGBA, GL_UNSIGNED_BYTE, data); } if ( r_speeds->integer ) { diff --git a/code/renderer/tr_local.h b/code/renderer/tr_local.h index 92f1a74c..89ecec6d 100644 --- a/code/renderer/tr_local.h +++ b/code/renderer/tr_local.h @@ -1766,7 +1766,7 @@ MARKERS, POLYGON PROJECTION ON WORLD POLYGONS */ int R_MarkFragments( int numPoints, const vec3_t *points, const vec3_t projection, - int maxPoints, vec3_t pointBuffer, int maxFragments, markFragment_t *fragmentBuffer ); + int maxPoints, vec3_t pointBuffer, int maxFragments, markFragment_t *fragmentBuffer, float fRadiusSquared); void R_MarkFragmentsForInlineModel(clipHandle_t bmodel, const vec3_t angles, const vec3_t origin, int numPoints, const vec3_t* points, const vec3_t projection, int maxPoints, vec3_t pointBuffer, @@ -1784,12 +1784,12 @@ SCENE GENERATION void R_ToggleSmpFrame( void ); void RE_ClearScene( void ); -void RE_AddRefEntityToScene( const refEntity_t *ent ); +void RE_AddRefEntityToScene( const refEntity_t *ent, int parentEntityNumber); void RE_AddRefSpriteToScene(const refEntity_t* ent); void RE_AddTerrainMarkToScene(int iTerrainIndex, qhandle_t hShader, int numVerts, const polyVert_t* verts, int renderfx); refEntity_t* RE_GetRenderEntity(int entityNumber); -void RE_AddPolyToScene( qhandle_t hShader , int numVerts, const polyVert_t *verts, int num ); -void RE_AddLightToScene( const vec3_t org, float intensity, float r, float g, float b ); +qboolean RE_AddPolyToScene(qhandle_t hShader, int numVerts, const polyVert_t* verts, int numPolys); +void RE_AddLightToScene( const vec3_t org, float intensity, float r, float g, float b, int type ); void RE_AddAdditiveLightToScene( const vec3_t org, float intensity, float r, float g, float b ); void RE_RenderScene( const refdef_t *fd ); @@ -2018,6 +2018,7 @@ typedef enum { // the main view, all the 3D icons, etc #define MAX_POLYS 600 #define MAX_POLYVERTS 3000 +#define MAX_TERMARKS 1024 // all of the information needed by the back end must be // contained in a backEndData_t. This entire structure is diff --git a/code/renderer/tr_marks.c b/code/renderer/tr_marks.c index 3dca67b3..18489f09 100644 --- a/code/renderer/tr_marks.c +++ b/code/renderer/tr_marks.c @@ -251,7 +251,7 @@ R_MarkFragments ================= */ int R_MarkFragments( int numPoints, const vec3_t *points, const vec3_t projection, - int maxPoints, vec3_t pointBuffer, int maxFragments, markFragment_t *fragmentBuffer ) { + int maxPoints, vec3_t pointBuffer, int maxFragments, markFragment_t *fragmentBuffer, float fRadiusSquared ) { int numsurfaces, numPlanes; int i, j, k, m, n; surfaceType_t *surfaces[64]; diff --git a/code/renderer/tr_public.h b/code/renderer/tr_public.h index 23193097..9d35a587 100644 --- a/code/renderer/tr_public.h +++ b/code/renderer/tr_public.h @@ -137,7 +137,7 @@ typedef struct { void (*SetFullscreen)(qboolean fullScreen); int (*GetShaderWidth)(qhandle_t hShader); int (*GetShaderHeight)(qhandle_t hShader); - char* (*GetGraphicsInfo)(); + const char* (*GetGraphicsInfo)(); void (*ForceUpdatePose)(refEntity_t* model); orientation_t (*TIKI_Orientation)(refEntity_t* model, int tagNum); qboolean (*TIKI_IsOnGround)(refEntity_t* model, int tagNum, float threshold); diff --git a/code/renderer/tr_scene.c b/code/renderer/tr_scene.c index a59e08dd..c3210580 100644 --- a/code/renderer/tr_scene.c +++ b/code/renderer/tr_scene.c @@ -115,7 +115,7 @@ RE_AddPolyToScene ===================== */ -void RE_AddPolyToScene( qhandle_t hShader, int numVerts, const polyVert_t *verts, int numPolys ) { +qboolean RE_AddPolyToScene( qhandle_t hShader, int numVerts, const polyVert_t *verts, int numPolys ) { srfPoly_t *poly; int i, j; int fogIndex; @@ -237,7 +237,7 @@ RE_AddRefEntityToScene ===================== */ -void RE_AddRefEntityToScene( const refEntity_t *ent ) { +void RE_AddRefEntityToScene( const refEntity_t *ent, int parentEntityNumber) { if ( !tr.registered ) { return; } @@ -296,7 +296,7 @@ RE_AddLightToScene ===================== */ -void RE_AddLightToScene( const vec3_t org, float intensity, float r, float g, float b ) { +void RE_AddLightToScene( const vec3_t org, float intensity, float r, float g, float b, int type ) { RE_AddDynamicLightToScene( org, intensity, r, g, b, qfalse ); }