X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=gl_backend.c;h=fa8fc68a6a451787a93b6dad05bd5306960cc223;hb=a7dec84b2f42d22b1261bf88ac9244ac5cc9d4c4;hp=3c497f4887bbcdcc31e3f4bb96c8d1c480cbcc92;hpb=24ca437dd14a676ac4a67caa95922a738738a4cf;p=xonotic%2Fdarkplaces.git diff --git a/gl_backend.c b/gl_backend.c index 3c497f48..fa8fc68a 100644 --- a/gl_backend.c +++ b/gl_backend.c @@ -130,7 +130,7 @@ int gl_maxdrawrangeelementsvertices; int gl_maxdrawrangeelementsindices; #ifdef DEBUGGL -int errornumber = 0; +int gl_errornumber = 0; void GL_PrintError(int errornumber, const char *filename, int linenumber) { @@ -1106,15 +1106,15 @@ void R_Viewport_InitCubeSideView(r_viewport_t *v, const matrix4x4_t *cameramatri Matrix4x4_FromArrayFloatGL(&v->projectmatrix, m); } -void R_Viewport_InitRectSideView(r_viewport_t *v, const matrix4x4_t *cameramatrix, int side, int size, int border, float nearclip, float farclip, const float *nearplane) +void R_Viewport_InitRectSideView(r_viewport_t *v, const matrix4x4_t *cameramatrix, int side, int size, int border, float nearclip, float farclip, const float *nearplane, int offsetx, int offsety) { matrix4x4_t tempmatrix, basematrix; float m[16]; memset(v, 0, sizeof(*v)); v->type = R_VIEWPORTTYPE_PERSPECTIVECUBESIDE; v->cameramatrix = *cameramatrix; - v->x = (side & 1) * size; - v->y = (side >> 1) * size; + v->x = offsetx + (side & 1) * size; + v->y = offsety + (side >> 1) * size; v->width = size; v->height = size; v->depth = 1; @@ -3873,8 +3873,8 @@ void R_Mesh_TexBind(unsigned int unitnum, rtexture_t *tex) int tex2d, tex3d, texcubemap, texnum; if (unitnum >= vid.teximageunits) return; -// if (unit->texture == tex) -// return; + if (unit->texture == tex) + return; switch(vid.renderpath) { case RENDERPATH_GL20: