X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=debugutil.c;h=3c105db2552c10ff14c4ac4b87605e888eba6fe9;hb=41fa7c1142a10c91ebed8352c520f5777454ea03;hp=cd911b94e7bae26c28dcfe1644509c7091d0dff9;hpb=479000461e3b72a2f816589d65d8e017d5244a9f;p=shadowclad.git diff --git a/debugutil.c b/debugutil.c index cd911b9..3c105db 100644 --- a/debugutil.c +++ b/debugutil.c @@ -1,30 +1,31 @@ #include -#include -#include #include -#include +#include +#include + +//#include "assimp_types.h" -char * get_gl_info() { - const char * gl_version = (const char *) glGetString(GL_VERSION); - const char * gl_sl_version = (const char *) glGetString(GL_SHADING_LANGUAGE_VERSION); - const char * gl_renderer = (const char *) glGetString(GL_RENDERER); +char* getGlInfoString() { + const char* glVersion = (const char*) glGetString(GL_VERSION); + const char* glslVersion = (const char*) glGetString(GL_SHADING_LANGUAGE_VERSION); + const char* glRenderer = (const char*) glGetString(GL_RENDERER); - size_t gl_info_length = strlen("OpenGL - GLSL - ") - + strlen(gl_version) - + strlen(gl_sl_version) - + strlen(gl_renderer); + size_t glInfoLength = strlen("OpenGL - GLSL - ") + + strlen(glVersion) + + strlen(glslVersion) + + strlen(glRenderer); - char * gl_info = malloc(gl_info_length + sizeof(char)); - sprintf(gl_info, + char* glInfoString = malloc(glInfoLength + sizeof(char)); + sprintf(glInfoString, "OpenGL %s - GLSL %s - %s", - gl_version, - gl_sl_version, - gl_renderer); + glVersion, + glslVersion, + glRenderer); - return gl_info; + return glInfoString; } - -void print_struct_aiScene(FILE* stream, const struct aiScene* scene) { +/* +void dumpScene(FILE* stream, const AiScene* scene) { if (scene == NULL) { fprintf(stream, "NULL"); return; @@ -44,7 +45,7 @@ void print_struct_aiScene(FILE* stream, const struct aiScene* scene) { (void*) (*scene).mLights); } -void print_struct_aiNode(FILE* stream, const struct aiNode* node) { +void dumpNode(FILE* stream, const AiNode* node) { if (node == NULL) { fprintf(stream, "NULL"); return; @@ -54,3 +55,4 @@ void print_struct_aiNode(FILE* stream, const struct aiNode* node) { (*node).mNumMeshes, (void*) (*node).mMeshes); } +*/