Reworked material

This commit is contained in:
Robert 2021-01-29 17:28:48 +01:00
parent 5c51de37a6
commit bf751c6c69
12 changed files with 251 additions and 32 deletions

View file

@ -12,12 +12,12 @@
#pragma warning(disable : 4251)
#include <memory>
#include <iostream>
#include <stdexcept>
#include <string>
#include <glad/glad.h>
#ifdef OGLU_WIN32
#ifdef OGLU_BUILD_DLL
#define OGLU_API __declspec(dllexport)
@ -28,4 +28,30 @@
#define OGLU_API
#endif //OGLU_WIN32
namespace oglu
{
class NullBuffer : public std::streambuf
{
public:
int overflow(int c) { return c; }
};
class NullStream : public std::ostream
{
public:
NullStream() : std::ostream(&buf) {}
private:
NullBuffer buf;
};
extern OGLU_API NullStream cnull;
}
#ifndef NDEBUG
#define OGLU_ERROR_STREAM std::cerr
#else
#define OGLU_ERROR_STREAM oglu::cnull
#endif
#endif