Browse Source

add TANGERINE_GL_DEBUG_QUIET environment option

main
cinnaboot 2 years ago
parent
commit
ea075247f4
  1. 5
      include/GLDebug.h
  2. 13
      include/tangerine.h

5
include/GLDebug.h

@ -92,6 +92,11 @@ openglDebugCallback(GLenum source,
if (id == 131185)
return;
#ifdef TANGERINE_GL_DEBUG_QUIET
if (type != GL_DEBUG_TYPE_ERROR)
return;
#endif
std::cout << "message id: " << id << ", "
<< ((type == GL_DEBUG_TYPE_ERROR) ? "Error" : "Debug")
<< (type == GL_DEBUG_TYPE_ERROR ? "** GL Error **" : "")

13
include/tangerine.h

@ -86,6 +86,13 @@
#include "util.h"
// NOTE: can set TANGERINE_GL_DEBUG_QUIET in your application to disable extra
// debug messages from openGL
#ifndef TANGERINE_GL_DEBUG_QUIET
#define TANGERINE_GL_DEBUG_NOISY
#endif
struct SDLHandles
{
SDL_Window* window;
@ -94,9 +101,6 @@ struct SDLHandles
u32 SDL_flags;
};
// TODO: node/tree structure for entities
struct Node;
struct RenderGroup
{
ShaderProgram* shader;
@ -106,7 +110,10 @@ struct RenderGroup
char* name;
};
// TODO: node/tree structure for entities
#if 0
struct Node;
struct Scene
{
MemoryArena* rg_arena;

Loading…
Cancel
Save