Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/gameengine/GamePlayer/common')
-rw-r--r--source/gameengine/GamePlayer/common/GPC_Canvas.cpp10
-rw-r--r--source/gameengine/GamePlayer/common/GPC_Canvas.h1
2 files changed, 10 insertions, 1 deletions
diff --git a/source/gameengine/GamePlayer/common/GPC_Canvas.cpp b/source/gameengine/GamePlayer/common/GPC_Canvas.cpp
index b5c1c29238a..058454ca352 100644
--- a/source/gameengine/GamePlayer/common/GPC_Canvas.cpp
+++ b/source/gameengine/GamePlayer/common/GPC_Canvas.cpp
@@ -131,7 +131,15 @@ void GPC_Canvas::SetViewPort(int x1, int y1, int x2, int y2)
glViewport(x1,y1,x2-x1 + 1,y2-y1 + 1);
glScissor(x1,y1,x2-x1 + 1,y2-y1 + 1);
-};
+}
+
+void GPC_Canvas::UpdateViewPort(int x1, int y1, int x2, int y2)
+{
+ m_viewport[0] = x1;
+ m_viewport[1] = y1;
+ m_viewport[2] = x2;
+ m_viewport[3] = y2;
+}
const int *GPC_Canvas::GetViewPort()
{
diff --git a/source/gameengine/GamePlayer/common/GPC_Canvas.h b/source/gameengine/GamePlayer/common/GPC_Canvas.h
index ec5375c0e13..00c5911a8b4 100644
--- a/source/gameengine/GamePlayer/common/GPC_Canvas.h
+++ b/source/gameengine/GamePlayer/common/GPC_Canvas.h
@@ -155,6 +155,7 @@ public:
);
void SetViewPort(int x1, int y1, int x2, int y2);
+ void UpdateViewPort(int x1, int y1, int x2, int y2);
const int *GetViewPort();
void ClearColor(float r, float g, float b, float a);