mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 20:14:54 +02:00
Minor graphics fixes
This commit is contained in:
@@ -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()
|
||||
|
@@ -20,7 +20,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef OPENGL_ES
|
||||
#if !defined(OPENGL_ES) || OPENGL_ES==1
|
||||
|
||||
#include "painterogl1.h"
|
||||
#include "graphics.h"
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user