diff options
author | Hamed Zaghaghi <hamed.zaghaghi@gmail.com> | 2008-07-21 03:03:01 +0400 |
---|---|---|
committer | Hamed Zaghaghi <hamed.zaghaghi@gmail.com> | 2008-07-21 03:03:01 +0400 |
commit | 5350d5eb2c306b5ae65aa93df12d2bededd326fd (patch) | |
tree | f53e87175e735756fbf4860a24636bdc64907db1 /source/gameengine/BlenderRoutines | |
parent | 9f5399918176c73fc366c0982738128c71615a77 (diff) |
BGE Bug Fix:#17349, fixes some problems about 2d-filters
Diffstat (limited to 'source/gameengine/BlenderRoutines')
-rw-r--r-- | source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp | 12 | ||||
-rw-r--r-- | source/gameengine/BlenderRoutines/KX_BlenderCanvas.h | 5 |
2 files changed, 17 insertions, 0 deletions
diff --git a/source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp b/source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp index 5f37de24ed6..1604dfe5cce 100644 --- a/source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp +++ b/source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp @@ -101,6 +101,13 @@ int KX_BlenderCanvas::GetHeight( return scrarea_get_win_height(m_area); } +RAS_Rect & +KX_BlenderCanvas:: +GetWindowArea( +){ + return m_area_rect; +} + void KX_BlenderCanvas:: SetViewPort( @@ -112,6 +119,11 @@ SetViewPort( int minx = scrarea_get_win_x(m_area); int miny = scrarea_get_win_y(m_area); + m_area_rect.SetLeft(minx + x1); + m_area_rect.SetBottom(miny + y1); + m_area_rect.SetRight(minx + x2); + m_area_rect.SetTop(miny + y2); + glViewport(minx + x1, miny + y1, vp_width, vp_height); glScissor(minx + x1, miny + y1, vp_width, vp_height); } diff --git a/source/gameengine/BlenderRoutines/KX_BlenderCanvas.h b/source/gameengine/BlenderRoutines/KX_BlenderCanvas.h index b155d39e149..bc202a8558c 100644 --- a/source/gameengine/BlenderRoutines/KX_BlenderCanvas.h +++ b/source/gameengine/BlenderRoutines/KX_BlenderCanvas.h @@ -117,6 +117,10 @@ public: return m_displayarea; }; + RAS_Rect & + GetWindowArea( + ); + void SetViewPort( int x1, int y1, @@ -159,6 +163,7 @@ public: private: /** Blender area the game engine is running within */ struct ScrArea* m_area; + RAS_Rect m_area_rect; }; #endif // __KX_BLENDERCANVAS |