summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c0bb008)
raw | patch | inline | side by side (parent: c0bb008)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 15 May 2020 15:51:30 +0000 (18:51 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 15 May 2020 15:51:30 +0000 (18:51 +0300) |
src/gl/render.c | patch | blob | history |
diff --git a/src/gl/render.c b/src/gl/render.c
index 68ab733d1da170d5e1b4ef6fd32be59d2a5a8903..d6f021de16a267021e347dfc8cda8b4c3b6eb76f 100644 (file)
--- a/src/gl/render.c
+++ b/src/gl/render.c
img->res = -1;
}
img->res = -1;
}
-static void R_gl_quad_vetexes (int x, int y, int w, int h) {
+static void R_gl_draw_quad (int x, int y, int w, int h) {
+ glBegin(GL_QUADS);
glVertex2i(x + w, y);
glVertex2i(x, y);
glVertex2i(x, y + h);
glVertex2i(x + w, y + h);
glVertex2i(x + w, y);
glVertex2i(x, y);
glVertex2i(x, y + h);
glVertex2i(x + w, y + h);
-}
-
-static void R_gl_draw_quad (int x, int y, int w, int h) {
- glBegin(GL_QUADS);
- R_gl_quad_vetexes(x, y, w, h);
glEnd();
}
glEnd();
}
glBegin(GL_QUADS);
for (i = 0; i < MAXDOT; i++) {
if (dot[i].t != 0) {
glBegin(GL_QUADS);
for (i = 0; i < MAXDOT; i++) {
if (dot[i].t != 0) {
- R_gl_set_color(dot[i].c);
- R_gl_quad_vetexes(dot[i].o.x, dot[i].o.y, 1, 1);
+ int x = dot[i].o.x;
+ int y = dot[i].o.y;
+ R_gl_set_color(dot[i].c); glVertex2i(x + 1, y);
+ R_gl_set_color(dot[i].c); glVertex2i(x, y);
+ R_gl_set_color(dot[i].c); glVertex2i(x, y + 1);
+ R_gl_set_color(dot[i].c); glVertex2i(x + 1, y + 1);
}
}
glEnd();
}
}
glEnd();