make RenderTextLabel OpenGLRenderable

render CamDrawSize in uniform way
This commit is contained in:
Garux
2019-04-23 14:02:13 +03:00
parent 58eb6e61d2
commit 8d1015c7c8
3 changed files with 38 additions and 87 deletions

View File

@@ -1257,12 +1257,13 @@ inline void ArbitraryMeshTriangle_sumTangents( ArbitraryMeshVertex& a, Arbitrary
}
class RenderTextLabel
class RenderTextLabel : public OpenGLRenderable
{
unsigned int width;
unsigned int height;
public:
GLuint tex = 0;
unsigned int subTex = 0;
Vector2 screenPos;
~RenderTextLabel(){
texFree();
@@ -1280,7 +1281,7 @@ public:
tex = 0;
}
}
void render( unsigned int subTex ) const {
void render( RenderStateFlags state ) const {
if( tex > 0 ){
glBindTexture( GL_TEXTURE_2D, tex );
//Here we draw the texturemaped quads.