]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - r_crosshairs.c
changed to use C runtime library DLL instead of static linking it
[xonotic/darkplaces.git] / r_crosshairs.c
index 7bb5778977abd9bf022aad5c2f338e2485ce61d1..49b68a3b7b8ea0736e76e81c121884be7a2ac1ca 100644 (file)
@@ -166,14 +166,14 @@ void R_DrawCrosshairSprite(rtexture_t *texture, vec3_t origin, vec_t scale, floa
        }
 
        memset(&m, 0, sizeof(m));
-       m.transparent = false;
        m.blendfunc1 = GL_SRC_ALPHA;
        m.blendfunc2 = GL_ONE;
        m.depthdisable = true;
        m.numtriangles = 2;
        m.numverts = 4;
        m.tex[0] = R_GetTexture(texture);
-       if (R_Mesh_Draw_GetBuffer(&m))
+       Matrix4x4_CreateIdentity(&m.matrix);
+       if (R_Mesh_Draw_GetBuffer(&m, false))
        {
                m.index[0] = 0;
                m.index[1] = 1;
@@ -184,7 +184,7 @@ void R_DrawCrosshairSprite(rtexture_t *texture, vec3_t origin, vec_t scale, floa
                m.color[0] = m.color[4] = m.color[8] = m.color[12] = cr * m.colorscale;
                m.color[1] = m.color[5] = m.color[9] = m.color[13] = cg * m.colorscale;
                m.color[2] = m.color[6] = m.color[10] = m.color[14] = cb * m.colorscale;
-               m.color[3] = m.color[7] = m.color[11] = m.color[15] = ca * m.colorscale;
+               m.color[3] = m.color[7] = m.color[11] = m.color[15] = ca;
                m.texcoords[0][0] = 0;
                m.texcoords[0][1] = 0;
                m.texcoords[0][2] = 0;
@@ -205,6 +205,7 @@ void R_DrawCrosshairSprite(rtexture_t *texture, vec3_t origin, vec_t scale, floa
                m.vertex[12] = origin[0] + vright[0] * scale - vup[0] * scale;
                m.vertex[13] = origin[1] + vright[1] * scale - vup[1] * scale;
                m.vertex[14] = origin[2] + vright[2] * scale - vup[2] * scale;
+               R_Mesh_Render();
        }
 }