]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - plugins/model/model.cpp
Merge commit '173f350be76237a7dee9c00c389dff4e56b3da4c' into garux-merge
[xonotic/netradiant.git] / plugins / model / model.cpp
index defa472aa0fd56503aea26bb1216fab8044062be..5811af6fe1ab30c731b3ff2962c1d41360c33e64 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #include "model.h"
+#include "globaldefs.h"
 
 #include "picomodel.h"
 
@@ -113,7 +114,7 @@ void render( RenderStateFlags state ) const {
        glVertexPointer( 3, GL_FLOAT, sizeof( ArbitraryMeshVertex ), &m_vertices.data()->vertex );
        glDrawElements( GL_TRIANGLES, GLsizei( m_indices.size() ), RenderIndexTypeID, m_indices.data() );
 
-#if defined( _DEBUG )
+#if GDEF_DEBUG
        GLfloat modelview[16];
        glGetFloatv( GL_MODELVIEW_MATRIX, modelview ); // I know this is slow as hell, but hey - we're in _DEBUG
        Matrix4 modelview_inv(
@@ -322,7 +323,7 @@ surfaces_t m_surfaces;
 
 AABB m_aabb_local;
 public:
-Callback m_lightsChanged;
+Callback<void()> m_lightsChanged;
 
 PicoModel(){
        constructNull();
@@ -471,7 +472,7 @@ Cullable& get( NullType<Cullable>){
 void lightsChanged(){
        m_lightList->lightsChanged();
 }
-typedef MemberCaller<PicoModelInstance, &PicoModelInstance::lightsChanged> LightsChangedCaller;
+typedef MemberCaller<PicoModelInstance, void(), &PicoModelInstance::lightsChanged> LightsChangedCaller;
 
 void constructRemaps(){
        ASSERT_MESSAGE( m_skins.size() == m_picomodel.size(), "ERROR" );
@@ -523,9 +524,9 @@ PicoModelInstance( const scene::Path& path, scene::Instance* parent, PicoModel&
 ~PicoModelInstance(){
        destroyRemaps();
 
-       Instance::setTransformChangedCallback( Callback() );
+       Instance::setTransformChangedCallback( Callback<void()>() );
 
-       m_picomodel.m_lightsChanged = Callback();
+       m_picomodel.m_lightsChanged = Callback<void()>();
        GlobalShaderCache().detach( *this );
 }