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
CXX = g++
SHELL := /bin/sh
CXX := g++
# 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 \
-I/usr/include/SDL2 \
-Iext/stb_libs \
-Iext/tinygltf
EXAMPLEDIR = examples
OBJDIR = build
SRCDIR = src
LIBNAME = libTangerine.a
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))
EXAMPLEDIR := examples
OBJDIR := build
SRCDIR := src
LIBNAME := libTangerine.a
# NOTE: optional library settings
CXXFLAGS += -DTANGERINE_GL_DEBUG_QUIET
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)

12
include/tangerine.h

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

1
src/shader.cpp

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

2
src/tangerine.cpp

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

Loading…
Cancel
Save