diff --git a/source/src/menus.cpp b/source/src/menus.cpp index 8cff75d1..e410e279 100644 --- a/source/src/menus.cpp +++ b/source/src/menus.cpp @@ -84,9 +84,9 @@ void drawarrow(int dir, int x, int y, int size, float r = 1.0f, float g = 1.0f, glColor3f(r, g, b); glBegin(GL_POLYGON); - glVertex2i(x, dir ? y+size : y); - glVertex2i(x+size/2, dir ? y : y+size); - glVertex2i(x+size, dir ? y+size : y); + glVertex2f(x, dir ? y+size : y); + glVertex2f(x+size/2, dir ? y : y+size); + glVertex2f(x+size, dir ? y+size : y); glEnd(); xtraverts += 3; diff --git a/source/src/rendergl.cpp b/source/src/rendergl.cpp index cd702b73..e8575f0c 100644 --- a/source/src/rendergl.cpp +++ b/source/src/rendergl.cpp @@ -249,10 +249,10 @@ void blendbox(int x1, int y1, int x2, int y2, bool border, int tex, color *c) } glBegin(GL_QUADS); - glTexCoord2f(0, 0); glVertex2i(x1, y1); - glTexCoord2f(1, 0); glVertex2i(x2, y1); - glTexCoord2f(1, 1); glVertex2i(x2, y2); - glTexCoord2f(0, 1); glVertex2i(x1, y2); + glTexCoord2f(0, 0); glVertex2f(x1, y1); + glTexCoord2f(1, 0); glVertex2f(x2, y1); + glTexCoord2f(1, 1); glVertex2f(x2, y2); + glTexCoord2f(0, 1); glVertex2f(x1, y2); glEnd(); xtraverts += 4; } @@ -264,10 +264,10 @@ void blendbox(int x1, int y1, int x2, int y2, bool border, int tex, color *c) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); glBegin(GL_POLYGON); glColor3f(0.6f, 0.6f, 0.6f); - glVertex2i(x1, y1); - glVertex2i(x2, y1); - glVertex2i(x2, y2); - glVertex2i(x1, y2); + glVertex2f(x1, y1); + glVertex2f(x2, y1); + glVertex2f(x2, y2); + glVertex2f(x1, y2); glEnd(); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); glEnable(GL_BLEND); @@ -571,10 +571,10 @@ void drawreflection(float hf, int w, int h, float changelod, bool refract) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glColor4ubv(hdr.watercolor); glBegin(GL_QUADS); - glVertex2i(0, 1); - glVertex2i(1, 1); - glVertex2i(1, 0); - glVertex2i(0, 0); + glVertex2f(0, 1); + glVertex2f(1, 1); + glVertex2f(1, 0); + glVertex2f(0, 0); glEnd(); glDisable(GL_BLEND); glEnable(GL_TEXTURE_2D); diff --git a/source/src/renderhud.cpp b/source/src/renderhud.cpp index 63b77a4b..fd8ff403 100644 --- a/source/src/renderhud.cpp +++ b/source/src/renderhud.cpp @@ -84,26 +84,26 @@ void drawscope() x1 = VIRTW/2 - w/2, x2 = VIRTW/2 + w/2; - glTexCoord2i(0, 0); glVertex2f(x1, 0); - glTexCoord2i(1, 0); glVertex2f(x2, 0); - glTexCoord2i(1, 1); glVertex2f(x2, VIRTH); - glTexCoord2i(0, 1); glVertex2f(x1, VIRTH); + glTexCoord2f(0, 0); glVertex2f(x1, 0); + glTexCoord2f(1, 0); glVertex2f(x2, 0); + glTexCoord2f(1, 1); glVertex2f(x2, VIRTH); + glTexCoord2f(0, 1); glVertex2f(x1, VIRTH); // fill unused space with border texels if(x1 > 0) { - glTexCoord2i(0, 0); glVertex2f(0, 0); - glTexCoord2i(0, 0); glVertex2f(x1, 0); - glTexCoord2i(0, 1); glVertex2f(x1, VIRTH); - glTexCoord2i(0, 1); glVertex2f(0, VIRTH); + glTexCoord2f(0, 0); glVertex2f(0, 0); + glTexCoord2f(0, 0); glVertex2f(x1, 0); + glTexCoord2f(0, 1); glVertex2f(x1, VIRTH); + glTexCoord2f(0, 1); glVertex2f(0, VIRTH); } if(x2 < VIRTW) { - glTexCoord2i(1, 0); glVertex2f(x2, 0); - glTexCoord2i(1, 0); glVertex2f(VIRTW, 0); - glTexCoord2i(1, 1); glVertex2f(VIRTW, VIRTH); - glTexCoord2i(1, 1); glVertex2f(x2, VIRTH); + glTexCoord2f(1, 0); glVertex2f(x2, 0); + glTexCoord2f(1, 0); glVertex2f(VIRTW, 0); + glTexCoord2f(1, 1); glVertex2f(VIRTW, VIRTH); + glTexCoord2f(1, 1); glVertex2f(x2, VIRTH); } glEnd(); @@ -140,10 +140,10 @@ void drawcrosshair(playerent *p, bool showteamwarning) } } float chsize = (float)crosshairsize * (p->weaponsel->type==GUN_ASSAULT && p->weaponsel->shots > 3 ? 1.4f : 1.0f) * (showteamwarning ? 2.0f : 1.0f); - glTexCoord2i(0, 0); glVertex2f(VIRTW/2 - chsize, VIRTH/2 - chsize); - glTexCoord2i(1, 0); glVertex2f(VIRTW/2 + chsize, VIRTH/2 - chsize); - glTexCoord2i(1, 1); glVertex2f(VIRTW/2 + chsize, VIRTH/2 + chsize); - glTexCoord2i(0, 1); glVertex2f(VIRTW/2 - chsize, VIRTH/2 + chsize); + glTexCoord2f(0, 0); glVertex2f(VIRTW/2 - chsize, VIRTH/2 - chsize); + glTexCoord2f(1, 0); glVertex2f(VIRTW/2 + chsize, VIRTH/2 - chsize); + glTexCoord2f(1, 1); glVertex2f(VIRTW/2 + chsize, VIRTH/2 + chsize); + glTexCoord2f(0, 1); glVertex2f(VIRTW/2 - chsize, VIRTH/2 + chsize); glEnd(); } @@ -394,10 +394,10 @@ void gl_drawhud(int w, int h, int curfps, int nquads, int curvert, bool underwat glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glColor4ub(hdr.watercolor[0], hdr.watercolor[1], hdr.watercolor[2], 102); glBegin(GL_QUADS); - glVertex2i(0, 0); - glVertex2i(VIRTW, 0); - glVertex2i(VIRTW, VIRTH); - glVertex2i(0, VIRTH); + glVertex2f(0, 0); + glVertex2f(VIRTW, 0); + glVertex2f(VIRTW, VIRTH); + glVertex2f(0, VIRTH); glEnd(); glDepthMask(GL_TRUE); } diff --git a/source/src/rendertext.cpp b/source/src/rendertext.cpp index 5502b9dd..52e55a78 100644 --- a/source/src/rendertext.cpp +++ b/source/src/rendertext.cpp @@ -223,10 +223,10 @@ void draw_text(const char *str, int left, int top) float tc_right = (info.x + info.w + curfont->offsetw) / float(curfont->tex->xs); float tc_bottom = (info.y + info.h + curfont->offseth) / float(curfont->tex->ys); - glTexCoord2f(tc_left, tc_top ); glVertex2i(x, y); - glTexCoord2f(tc_right, tc_top ); glVertex2i(x + info.w, y); - glTexCoord2f(tc_right, tc_bottom); glVertex2i(x + info.w, y + info.h); - glTexCoord2f(tc_left, tc_bottom); glVertex2i(x, y + info.h); + glTexCoord2f(tc_left, tc_top ); glVertex2f(x, y); + glTexCoord2f(tc_right, tc_top ); glVertex2f(x + info.w, y); + glTexCoord2f(tc_right, tc_bottom); glVertex2f(x + info.w, y + info.h); + glTexCoord2f(tc_left, tc_bottom); glVertex2f(x, y + info.h); xtraverts += 4; x += info.w + 1; diff --git a/source/src/texture.cpp b/source/src/texture.cpp index 6b314953..dfb32efd 100644 --- a/source/src/texture.cpp +++ b/source/src/texture.cpp @@ -228,10 +228,10 @@ void draw_envbox_face(float s0, float t0, int x0, int y0, int z0, { glBindTexture(GL_TEXTURE_2D, tex->id); glBegin(GL_QUADS); - glTexCoord2f(s3, t3); glVertex3i(x3, y3, z3); - glTexCoord2f(s2, t2); glVertex3i(x2, y2, z2); - glTexCoord2f(s1, t1); glVertex3i(x1, y1, z1); - glTexCoord2f(s0, t0); glVertex3i(x0, y0, z0); + glTexCoord2f(s3, t3); glVertex3f(x3, y3, z3); + glTexCoord2f(s2, t2); glVertex3f(x2, y2, z2); + glTexCoord2f(s1, t1); glVertex3f(x1, y1, z1); + glTexCoord2f(s0, t0); glVertex3f(x0, y0, z0); glEnd(); xtraverts += 4; }