From dd9cca1a55f31bceed3ee4d02529245932b97d84 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Sun, 16 Jun 2013 04:10:09 -0300 Subject: [PATCH] Added Data:getString to GlyphData --- src/modules/font/wrap_GlyphData.cpp | 2 ++ src/modules/graphics/opengl/OpenGL.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/font/wrap_GlyphData.cpp b/src/modules/font/wrap_GlyphData.cpp index ca9e7dcea..6b236ba0c 100644 --- a/src/modules/font/wrap_GlyphData.cpp +++ b/src/modules/font/wrap_GlyphData.cpp @@ -32,6 +32,8 @@ GlyphData *luax_checkglyphdata(lua_State *L, int idx) static const luaL_Reg functions[] = { + // Data + { "getString", w_Data_getString }, { "getSize", w_Data_getSize }, { 0, 0 } }; diff --git a/src/modules/graphics/opengl/OpenGL.cpp b/src/modules/graphics/opengl/OpenGL.cpp index 28ec3f7cd..40821c497 100644 --- a/src/modules/graphics/opengl/OpenGL.cpp +++ b/src/modules/graphics/opengl/OpenGL.cpp @@ -66,11 +66,11 @@ void OpenGL::initContext() state.clearColor.a = glcolor[3] * 255; // Get the current viewport. - glGetIntegerv(GL_VIEWPORT, (GLint *) &state.viewport); + glGetIntegerv(GL_VIEWPORT, (GLint *) &state.viewport.x); // And the current scissor - but we need to compensate for GL scissors // starting at the bottom left instead of top left. - glGetIntegerv(GL_SCISSOR_BOX, (GLint *) &state.scissor); + glGetIntegerv(GL_SCISSOR_BOX, (GLint *) &state.scissor.x); state.scissor.y = state.viewport.h - (state.scissor.y + state.scissor.h); // Initialize multiple texture unit support for shaders, if available.