History

Introducing the COntext and the Backend object and the specialized GLBackend for the real OpenGL backend to the graphics api

Sam Gateau committed 12 years ago

Commit 88eaeae1 parent 6101c3b7 files · +39 −819Browse files

Showing the changes to interface/src/ui/TextRenderer.cpp (1 of 7 files). Show all

Unified · Split

interface/src/ui/TextRenderer.cpp+4−2
@@ -24,6 +24,8 @@ · 23 unmodified lines
24#include "glm/glm.hpp"24#include "glm/glm.hpp"
25#include <glm/gtc/matrix_transform.hpp>25#include <glm/gtc/matrix_transform.hpp>
26 26
27#include "gpu/GLBackend.h"
28
27 29
28// the width/height of the cached glyph textures30// the width/height of the cached glyph textures
29const int IMAGE_SIZE = 256;31const int IMAGE_SIZE = 256;
@@ -297,8 +299,8 @@ void TextRenderer::drawBatch() { · 267 unmodified lines
297 // TODO: Apply the correct font atlas texture, for now only one texture per TextRenderer so it should be good299 // TODO: Apply the correct font atlas texture, for now only one texture per TextRenderer so it should be good
298 glBindTexture(GL_TEXTURE_2D, _currentTextureID);300 glBindTexture(GL_TEXTURE_2D, _currentTextureID);
299 301
300 GLuint vbo = _glyphsBuffer.getGLBufferObject();302 GLuint vbo = gpu::GLBackend::getBufferID(_glyphsBuffer);
301 GLuint colorvbo = _glyphsColorBuffer.getGLBufferObject();303 GLuint colorvbo = gpu::GLBackend::getBufferID(_glyphsColorBuffer);
302 304
303 glEnableClientState(GL_VERTEX_ARRAY);305 glEnableClientState(GL_VERTEX_ARRAY);
304 glEnableClientState(GL_TEXTURE_COORD_ARRAY);306 glEnableClientState(GL_TEXTURE_COORD_ARRAY);