Move OpenGL headers from API to implementation.
We don't want to expose any OpenGL functions to client code. Because if we do, there is a chance we break client code if we switch implementation (Direct3D).
This commit is contained in:
parent
1dc0ecf563
commit
2a111a237d
13 changed files with 16 additions and 16 deletions
|
|
@ -1,7 +0,0 @@
|
|||
|
||||
#ifndef SPECTRE_OPENGL_H
|
||||
#define SPECTRE_OPENGL_H
|
||||
|
||||
#include <Spectre/Graphics/GL/glad.h>
|
||||
|
||||
#endif /* SPECTRE_OPENGL_H */
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
|
||||
#include <Spectre/System/Log.h>
|
||||
#include <Spectre/Graphics/OpenGL.h>
|
||||
#include <Spectre/Graphics/Renderable.h>
|
||||
#include <Spectre/Graphics/RenderState.h>
|
||||
#include <Spectre/Graphics/ShaderProgram.h>
|
||||
#include <Spectre/Graphics/Texture.h>
|
||||
#include <Spectre/Graphics/BatchRenderer2D.h>
|
||||
#include <Spectre/Math/Math.h>
|
||||
#include <Graphics/GL/gl.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
|
||||
#include <Spectre/Graphics/Texture.h>
|
||||
#include <Spectre/Graphics/OpenGL.h>
|
||||
#include <Spectre/Graphics/Renderable.h>
|
||||
#include <Spectre/Graphics/DefaultRenderer2D.h>
|
||||
#include <Graphics/GL/gl.h>
|
||||
|
||||
namespace sp {
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#ifndef SPECTRE_GRAPHICS_GL_CHECKERROR_H
|
||||
#define SPECTRE_GRAPHICS_GL_CHECKERROR_H
|
||||
|
||||
#include <Spectre/Graphics/OpenGL.h>
|
||||
#include "gl.h"
|
||||
|
||||
#define checkGLError(expr) do { expr; glCheckError(__FILE__, __LINE__, #expr); } while(false)
|
||||
|
||||
|
|
|
|||
7
source/Graphics/GL/gl.h
Normal file
7
source/Graphics/GL/gl.h
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
#ifndef SPECTRE_GRAPHICS_GL_GL_H
|
||||
#define SPECTRE_GRAPHICS_GL_GL_H
|
||||
|
||||
#include "glad.h"
|
||||
|
||||
#endif /* SPECTRE_GRAPHICS_GL_GL_H */
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <Spectre/Graphics/GL/glad.h>
|
||||
#include "glad.h"
|
||||
|
||||
#ifndef GLAD_IMPL_UTIL_C_
|
||||
#define GLAD_IMPL_UTIL_C_
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
#include <Spectre/Graphics.h>
|
||||
#include <Spectre/Graphics/OpenGL.h>
|
||||
#include <Graphics/GL/gl.h>
|
||||
#include <string>
|
||||
|
||||
namespace sp {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
|
||||
#include <fstream>
|
||||
#include <Spectre/System/File.h>
|
||||
#include <Spectre/Graphics/OpenGL.h>
|
||||
#include <Spectre/Graphics/Shader.h>
|
||||
#include <Graphics/GL/gl.h>
|
||||
|
||||
namespace sp {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
|
||||
#include <Spectre/Math/Color.h>
|
||||
#include <Spectre/Graphics/OpenGL.h>
|
||||
#include <Spectre/Graphics/ShaderProgram.h>
|
||||
#include <Spectre/System/File.h>
|
||||
#include <Graphics/GL/gl.h>
|
||||
|
||||
namespace sp {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
#include <Spectre/Graphics/Image.h>
|
||||
#include <Spectre/Graphics/OpenGL.h>
|
||||
#include <Spectre/Graphics/Texture.h>
|
||||
#include <Graphics/GL/gl.h>
|
||||
|
||||
namespace sp {
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
#define GLAD_WGL_H_
|
||||
|
||||
#include <windows.h>
|
||||
#include <Spectre/Graphics/GL/glad.h>
|
||||
#include <Graphics/GL/glad.h>
|
||||
|
||||
#define GLAD_WGL
|
||||
#define GLAD_OPTION_WGL_LOADER
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue