noworldtexture cleanup

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2297 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-08-08 08:14:58 +00:00
parent fce52698aa
commit 930f4e223c
5 changed files with 21 additions and 20 deletions
+7 -7
View File
@@ -46,7 +46,7 @@ int renderedtexs = 0;
void renderstripssky()
{
if(skystrips.tris.first.empty() && skystrips.tristrips.first.empty() && skystrips.quads.first.empty()) return;
glBindTexture(GL_TEXTURE_2D, lookuptexture(DEFAULT_SKY)->id);
glBindTexture(GL_TEXTURE_2D, lookupworldtexture(DEFAULT_SKY)->id);
RENDERSTRIPS(skystrips.tris, GL_TRIANGLES);
RENDERSTRIPS(skystrips.tristrips, GL_TRIANGLE_STRIP);
RENDERSTRIPS(skystrips.quads, GL_QUADS);
@@ -57,7 +57,7 @@ void renderstrips()
loopj(renderedtexs)
{
stripbatch &sb = stripbatches[j];
glBindTexture(GL_TEXTURE_2D, lookuptexture(sb.tex)->id);
glBindTexture(GL_TEXTURE_2D, lookupworldtexture(sb.tex)->id);
RENDERSTRIPS(sb.tris, GL_TRIANGLES);
RENDERSTRIPS(sb.tristrips, GL_TRIANGLE_STRIP);
RENDERSTRIPS(sb.quads, GL_QUADS);
@@ -142,7 +142,7 @@ void render_flat(int wtex, int x, int y, int size, int h, sqr *l1, sqr *l2, sqr
{
if(showm) { l3 = l1 = &sbright; l4 = l2 = &sdark; }
Texture *t = lookuptexture(wtex);
Texture *t = lookupworldtexture(wtex);
float xf = TEXTURESCALE/t->xs;
float yf = TEXTURESCALE/t->ys;
float xs = size*xf;
@@ -219,7 +219,7 @@ void render_flatdelta(int wtex, int x, int y, int size, float h1, float h2, floa
{
if(showm) { l3 = l1 = &sbright; l4 = l2 = &sdark; }
Texture *t = lookuptexture(wtex);
Texture *t = lookupworldtexture(wtex);
float xf = TEXTURESCALE/t->xs;
float yf = TEXTURESCALE/t->ys;
float xs = size*xf;
@@ -273,7 +273,7 @@ void render_2tris(sqr *h, sqr *s, int x1, int y1, int x2, int y2, int x3, int y3
{
stripend();
Texture *t = lookuptexture(h->ftex);
Texture *t = lookupworldtexture(h->ftex);
float xf = TEXTURESCALE/t->xs;
float yf = TEXTURESCALE/t->ys;
vert(x1, y1, h->floor, l1, xf*x1, yf*y1);
@@ -281,7 +281,7 @@ void render_2tris(sqr *h, sqr *s, int x1, int y1, int x2, int y2, int x3, int y3
vert(x3, y3, h->floor, l3, xf*x3, yf*y3);
addstrip(mergestrips ? GL_TRIANGLES : GL_TRIANGLE_STRIP, h->ftex, verts.length()-3, 3);
t = lookuptexture(h->ctex);
t = lookupworldtexture(h->ctex);
xf = TEXTURESCALE/t->xs;
yf = TEXTURESCALE/t->ys;
@@ -312,7 +312,7 @@ void render_square(int wtex, float floor1, float floor2, float ceil1, float ceil
stripend();
if(showm) { l1 = &sbright; l2 = &sdark; }
Texture *t = lookuptexture(wtex);
Texture *t = lookupworldtexture(wtex);
float xf = TEXTURESCALE/t->xs;
float yf = TEXTURESCALE/t->ys;
float xs = size*xf;