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>2013-03-17 00:49:46 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-17 00:49:46 +0400
commitbaf3bb37a9b9322752add6c5b8031aadf96119ac (patch)
treeaaebe10701b1dd6402eca3bc9fc6e69b561d5355
parent9e2db2dad4ee38036a28452039656594f73b4421 (diff)
- ghost-sdl builds again.
- without python builds without warnings. - replace MAXFLOAT -> FLT_MAX in some areas, MAXFLOAT overflows (lager then float range). - add cmake option WITH_GCC_MUDFLAP to enable libmudflap use.
-rw-r--r--CMakeLists.txt13
-rw-r--r--intern/ghost/intern/GHOST_SystemSDL.cpp10
-rw-r--r--intern/ghost/intern/GHOST_SystemSDL.h7
-rw-r--r--intern/ghost/intern/GHOST_WindowSDL.cpp3
-rw-r--r--intern/ghost/intern/GHOST_WindowSDL.h13
-rw-r--r--source/blender/blenkernel/intern/customdata.c4
-rw-r--r--source/blender/bmesh/bmesh_class.h3
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh.c2
-rw-r--r--source/blender/editors/mesh/editmesh_select.c2
-rw-r--r--source/blender/editors/transform/transform_conversions.c8
10 files changed, 45 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a6ab7896ce8..005de70de24 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -278,6 +278,10 @@ mark_as_advanced(WITH_ASSERT_ABORT)
option(WITH_BOOST "Enable features depending no boost" ON)
+if(CMAKE_COMPILER_IS_GNUCC)
+ option(WITH_GCC_MUDFLAP "Enable mudflap" OFF)
+ mark_as_advanced(WITH_GCC_MUDFLAP)
+endif()
if(APPLE)
cmake_minimum_required(VERSION 2.8.8)
@@ -2036,7 +2040,7 @@ if(WITH_PYTHON)
if(WITH_PYTHON_INSTALL AND WITH_PYTHON_INSTALL_NUMPY)
# set but invalid
- # -- disabled until we make numpy bundled with blender - campbell
+ # -- disabled until we make numpy bundled with blender - campbell
if((NOT ${PYTHON_NUMPY_PATH} STREQUAL "") AND (NOT ${PYTHON_NUMPY_PATH} MATCHES NOTFOUND))
# if(NOT EXISTS "${PYTHON_NUMPY_PATH}/numpy")
# message(WARNING "PYTHON_NUMPY_PATH is invalid, numpy not found in '${PYTHON_NUMPY_PATH}' "
@@ -2080,6 +2084,13 @@ if(WITH_PYTHON)
endif()
endif()
+if(WITH_GCC_MUDFLAP)
+ set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -fmudflapth -funwind-tables")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lpthread -lmudflapth -rdynamic")
+ ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_ERROR_MUDFLAP -Wno-error=mudflap)
+ ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_ERROR_MUDFLAP -Wno-error=mudflap)
+endif()
+
# Include warnings first, so its possible to disable them with user defined flags
# eg: -Wno-uninitialized
set(CMAKE_C_FLAGS "${C_WARNINGS} ${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS}")
diff --git a/intern/ghost/intern/GHOST_SystemSDL.cpp b/intern/ghost/intern/GHOST_SystemSDL.cpp
index da1836d88a0..98d52c20ba1 100644
--- a/intern/ghost/intern/GHOST_SystemSDL.cpp
+++ b/intern/ghost/intern/GHOST_SystemSDL.cpp
@@ -27,6 +27,7 @@
#include <assert.h>
#include "GHOST_SystemSDL.h"
+#include "GHOST_WindowSDL.h"
#include "GHOST_WindowManager.h"
@@ -66,14 +67,19 @@ GHOST_SystemSDL::createWindow(const STR_String& title,
GHOST_TUns32 height,
GHOST_TWindowState state,
GHOST_TDrawingContextType type,
- bool stereoVisual,
+ const bool stereoVisual,
+ const bool exclusive,
const GHOST_TUns16 numOfAASamples,
const GHOST_TEmbedderWindowID parentWindow
)
{
GHOST_WindowSDL *window = NULL;
- window = new GHOST_WindowSDL(this, title, left, top, width, height, state, parentWindow, type, stereoVisual, numOfAASamples);
+ window = new GHOST_WindowSDL(this, title,
+ left, top, width, height,
+ state, parentWindow, type,
+ stereoVisual, exclusive,
+ numOfAASamples);
if (window) {
if (GHOST_kWindowStateFullScreen == state) {
diff --git a/intern/ghost/intern/GHOST_SystemSDL.h b/intern/ghost/intern/GHOST_SystemSDL.h
index 776dc2f66a5..5ad4fe09833 100644
--- a/intern/ghost/intern/GHOST_SystemSDL.h
+++ b/intern/ghost/intern/GHOST_SystemSDL.h
@@ -108,9 +108,10 @@ private:
GHOST_TUns32 height,
GHOST_TWindowState state,
GHOST_TDrawingContextType type,
- bool stereoVisual,
- const GHOST_TUns16 numOfAASamples,
- const GHOST_TEmbedderWindowID parentWindow
+ const bool stereoVisual,
+ const bool exclusive = false,
+ const GHOST_TUns16 numOfAASamples = 0,
+ const GHOST_TEmbedderWindowID parentWindow = 0
);
/* SDL specific */
diff --git a/intern/ghost/intern/GHOST_WindowSDL.cpp b/intern/ghost/intern/GHOST_WindowSDL.cpp
index 6641b28a20e..47f41ea40a9 100644
--- a/intern/ghost/intern/GHOST_WindowSDL.cpp
+++ b/intern/ghost/intern/GHOST_WindowSDL.cpp
@@ -41,10 +41,11 @@ GHOST_WindowSDL::GHOST_WindowSDL(GHOST_SystemSDL *system,
const GHOST_TEmbedderWindowID parentWindow,
GHOST_TDrawingContextType type,
const bool stereoVisual,
+ const bool exclusive,
const GHOST_TUns16 numOfAASamples
)
:
- GHOST_Window(width, height, state, type, stereoVisual, numOfAASamples),
+ GHOST_Window(width, height, state, type, stereoVisual, exclusive, numOfAASamples),
m_system(system),
m_invalid_window(false),
m_sdl_custom_cursor(NULL)
diff --git a/intern/ghost/intern/GHOST_WindowSDL.h b/intern/ghost/intern/GHOST_WindowSDL.h
index a39d9878ddd..8260a318cea 100644
--- a/intern/ghost/intern/GHOST_WindowSDL.h
+++ b/intern/ghost/intern/GHOST_WindowSDL.h
@@ -41,6 +41,7 @@ extern "C" {
#endif
class STR_String;
+class GHOST_SystemSDL;
class GHOST_WindowSDL : public GHOST_Window
{
@@ -64,9 +65,10 @@ public:
GHOST_TUns32 width, GHOST_TUns32 height,
GHOST_TWindowState state,
const GHOST_TEmbedderWindowID parentWindow,
- GHOST_TDrawingContextType type,
- const bool stereoVisual,
- const GHOST_TUns16 numOfAASamples
+ GHOST_TDrawingContextType type = GHOST_kDrawingContextTypeNone,
+ const bool stereoVisual = false,
+ const bool exclusive = false,
+ const GHOST_TUns16 numOfAASamples = 0
);
~GHOST_WindowSDL();
@@ -166,6 +168,11 @@ protected:
return GHOST_kSuccess;
}
+ // TODO
+ GHOST_TSuccess beginFullScreen() const { return GHOST_kFailure; }
+
+ GHOST_TSuccess endFullScreen() const { return GHOST_kFailure; }
+
};
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index e43f8312f39..1cefd65bbc5 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -195,7 +195,7 @@ static void layerCopy_bmesh_elem_py_ptr(const void *UNUSED(source), void *dest,
}
#ifndef WITH_PYTHON
-void bpy_bm_generic_invalidate(void *UNUSED(self))
+void bpy_bm_generic_invalidate(struct BPy_BMGeneric *UNUSED(self))
{
/* dummy */
}
@@ -203,8 +203,6 @@ void bpy_bm_generic_invalidate(void *UNUSED(self))
static void layerFree_bmesh_elem_py_ptr(void *data, int count, int size)
{
- extern void bpy_bm_generic_invalidate(void *self);
-
int i;
for (i = 0; i < count; ++i) {
diff --git a/source/blender/bmesh/bmesh_class.h b/source/blender/bmesh/bmesh_class.h
index 6dc0218da93..845785a26d7 100644
--- a/source/blender/bmesh/bmesh_class.h
+++ b/source/blender/bmesh/bmesh_class.h
@@ -252,6 +252,9 @@ enum {
* not have functions clobber them */
};
+struct BPy_BMGeneric;
+extern void bpy_bm_generic_invalidate(struct BPy_BMGeneric *self);
+
/* defines */
#define BM_ELEM_CD_GET_VOID_P(ele, offset) \
(assert(offset != -1), (void *)((char *)(ele)->head.data + (offset)))
diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c
index 3c4fa490477..b9352a25063 100644
--- a/source/blender/bmesh/intern/bmesh_mesh.c
+++ b/source/blender/bmesh/intern/bmesh_mesh.c
@@ -247,8 +247,6 @@ void BM_mesh_free(BMesh *bm)
if (bm->py_handle) {
/* keep this out of 'BM_mesh_data_free' because we want python
* to be able to clear the mesh and maintain access. */
- extern void bpy_bm_generic_invalidate(void *self);
-
bpy_bm_generic_invalidate(bm->py_handle);
bm->py_handle = NULL;
}
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index 534747486f0..3d0101f962b 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -1171,7 +1171,7 @@ static void mouse_mesh_loop(bContext *C, const int mval[2], short extend, short
/* Select the face of eed which is the nearest of mouse. */
BMFace *f, *efa = NULL;
BMIter iterf;
- float best_dist = MAXFLOAT;
+ float best_dist = FLT_MAX;
/* We can't be sure this has already been set... */
ED_view3d_init_mats_rv3d(vc.obedit, vc.rv3d);
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 5c1ba416943..b8a39cae381 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -1293,7 +1293,7 @@ static void calc_distanceCurveVerts(TransData *head, TransData *tail)
}
}
else {
- td->dist = MAXFLOAT;
+ td->dist = FLT_MAX;
td->flag |= TD_NOTCONNECTED;
}
}
@@ -2131,7 +2131,7 @@ static void createTransEditVerts(TransInfo *t)
}
else {
tob->flag |= TD_NOTCONNECTED;
- tob->dist = MAXFLOAT;
+ tob->dist = FLT_MAX;
}
}
@@ -2367,7 +2367,7 @@ static void UVsToTransData(SpaceImage *sima, TransData *td, TransData2D *td2d, f
td->dist = 0.0;
}
else {
- td->dist = MAXFLOAT;
+ td->dist = FLT_MAX;
}
unit_m3(td->mtx);
unit_m3(td->smtx);
@@ -3504,7 +3504,7 @@ static void bezt_to_transdata(TransData *td, TransData2D *td2d, AnimData *adt, B
td->dist = 0.0f;
}
else
- td->dist = MAXFLOAT;
+ td->dist = FLT_MAX;
if (ishandle)
td->flag |= TD_NOTIMESNAP;