Commit 21b3492b authored by Robert Menzel's avatar Robert Menzel

quick fixes to compile on llvm on MacOS 10.8

parent 57607c96
......@@ -72,8 +72,15 @@
# define CORRECT_PTR_INCLUDES_FOUND
#endif
#if (defined (__clang__))
// newer llvms on MacOS need this version:
# include <memory>
namespace ptr = std;
# define ACGL_UNIQUE_POINTER_SUPPORTED 1
# define CORRECT_PTR_INCLUDES_FOUND
#endif
#if (!defined(CORRECT_PTR_INCLUDES_FOUND) && ((__GNUC_VERSION__ >= 40400) || defined (__clang__)))
#if (!defined(CORRECT_PTR_INCLUDES_FOUND) && ((__GNUC_VERSION__ >= 40400) ))
// gcc 4.4 or newer without -std=c++0x or clang++
# include <tr1/memory>
namespace ptr = std::tr1;
......
......@@ -28,7 +28,7 @@ namespace OpenGL{
*/
class ShaderParser
{
ACGL_NOT_COPYABLE(ShaderParser)
//ACGL_NOT_COPYABLE(ShaderParser)
public:
ShaderParser( const std::string &_filename );
......
......@@ -106,7 +106,7 @@ public:
: mBuffer( _pBuffer ),
mTarget(_target)
{
mSize = (mBuffer == NULL)?0:mBuffer->getSize( mTarget );
mSize = (!mBuffer)?0:mBuffer->getSize( mTarget );
}
virtual ~Buffer(){}
......@@ -124,7 +124,7 @@ public:
// ==================================================================================================== \/
//! the GL buffer can get changed at any time
void setBufferObject( SharedBufferObject _pBuffer ) { mBuffer = _pBuffer; mSize = (mBuffer == NULL)?0:mBuffer->getSize( mTarget ); }
void setBufferObject( SharedBufferObject _pBuffer ) { mBuffer = _pBuffer; mSize = (!mBuffer)?0:mBuffer->getSize( mTarget ); }
// ===================================================================================================== \/
// ============================================================================================ WRAPPERS \/
......
......@@ -55,9 +55,9 @@ void ACGLRegisterDefaultDebugCallback()
GLint v;
glGetIntegerv( GL_CONTEXT_FLAGS, &v );
if ((v & GL_CONTEXT_FLAG_DEBUG_BIT) != 0) {
debug() << "context was created with debug capabilities" << endl;
debug() << "context was created with KHR_debug flag" << endl;
} else {
debug() << "context was created WITHOUT debug capabilities - registering a debug callback is possible but might not result in getting called even if errors occur!" << endl;
debug() << "context was created WITHOUT KHR_debug flag - registering a debug callback is possible but might not result in getting called even if errors occur!" << endl;
}
glDebugMessageCallback( ACGL_KHR_default_debug_callback, NULL );
......
......@@ -2166,8 +2166,8 @@ void KHR_DEBUG_EMULATOR_DebugMessageInsert(GLenum source, GLenum type, GLuint id
}
void KHR_DEBUG_EMULATOR_DebugMessageCallback(GLDEBUGPROC callback, const void * userParam){
printf("callback registered\n");
fflush(stdout);
//printf("callback registered\n");
//fflush(stdout);
KHR_DEBUG_EMULATOR_callback = callback;
KHR_DEBUG_EMULATOR_userParam = userParam;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment