Minor graphics fixes

This commit is contained in:
Eduardo Bart
2012-06-18 20:58:56 -03:00
parent cb58d2dcfa
commit 5a048eb7ea
7 changed files with 24 additions and 14 deletions

View File

@@ -23,6 +23,8 @@
#include "painter.h"
#include "graphics.h"
#include <framework/platform/platformwindow.h>
Painter *g_painter = nullptr;
Painter::Painter()
@@ -35,6 +37,7 @@ Painter::Painter()
m_shaderProgram = nullptr;
m_texture = nullptr;
m_alphaWriting = false;
setResolution(g_window.getSize());
}
void Painter::resetState()
@@ -50,11 +53,11 @@ void Painter::resetState()
void Painter::refreshState()
{
updateGlViewport();
updateGlCompositionMode();
updateGlClipRect();
updateGlTexture();
updateGlAlphaWriting();
updateGlViewport();
}
void Painter::saveState()

View File

@@ -20,7 +20,7 @@
* THE SOFTWARE.
*/
#ifndef OPENGL_ES
#if !defined(OPENGL_ES) || OPENGL_ES==1
#include "painterogl1.h"
#include "graphics.h"

View File

@@ -562,6 +562,7 @@ void Application::registerLuaFunctions()
g_lua.bindSingletonFunction("g_graphics", "isPainterEngineAvailable", &Graphics::isPainterEngineAvailable, &g_graphics);
g_lua.bindSingletonFunction("g_graphics", "selectPainterEngine", &Graphics::selectPainterEngine, &g_graphics);
g_lua.bindSingletonFunction("g_graphics", "canCacheBackbuffer", &Graphics::canCacheBackbuffer, &g_graphics);
g_lua.bindSingletonFunction("g_graphics", "canUseShaders", &Graphics::canUseShaders, &g_graphics);
g_lua.bindSingletonFunction("g_graphics", "getPainterEngine", &Graphics::getPainterEngine, &g_graphics);
g_lua.bindSingletonFunction("g_graphics", "getViewportSize", &Graphics::getViewportSize, &g_graphics);
g_lua.bindSingletonFunction("g_graphics", "getVendor", &Graphics::getVendor, &g_graphics);