diff options
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp | 2 | ||||
-rw-r--r-- | source/gameengine/Converter/BL_BlenderDataConversion.cpp | 2 | ||||
-rw-r--r-- | source/gameengine/GamePlayer/ghost/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/gameengine/GamePlayer/ghost/GPG_Application.cpp | 2 | ||||
-rw-r--r-- | source/gameengine/GamePlayer/ghost/GPG_ghost.cpp | 7 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_Camera.cpp | 49 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_Dome.cpp | 10 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_Light.cpp | 2 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_Light.h | 4 | ||||
-rw-r--r-- | source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLLight.cpp | 1 |
10 files changed, 41 insertions, 39 deletions
diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp index 6e698166fd9..99f3d0639f3 100644 --- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp +++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp @@ -267,7 +267,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c bool profile = (SYS_GetCommandLineInt(syshandle, "show_profile", 0) != 0); bool frameRate = (SYS_GetCommandLineInt(syshandle, "show_framerate", 0) != 0); bool animation_record = (SYS_GetCommandLineInt(syshandle, "animation_record", 0) != 0); - bool displaylists = (SYS_GetCommandLineInt(syshandle, "displaylists", 0) != 0) && GPU_display_list_support(); + bool displaylists = false; // (SYS_GetCommandLineInt(syshandle, "displaylists", 0) != 0) && GPU_display_list_support(); #ifdef WITH_PYTHON bool nodepwarnings = (SYS_GetCommandLineInt(syshandle, "ignore_deprecation_warnings", 0) != 0); #endif diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 4751e60996d..6add30f1131 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -1740,7 +1740,7 @@ static void blenderSceneSetBackground(Scene *blenderscene) for (SETLOOPER(blenderscene, it, base)) { base->object->lay = base->lay; - base->object->flag = base->flag; + BKE_scene_base_flag_sync_from_base(base); } } diff --git a/source/gameengine/GamePlayer/ghost/CMakeLists.txt b/source/gameengine/GamePlayer/ghost/CMakeLists.txt index 577e25d6198..6d6d53b1e17 100644 --- a/source/gameengine/GamePlayer/ghost/CMakeLists.txt +++ b/source/gameengine/GamePlayer/ghost/CMakeLists.txt @@ -43,6 +43,7 @@ set(INC ../../../blender/blenlib ../../../blender/blenloader ../../../blender/blentranslation + ../../../blender/depsgraph ../../../blender/gpu ../../../blender/imbuf ../../../blender/makesdna diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp index 50c34bbadaf..ddb04e9f84d 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp @@ -586,7 +586,7 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode) bool fixed_framerate= (SYS_GetCommandLineInt(syshandle, "fixedtime", (gm->flag & GAME_ENABLE_ALL_FRAMES)) != 0); bool frameRate = (SYS_GetCommandLineInt(syshandle, "show_framerate", 0) != 0); - bool useLists = (SYS_GetCommandLineInt(syshandle, "displaylists", gm->flag & GAME_DISPLAY_LISTS) != 0) && GPU_display_list_support(); + bool useLists = false; // (SYS_GetCommandLineInt(syshandle, "displaylists", gm->flag & GAME_DISPLAY_LISTS) != 0) && GPU_display_list_support(); bool nodepwarnings = (SYS_GetCommandLineInt(syshandle, "ignore_deprecation_warnings", 1) != 0); bool restrictAnimFPS = (gm->flag & GAME_RESTRICT_ANIM_UPDATES) != 0; diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp index 0c206dfce3d..72ab06009b6 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp @@ -68,7 +68,6 @@ extern "C" #include "BKE_appdir.h" #include "BKE_blender.h" -#include "BKE_depsgraph.h" #include "BKE_global.h" #include "BKE_icons.h" #include "BKE_image.h" @@ -81,6 +80,8 @@ extern "C" #include "BKE_text.h" #include "BKE_sound.h" +#include "DEG_depsgraph.h" + #include "IMB_imbuf.h" #include "IMB_moviecache.h" @@ -509,7 +510,7 @@ int main( IMB_init(); BKE_images_init(); BKE_modifier_init(); - DAG_init(); + DEG_register_node_types(); #ifdef WITH_FFMPEG IMB_ffmpeg_init(); @@ -1201,7 +1202,7 @@ int main( IMB_exit(); BKE_images_exit(); - DAG_exit(); + DEG_free_node_types(); IMB_moviecache_destruct(); SYS_DeleteSystem(syshandle); diff --git a/source/gameengine/Ketsji/KX_Camera.cpp b/source/gameengine/Ketsji/KX_Camera.cpp index 89aea80bb67..4a97dc09f62 100644 --- a/source/gameengine/Ketsji/KX_Camera.cpp +++ b/source/gameengine/Ketsji/KX_Camera.cpp @@ -31,7 +31,7 @@ */ -#include "glew-mx.h" +#include "GPU_matrix.h" #include "KX_Camera.h" #include "KX_Scene.h" #include "KX_PythonInit.h" @@ -1048,19 +1048,21 @@ KX_PYMETHODDEF_DOC_O(KX_Camera, getScreenPosition, } const GLint *viewport; - GLdouble win[3]; - GLdouble modelmatrix[16]; - GLdouble projmatrix[16]; + GLfloat vec[3]; + GLfloat win[3]; + GLfloat modelmatrix[4][4]; + GLfloat projmatrix[4][4]; MT_Matrix4x4 m_modelmatrix = this->GetWorldToCamera(); MT_Matrix4x4 m_projmatrix = this->GetProjectionMatrix(); - m_modelmatrix.getValue(modelmatrix); - m_projmatrix.getValue(projmatrix); + vect.getValue(vec); + m_modelmatrix.getValue((float*) modelmatrix); + m_projmatrix.getValue((float*) projmatrix); viewport = KX_GetActiveEngine()->GetCanvas()->GetViewPort(); - gluProject(vect[0], vect[1], vect[2], modelmatrix, projmatrix, viewport, &win[0], &win[1], &win[2]); + gpuProject(vec, modelmatrix, projmatrix, viewport, win); vect[0] = (win[0] - viewport[0]) / viewport[2]; vect[1] = (win[1] - viewport[1]) / viewport[3]; @@ -1087,36 +1089,33 @@ KX_PYMETHODDEF_DOC_VARARGS(KX_Camera, getScreenVect, y = 1.0 - y; //to follow Blender window coordinate system (Top-Down) - MT_Vector3 vect; - MT_Point3 campos, screenpos; - const GLint *viewport; - GLdouble win[3]; - GLdouble modelmatrix[16]; - GLdouble projmatrix[16]; + GLfloat vec[3]; + GLfloat win[3]; + GLfloat modelmatrix[4][4]; + GLfloat projmatrix[4][4]; MT_Matrix4x4 m_modelmatrix = this->GetWorldToCamera(); MT_Matrix4x4 m_projmatrix = this->GetProjectionMatrix(); - m_modelmatrix.getValue(modelmatrix); - m_projmatrix.getValue(projmatrix); + m_modelmatrix.getValue((float*) modelmatrix); + m_projmatrix.getValue((float*) projmatrix); viewport = KX_GetActiveEngine()->GetCanvas()->GetViewPort(); - vect[0] = x * viewport[2]; - vect[1] = y * viewport[3]; - - vect[0] += viewport[0]; - vect[1] += viewport[1]; + vec[0] = x * viewport[2]; + vec[1] = y * viewport[3]; - vect[2] = 0.f; + vec[0] += viewport[0]; + vec[1] += viewport[1]; - gluUnProject(vect[0], vect[1], vect[2], modelmatrix, projmatrix, viewport, &win[0], &win[1], &win[2]); + vec[2] = 0.f; - campos = this->GetCameraLocation(); - screenpos = MT_Point3(win[0], win[1], win[2]); - vect = campos-screenpos; + gpuUnProject(vec, modelmatrix, projmatrix, viewport, win); + MT_Point3 campos = this->GetCameraLocation(); + MT_Point3 screenpos(win[0], win[1], win[2]); + MT_Vector3 vect = campos - screenpos; vect.normalize(); return PyObjectFrom(vect); } diff --git a/source/gameengine/Ketsji/KX_Dome.cpp b/source/gameengine/Ketsji/KX_Dome.cpp index d08372e47d4..7abff85d39c 100644 --- a/source/gameengine/Ketsji/KX_Dome.cpp +++ b/source/gameengine/Ketsji/KX_Dome.cpp @@ -41,7 +41,7 @@ #include "RAS_CameraData.h" #include "BLI_math.h" -#include "glew-mx.h" +#include "GPU_matrix.h" // constructor KX_Dome::KX_Dome ( @@ -1685,7 +1685,7 @@ void KX_Dome::DrawEnvMap(void) glLoadIdentity(); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); - gluLookAt(0.0f,0.0f,1.0f, 0.0f,0.0f,0.0f, 0.0f,1.0f,0.0f); + gpuLookAt(0.0f,0.0f,1.0f, 0.0f,0.0f,0.0f, 0.0f,1.0f,0.0f); glPolygonMode(GL_FRONT, GL_FILL); glShadeModel(GL_SMOOTH); @@ -1830,7 +1830,7 @@ void KX_Dome::DrawDomeFisheye(void) glLoadIdentity(); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); - gluLookAt(0.0f,-1.0f,0.0f, 0.0f,0.0f,0.0f, 0.0f,0.0f,1.0f); + gpuLookAt(0.0f,-1.0f,0.0f, 0.0f,0.0f,0.0f, 0.0f,0.0f,1.0f); if (m_drawingmode == RAS_IRasterizer::KX_WIREFRAME) glPolygonMode(GL_FRONT, GL_LINE); @@ -1913,7 +1913,7 @@ void KX_Dome::DrawPanorama(void) glLoadIdentity(); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); - gluLookAt(0.0f,-1.0f,0.0f, 0.0f,0.0f,0.0f, 0.0f,0.0f,1.0f); + gpuLookAt(0.0f,-1.0f,0.0f, 0.0f,0.0f,0.0f, 0.0f,0.0f,1.0f); if (m_drawingmode == RAS_IRasterizer::KX_WIREFRAME) glPolygonMode(GL_FRONT, GL_LINE); @@ -1981,7 +1981,7 @@ void KX_Dome::DrawDomeWarped(void) glLoadIdentity(); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); - gluLookAt(0.0f, 0.0f, 1.0f, 0.0f,0.0f,0.0f, 0.0f,1.0f,0.0f); + gpuLookAt(0.0f, 0.0f, 1.0f, 0.0f,0.0f,0.0f, 0.0f,1.0f,0.0f); if (m_drawingmode == RAS_IRasterizer::KX_WIREFRAME) glPolygonMode(GL_FRONT, GL_LINE); diff --git a/source/gameengine/Ketsji/KX_Light.cpp b/source/gameengine/Ketsji/KX_Light.cpp index 5f490747c2b..b2a480e99ca 100644 --- a/source/gameengine/Ketsji/KX_Light.cpp +++ b/source/gameengine/Ketsji/KX_Light.cpp @@ -34,6 +34,7 @@ #endif #include <stdio.h> +#include "DNA_scene_types.h" #include "KX_Light.h" #include "KX_Camera.h" @@ -44,7 +45,6 @@ #include "KX_PyMath.h" #include "DNA_object_types.h" -#include "DNA_scene_types.h" #include "DNA_lamp_types.h" #include "BKE_scene.h" diff --git a/source/gameengine/Ketsji/KX_Light.h b/source/gameengine/Ketsji/KX_Light.h index b446acd6e63..469f2d62b76 100644 --- a/source/gameengine/Ketsji/KX_Light.h +++ b/source/gameengine/Ketsji/KX_Light.h @@ -38,7 +38,7 @@ struct GPULamp; struct Scene; -struct Base; +struct BaseLegacy; class KX_Camera; class RAS_IRasterizer; class RAS_ILightObject; @@ -51,7 +51,7 @@ protected: RAS_ILightObject* m_lightobj; class RAS_IRasterizer* m_rasterizer; //needed for registering and replication of lightobj Scene* m_blenderscene; - Base* m_base; + BaseLegacy* m_base; public: KX_LightObject(void* sgReplicationInfo,SG_Callbacks callbacks,RAS_IRasterizer* rasterizer,RAS_ILightObject* lightobj, bool glsl); diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLLight.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLLight.cpp index 69e859f06d9..18254357f85 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLLight.cpp +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLLight.cpp @@ -43,6 +43,7 @@ #include "DNA_lamp_types.h" #include "DNA_scene_types.h" +#include "GPU_lamp.h" #include "GPU_material.h" RAS_OpenGLLight::RAS_OpenGLLight(RAS_OpenGLRasterizer *ras) |