소스 검색

Bug fixing

Panagiotis Christopoulos Charitos 15 년 전
부모
커밋
bf54125e84
6개의 변경된 파일10개의 추가작업 그리고 21개의 파일을 삭제
  1. 2 14
      shaders/DpGeneric.glsl
  2. 3 1
      src/Core/Logger.cpp
  3. 2 2
      src/Core/Logger.h
  4. 1 2
      src/Main.cpp
  5. 1 1
      src/Util/Assert.h
  6. 1 1
      src/Util/Exception.h

+ 2 - 14
shaders/DpGeneric.glsl

@@ -1,10 +1,8 @@
 /// Control defines:
-/// ALPHA_TESTING, HARDWARE_SKINNING
+/// ALPHA_TESTING
 
 #pragma anki vertShaderBegins
 
-#pragma anki include "shaders/hw_skinning.glsl"
-
 uniform mat4 modelViewProjectionMat;
 
 in vec3 position;
@@ -20,17 +18,7 @@ void main()
 		vTexCoords = texCoords;
 	#endif
 
-	#if defined(HARDWARE_SKINNING)
-		mat3 _rot_;
-		vec3 _tsl_;
-
-		HWSkinning(_rot_, _tsl_);
-
-		vec3 _posLocalSpace_ = (_rot_ * position) + _tsl_;
-		gl_Position = modelViewProjectionMat * vec4(_posLocalSpace_, 1.0);
-	#else
-	  gl_Position = modelViewProjectionMat * vec4(position, 1.0);
-	#endif
+	gl_Position = modelViewProjectionMat * vec4(position, 1.0);
 }
 
 #pragma anki fragShaderBegins

+ 3 - 1
src/Core/Logger.cpp

@@ -96,7 +96,9 @@ void Logger::append(const char* cstr, int len)
 
 	if(len > STREAM_SIZE - 1)
 	{
-		return;
+		const char ERR[] = "**logger buffer overflow**";
+		cstr = ERR;
+		len = sizeof(ERR);
 	}
 
 	int charsLeft = &streamBuf[STREAM_SIZE - 1] - sptr; // Leaving an extra char for the '\0'

+ 2 - 2
src/Core/Logger.h

@@ -50,7 +50,7 @@ class Logger
 		void write(const char* file, int line, const char* func, const char* msg);
 
 	private:
-		static const int STREAM_SIZE = 512;
+		static const int STREAM_SIZE = 2048;
 		boost::array<char, STREAM_SIZE> streamBuf;
 		char* sptr; ///< Pointer to @ref streamBuf
 		Signal sig; ///< The signal
@@ -135,7 +135,7 @@ inline LoggerSender setSender(const char* file, int line, const char* func)
 //======================================================================================================================
 
 #define LOGGER_MESSAGE(x) \
-	LoggerSingleton::getInstance()  << setSender(__FILE__, __LINE__, __PRETTY_FUNCTION__) << x << endl;
+	LoggerSingleton::getInstance()  << setSender(__FILE__, __LINE__, __func__) << x << endl;
 
 #define INFO(x) LOGGER_MESSAGE("Info: " << x)
 

+ 1 - 2
src/Main.cpp

@@ -157,8 +157,7 @@ void init()
 
 	// Pentagram
 	ModelNode* pentagram = new ModelNode();
-	//pentagram->init("models/pentagram/pentagram.mdl");
-	pentagram->init("models/imp/imp.mdl");
+	pentagram->init("models/pentagram/pentagram.mdl");
 	pentagram->setLocalTransform(Transform(Vec3(2, 0, 0), Mat3::getIdentity(), 1.0));
 
 

+ 1 - 1
src/Util/Assert.h

@@ -9,7 +9,7 @@
 #if DEBUG_ENABLED == 1
 	#define ASSERT(x) \
 		if(!(x)) { \
-			std::cerr << "(" << __FILE__ << ":" << __LINE__ << " " << __PRETTY_FUNCTION__ << ") " << \
+			std::cerr << "(" << __FILE__ << ":" << __LINE__ << " " << __func__ << ") " << \
 			             "Assertion failed: " << #x << std::endl; \
 			asm("int $3"); \
 			abort(); \

+ 1 - 1
src/Util/Exception.h

@@ -33,7 +33,7 @@ class Exception: public std::exception
 // Macros                                                                                                              =
 //======================================================================================================================
 
-#define EXCEPTION(x) Exception(std::string() + x, __FILE__, __LINE__, __PRETTY_FUNCTION__)
+#define EXCEPTION(x) Exception(std::string() + x, __FILE__, __LINE__, __func__)
 
 
 #endif