WINTERMUTE: Add functions for pushing and popping matrices

This commit is contained in:
Gunnar Birke 2020-06-02 18:33:21 +02:00 committed by Paweł Kołodziejski
parent 28420144fc
commit 3096d4660c
2 changed files with 12 additions and 0 deletions

View File

@ -172,6 +172,15 @@ void BaseRenderOpenGL3D::resetModelViewTransform() {
glLoadIdentity();
}
void BaseRenderOpenGL3D::pushWorldTransform(const Math::Matrix4 &transform) {
glPushMatrix();
glMultMatrixf(transform.getData());
}
void BaseRenderOpenGL3D::popWorldTransform() {
glPopMatrix();
}
bool BaseRenderOpenGL3D::windowedBlt() {
warning("BaseRenderOpenGL3D::windowedBlt not yet implemented");
return true;

View File

@ -30,6 +30,7 @@
#include "graphics/opengl/system_headers.h"
#include "graphics/opengl/texture.h"
#include "graphics/transform_struct.h"
#include "math/matrix4.h"
namespace Wintermute {
@ -75,6 +76,8 @@ public:
bool setProjection(float fov);
bool setProjection2D();
void resetModelViewTransform();
void pushWorldTransform(const Math::Matrix4 &transform);
void popWorldTransform();
bool windowedBlt() override;
/**