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:
authorCampbell Barton <ideasman42@gmail.com>2012-02-05 06:30:30 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-02-05 06:30:30 +0400
commitd0412a1981266064aab38ca47f5d72ef9192e783 (patch)
tree754a541f99f511cb65c66256b7a8dca7d2673279 /source/gameengine
parent936af71e9755d1f1aab05576dabb7eea73a962c2 (diff)
parent4acab3eb33db20eef89d0159199429c690b0f2df (diff)
svn merge ^/trunk/blender -r43864:43887
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/BlenderRoutines/KX_BlenderGL.cpp4
-rw-r--r--source/gameengine/GamePlayer/common/GPC_RenderTools.cpp4
-rw-r--r--source/gameengine/VideoTexture/ImageViewport.cpp9
3 files changed, 12 insertions, 5 deletions
diff --git a/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp b/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
index 7a99a4a1419..78dcfc8edd9 100644
--- a/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
+++ b/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
@@ -136,8 +136,8 @@ void BL_print_game_line(int fontid, const char* text, int size, int dpi, float*
/* the actual drawing */
glColor4fv(color);
+ BLF_enable(fontid, BLF_MATRIX|BLF_ASPECT|BLF_TEXFILTER);
/* multiply the text matrix by the object matrix */
- BLF_enable(fontid, BLF_MATRIX|BLF_ASPECT);
BLF_matrix(fontid, mat);
/* aspect is the inverse scale that allows you to increase */
@@ -149,7 +149,7 @@ void BL_print_game_line(int fontid, const char* text, int size, int dpi, float*
BLF_position(fontid, 0, 0, 0);
BLF_draw(fontid, (char *)text, 65535);
- BLF_disable(fontid, BLF_MATRIX|BLF_ASPECT);
+ BLF_disable(fontid, BLF_MATRIX|BLF_ASPECT|BLF_TEXFILTER);
}
void BL_print_gamedebug_line(const char* text, int xco, int yco, int width, int height)
diff --git a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
index ffa2cb38b87..b06a9783b50 100644
--- a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
+++ b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
@@ -294,8 +294,8 @@ void GPC_RenderTools::RenderText3D( int fontid,
/* the actual drawing */
glColor3fv(color);
+ BLF_enable(fontid, BLF_MATRIX|BLF_ASPECT|BLF_TEXFILTER);
/* multiply the text matrix by the object matrix */
- BLF_enable(fontid, BLF_MATRIX|BLF_ASPECT);
BLF_matrix(fontid, mat);
/* aspect is the inverse scale that allows you to increase */
@@ -307,7 +307,7 @@ void GPC_RenderTools::RenderText3D( int fontid,
BLF_position(fontid, 0, 0, 0);
BLF_draw(fontid, text, 65535);
- BLF_disable(fontid, BLF_MATRIX|BLF_ASPECT);
+ BLF_disable(fontid, BLF_MATRIX|BLF_ASPECT|BLF_TEXFILTER);
glEnable(GL_DEPTH_TEST);
}
diff --git a/source/gameengine/VideoTexture/ImageViewport.cpp b/source/gameengine/VideoTexture/ImageViewport.cpp
index 036dd893dcb..a9354564d0e 100644
--- a/source/gameengine/VideoTexture/ImageViewport.cpp
+++ b/source/gameengine/VideoTexture/ImageViewport.cpp
@@ -31,6 +31,7 @@ http://www.gnu.org/copyleft/lesser.txt.
#include "GL/glew.h"
+#include "KX_PythonInit.h"
#include "Texture.h"
#include "ImageBase.h"
#include "FilterSource.h"
@@ -41,7 +42,13 @@ http://www.gnu.org/copyleft/lesser.txt.
ImageViewport::ImageViewport (void) : m_alpha(false), m_texInit(false)
{
// get viewport rectangle
- glGetIntegerv(GL_VIEWPORT, m_viewport);
+ RAS_Rect rect = KX_GetActiveEngine()->GetCanvas()->GetWindowArea();
+ m_viewport[0] = rect.GetLeft();
+ m_viewport[1] = rect.GetBottom();
+ m_viewport[2] = rect.GetWidth();
+ m_viewport[3] = rect.GetHeight();
+
+ //glGetIntegerv(GL_VIEWPORT, m_viewport);
// create buffer for viewport image
m_viewportImage = new BYTE [4 * getViewportSize()[0] * getViewportSize()[1]];
// set attributes