MCPcopy Create free account
hub / github.com/assaultcube/AC / framedquadtexture

Function framedquadtexture

source/src/rendergl.cpp:393–409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

391}
392
393void framedquadtexture(GLuint tex, int x, int y, int xs, int ys, int border, int backlight, bool blend)
394{
395 if(border) blendbox(x - border, y - border, x + xs + border, y + ys + border, false);
396 glBindTexture(GL_TEXTURE_2D, tex);
397 if(blend) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
398 else glDisable(GL_BLEND);
399 glColor3ub(backlight, backlight, backlight);
400 glBegin(GL_TRIANGLE_STRIP);
401 glTexCoord2f(0, 0); glVertex2f(x, y);
402 glTexCoord2f(1, 0); glVertex2f(x + xs, y);
403 glTexCoord2f(0, 1); glVertex2f(x, y + ys);
404 glTexCoord2f(1, 1); glVertex2f(x + xs, y + ys);
405 glEnd();
406 xtraverts += 4;
407 dimeditinfopanel = 99;
408 if(!blend) glEnable(GL_BLEND);
409}
410
411VARP(aboveheadiconsize, 0, 50, 1000);
412VARP(aboveheadiconfadetime, 1, 2000, 10000);

Callers 4

renderMethod · 0.85
renderMethod · 0.85
rendermenutexturepreviewFunction · 0.85
renderhudtexturepreviewFunction · 0.85

Calls 1

blendboxFunction · 0.85

Tested by

no test coverage detected