Rename src/debuglogger -> src/gl-debug

This commit is contained in:
Jonas Kulla 2014-11-29 17:47:40 +01:00
parent bc31922c33
commit c1aab96454
5 changed files with 22 additions and 22 deletions

View File

@ -126,7 +126,7 @@ set(MAIN_HEADERS
src/tilemap.h src/tilemap.h
src/flashmap.h src/flashmap.h
src/graphics.h src/graphics.h
src/debuglogger.h src/gl-debug.h
src/global-ibo.h src/global-ibo.h
src/exception.h src/exception.h
src/filesystem.h src/filesystem.h
@ -180,7 +180,7 @@ set(MAIN_SOURCE
src/tilemap.cpp src/tilemap.cpp
src/autotiles.cpp src/autotiles.cpp
src/graphics.cpp src/graphics.cpp
src/debuglogger.cpp src/gl-debug.cpp
src/etc.cpp src/etc.cpp
src/config.cpp src/config.cpp
src/settingsmenu.cpp src/settingsmenu.cpp

View File

@ -105,7 +105,7 @@ HEADERS += \
src/tilemap.h \ src/tilemap.h \
src/flashmap.h \ src/flashmap.h \
src/graphics.h \ src/graphics.h \
src/debuglogger.h \ src/gl-debug.h \
src/global-ibo.h \ src/global-ibo.h \
src/exception.h \ src/exception.h \
src/filesystem.h \ src/filesystem.h \
@ -158,7 +158,7 @@ SOURCES += \
src/tilemap.cpp \ src/tilemap.cpp \
src/autotiles.cpp \ src/autotiles.cpp \
src/graphics.cpp \ src/graphics.cpp \
src/debuglogger.cpp \ src/gl-debug.cpp \
src/etc.cpp \ src/etc.cpp \
src/config.cpp \ src/config.cpp \
src/settingsmenu.cpp \ src/settingsmenu.cpp \

View File

@ -1,5 +1,5 @@
/* /*
** debuglogger.cpp ** gl-debug.cpp
** **
** This file is part of mkxp. ** This file is part of mkxp.
** **
@ -19,25 +19,25 @@
** along with mkxp. If not, see <http://www.gnu.org/licenses/>. ** along with mkxp. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "debuglogger.h" #include "gl-debug.h"
#include "debugwriter.h" #include "debugwriter.h"
#include <iostream> #include <iostream>
#include "gl-fun.h" #include "gl-fun.h"
struct DebugLoggerPrivate struct GLDebugLoggerPrivate
{ {
std::ostream *stream; std::ostream *stream;
DebugLoggerPrivate(const char *logFilename) GLDebugLoggerPrivate(const char *logFilename)
{ {
(void) logFilename; (void) logFilename;
stream = &std::clog; stream = &std::clog;
} }
~DebugLoggerPrivate() ~GLDebugLoggerPrivate()
{ {
} }
@ -62,8 +62,8 @@ static void APIENTRY arbDebugFunc(GLenum source,
const GLchar* message, const GLchar* message,
const void* userParam) const void* userParam)
{ {
DebugLoggerPrivate *p = GLDebugLoggerPrivate *p =
static_cast<DebugLoggerPrivate*>(const_cast<void*>(userParam)); static_cast<GLDebugLoggerPrivate*>(const_cast<void*>(userParam));
(void) source; (void) source;
(void) type; (void) type;
@ -75,9 +75,9 @@ static void APIENTRY arbDebugFunc(GLenum source,
p->writeLine(message); p->writeLine(message);
} }
DebugLogger::DebugLogger(const char *filename) GLDebugLogger::GLDebugLogger(const char *filename)
{ {
p = new DebugLoggerPrivate(filename); p = new GLDebugLoggerPrivate(filename);
if (gl.DebugMessageCallback) if (gl.DebugMessageCallback)
gl.DebugMessageCallback(arbDebugFunc, p); gl.DebugMessageCallback(arbDebugFunc, p);
@ -85,7 +85,7 @@ DebugLogger::DebugLogger(const char *filename)
Debug() << "DebugLogger: no debug extensions found"; Debug() << "DebugLogger: no debug extensions found";
} }
DebugLogger::~DebugLogger() GLDebugLogger::~GLDebugLogger()
{ {
delete p; delete p;
} }

View File

@ -1,5 +1,5 @@
/* /*
** debuglogger.h ** gl-debug.h
** **
** This file is part of mkxp. ** This file is part of mkxp.
** **
@ -27,16 +27,16 @@
#include <stdio.h> #include <stdio.h>
#include <algorithm> #include <algorithm>
struct DebugLoggerPrivate; struct GLDebugLoggerPrivate;
class DebugLogger class GLDebugLogger
{ {
public: public:
DebugLogger(const char *filename = 0); GLDebugLogger(const char *filename = 0);
~DebugLogger(); ~GLDebugLogger();
private: private:
DebugLoggerPrivate *p; GLDebugLoggerPrivate *p;
}; };
#define GL_MARKER(format, ...) \ #define GL_MARKER(format, ...) \

View File

@ -33,7 +33,7 @@
#include "sharedstate.h" #include "sharedstate.h"
#include "eventthread.h" #include "eventthread.h"
#include "debuglogger.h" #include "gl-debug.h"
#include "debugwriter.h" #include "debugwriter.h"
#include "exception.h" #include "exception.h"
#include "gl-fun.h" #include "gl-fun.h"
@ -105,7 +105,7 @@ int rgssThreadFun(void *userdata)
SDL_GL_SetSwapInterval(threadData->config.vsync ? 1 : 0); SDL_GL_SetSwapInterval(threadData->config.vsync ? 1 : 0);
DebugLogger dLogger; GLDebugLogger dLogger;
/* Setup AL context */ /* Setup AL context */
ALCdevice *alcDev = alcOpenDevice(0); ALCdevice *alcDev = alcOpenDevice(0);