Browse Source

use the new TANGERINE_GL_DEBUG_QUIET in Makefile

main
cinnaboot 2 years ago
parent
commit
4bd4442242
  1. 27
      Makefile
  2. 12
      include/tangerine.h
  3. 1
      src/shader.cpp
  4. 2
      src/tangerine.cpp

27
Makefile

@ -1,21 +1,24 @@
SHELL = /bin/sh SHELL := /bin/sh
CXX = g++ CXX := g++
# NOTE: have to set -O or -O1 here to get warnings for uninitialized variables # NOTE: have to set -O or -O1 here to get warnings for uninitialized variables
CXXFLAGS = -std=c++11 -g -ggdb3 -Wall -O -Wall -Wuninitialized \ CXXFLAGS := -std=c++11 -g -ggdb3 -Wall -O -Wall -Wuninitialized \
-Iinclude \ -Iinclude \
-I/usr/include/SDL2 \ -I/usr/include/SDL2 \
-Iext/stb_libs \ -Iext/stb_libs \
-Iext/tinygltf -Iext/tinygltf
EXAMPLEDIR = examples EXAMPLEDIR := examples
OBJDIR = build OBJDIR := build
SRCDIR = src SRCDIR := src
LIBNAME = libTangerine.a LIBNAME := libTangerine.a
SOURCES = $(wildcard $(SRCDIR)/*.cpp) # NOTE: optional library settings
OBJECTS = $(patsubst $(SRCDIR)/%.cpp, $(OBJDIR)/%.o, $(SOURCES)) CXXFLAGS += -DTANGERINE_GL_DEBUG_QUIET
NDBG_SOURCES = $(wildcard $(SRCDIR)/*.cc)
NDBG_OBJS = $(patsubst $(SRCDIR)/%.cc, $(OBJDIR)/%.o, $(NDBG_SOURCES)) SOURCES := $(wildcard $(SRCDIR)/*.cpp)
OBJECTS := $(patsubst $(SRCDIR)/%.cpp, $(OBJDIR)/%.o, $(SOURCES))
NDBG_SOURCES := $(wildcard $(SRCDIR)/*.cc)
NDBG_OBJS := $(patsubst $(SRCDIR)/%.cc, $(OBJDIR)/%.o, $(NDBG_SOURCES))
all: mkdirs $(LIBNAME) all: mkdirs $(LIBNAME)

12
include/tangerine.h

@ -75,6 +75,11 @@
#include <SDL2/SDL.h> #include <SDL2/SDL.h>
// NOTE: optional compile-time defines:
// TANGERINE_GL_DEBUG_QUIET disable extra debug messages from openGL
#include "asset.h" #include "asset.h"
#include "camera.h" #include "camera.h"
#include "entity.h" #include "entity.h"
@ -86,13 +91,6 @@
#include "util.h" #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 struct SDLHandles
{ {
SDL_Window* window; SDL_Window* window;

1
src/shader.cpp

@ -12,7 +12,6 @@
#include "asset.h" #include "asset.h"
#include "dumbLog.h" #include "dumbLog.h"
#include "dummy_shader.h" #include "dummy_shader.h"
#define GL_DEBUG_IMPLEMENTATION
#include "GLDebug.h" #include "GLDebug.h"
#include "shader.h" #include "shader.h"
#include "util.h" #include "util.h"

2
src/tangerine.cpp

@ -7,6 +7,8 @@
#include "tangerine.h" #include "tangerine.h"
#define UTIL_IMPLEMENTATION #define UTIL_IMPLEMENTATION
#include "util.h" #include "util.h"
#define GL_DEBUG_IMPLEMENTATION
#include "GLDebug.h"
// forward declarations // forward declarations

Loading…
Cancel
Save