Skip to content

Commit

Permalink
Revert "pango_display: less state changes in widgets"
Browse files Browse the repository at this point in the history
This reverts commit cba1ef2.
  • Loading branch information
christianrauch committed Jun 16, 2024
1 parent 13e4a18 commit e2fd5d6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions components/pango_display/src/widgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,12 @@ inline void DrawWindow(GlText& text, GLfloat x, GLfloat y, GLfloat z = 0.0)
GLint view[4];
glGetIntegerv(GL_VIEWPORT, view );

auto& d = DisplayBase();
d.Activate();
glMatrixMode(GL_PROJECTION);
glPushMatrix();
// Pixel continuous coords
ProjectionMatrixOrthographic(0.0, d.v.w, 0.0, d.v.h, -1.0, 1.0).Load();
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();

DisplayBase().ActivatePixelOrthographic();

glTranslatef( std::floor(x), std::floor(y), z);
text.Draw();
Expand Down

0 comments on commit e2fd5d6

Please sign in to comment.