mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-11 17:17:42 +03:00
Cleaning up some includes.
This commit is contained in:
@@ -10,6 +10,7 @@ using namespace EE::Math;
|
||||
|
||||
#include <eepp/system/bitop.hpp>
|
||||
#include <eepp/system/colors.hpp>
|
||||
#include <eepp/system/cpack.hpp>
|
||||
#include <eepp/system/ciostream.hpp>
|
||||
#include <eepp/system/ciostreamfile.hpp>
|
||||
#include <eepp/system/ciostreammemory.hpp>
|
||||
|
||||
@@ -13,7 +13,6 @@ using namespace EE::Window;
|
||||
#include <eepp/graphics/csubtexture.hpp>
|
||||
#include <eepp/graphics/cfont.hpp>
|
||||
#include <eepp/graphics/cprimitives.hpp>
|
||||
#include <eepp/graphics/glhelper.hpp>
|
||||
using namespace EE::Graphics;
|
||||
|
||||
#include <eepp/gaming/clight.hpp>
|
||||
|
||||
@@ -3,242 +3,6 @@
|
||||
|
||||
#include <eepp/base.hpp>
|
||||
|
||||
#ifdef EE_64BIT
|
||||
#define GL_FP GL_DOUBLE
|
||||
#else
|
||||
#define GL_FP GL_FLOAT
|
||||
#endif
|
||||
|
||||
#if ( EE_PLATFORM == EE_PLATFORM_WIN || EE_PLATFORM == EE_PLATFORM_MACOSX || defined( EE_X11_PLATFORM ) ) && !defined( EE_GLES )
|
||||
#define EE_GLEW_AVAILABLE
|
||||
#endif
|
||||
|
||||
#ifndef EE_GLES
|
||||
//! GL2 and GL3 ( PC platform )
|
||||
|
||||
#ifdef EE_GLEW_AVAILABLE
|
||||
#include <eepp/helper/glew/glew.h>
|
||||
#else
|
||||
#ifndef GL_GLEXT_PROTOTYPES
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if EE_PLATFORM == EE_PLATFORM_MACOSX
|
||||
#include <OpenGL/gl.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
|
||||
#ifndef EE_GLEW_AVAILABLE
|
||||
#if defined( EE_X11_PLATFORM ) || EE_PLATFORM == EE_PLATFORM_WIN
|
||||
#include <GL/glext.h>
|
||||
#elif EE_PLATFORM == EE_PLATFORM_MACOSX
|
||||
#include <OpenGL/glext.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#else
|
||||
//! Mobile platform ( Android / iPhone / Maemo )
|
||||
|
||||
#ifdef EE_GLES_BOTH
|
||||
#if EE_PLATFORM == EE_PLATFORM_IOS
|
||||
#include <OpenGLES/ES2/gl.h>
|
||||
#include <OpenGLES/ES2/glext.h>
|
||||
#else
|
||||
#include <GLES2/gl2.h>
|
||||
#include <GLES2/gl2ext.h>
|
||||
#endif
|
||||
|
||||
#define EE_GLES1_LATE_INCLUDE
|
||||
#else
|
||||
//! GLES2 ( programmable pipeline )
|
||||
#ifdef EE_GLES2
|
||||
#if EE_PLATFORM == EE_PLATFORM_IOS
|
||||
#include <OpenGLES/ES2/gl.h>
|
||||
#include <OpenGLES/ES2/glext.h>
|
||||
#else
|
||||
#include <GLES2/gl2.h>
|
||||
#include <GLES2/gl2ext.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//! GLES1 ( fixed pipeline )
|
||||
#ifdef EE_GLES1
|
||||
#if EE_PLATFORM == EE_PLATFORM_IOS
|
||||
#include <OpenGLES/ES1/gl.h>
|
||||
#include <OpenGLES/ES1/glext.h>
|
||||
#else
|
||||
#include <GLES/gl.h>
|
||||
|
||||
#ifndef GL_GLEXT_PROTOTYPES
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#endif
|
||||
|
||||
#include <GLES/glext.h>
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef EE_GLES
|
||||
typedef GLfloat GLdouble;
|
||||
typedef char GLchar;
|
||||
|
||||
#define glDeleteBuffersARB glDeleteBuffers
|
||||
#define glGenBuffersARB glGenBuffers
|
||||
#define glBindBufferARB glBindBuffer
|
||||
#define glBufferDataARB glBufferData
|
||||
#define glBufferSubDataARB glBufferSubData
|
||||
#endif
|
||||
|
||||
/// Wrap GLES2 functions
|
||||
#if defined( EE_GLES2 )
|
||||
|
||||
#define glCheckFramebufferStatusEXT glCheckFramebufferStatus
|
||||
#define glDeleteFramebuffersEXT glDeleteFramebuffers
|
||||
#define glGenFramebuffersEXT glGenFramebuffers
|
||||
#define glGenRenderbuffersEXT glGenRenderbuffers
|
||||
#define glBindFramebufferEXT glBindFramebuffer
|
||||
#define glRenderbufferStorageEXT glRenderbufferStorage
|
||||
#define glBindRenderbufferEXT glBindRenderbuffer
|
||||
#define glFramebufferRenderbufferEXT glFramebufferRenderbuffer
|
||||
#define glFramebufferTexture2DEXT glFramebufferTexture2D
|
||||
#define glVertexAttribPointerARB glVertexAttribPointer
|
||||
|
||||
#endif
|
||||
|
||||
/// Exclusive only when its compiling only for GLES2
|
||||
#if ( defined( EE_GLES2 ) && !defined( EE_GLES1 ) ) || defined( EE_GLES_BOTH )
|
||||
|
||||
#define GL_MODELVIEW 0x1700
|
||||
#define GL_PROJECTION 0x1701
|
||||
#define GL_TEXTURE 0x1702
|
||||
#define GL_MODELVIEW_MATRIX 0x0BA6
|
||||
#define GL_PROJECTION_MATRIX 0x0BA7
|
||||
#define GL_TEXTURE_MATRIX 0x0BA8
|
||||
#define GL_VERTEX_ARRAY 0x8074
|
||||
#define GL_NORMAL_ARRAY 0x8075
|
||||
#define GL_COLOR_ARRAY 0x8076
|
||||
#define GL_INDEX_ARRAY 0x8077
|
||||
#define GL_TEXTURE_COORD_ARRAY 0x8078
|
||||
#define GL_EDGE_FLAG_ARRAY 0x8079
|
||||
#define GL_LINE 0x1B01
|
||||
#define GL_FILL 0x1B02
|
||||
#define GL_LINE_SMOOTH 0x0B20
|
||||
#define GL_LIGHTING 0x0B50
|
||||
#define GL_CLIP_PLANE0 0x3000
|
||||
#define GL_CLIP_PLANE1 0x3001
|
||||
#define GL_CLIP_PLANE2 0x3002
|
||||
#define GL_CLIP_PLANE3 0x3003
|
||||
#define GL_CLIP_PLANE4 0x3004
|
||||
#define GL_CLIP_PLANE5 0x3005
|
||||
#define GL_POINT_SPRITE 0x8861
|
||||
#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
|
||||
|
||||
#define glBlendFuncSeparateEXT glBlendFuncSeparate
|
||||
|
||||
#endif
|
||||
|
||||
#if defined( EE_GLES1 ) && !defined( EE_GLES2 ) || defined( EE_GLES_BOTH )
|
||||
|
||||
#define glOrtho glOrthof
|
||||
#define glClipPlane glClipPlanef
|
||||
#define glFrustum glFrustumf
|
||||
|
||||
#define GL_COORD_REPLACE GL_COORD_REPLACE_OES
|
||||
#define GL_COMBINE_ARB GL_COMBINE
|
||||
|
||||
#endif
|
||||
|
||||
/// Exclusive when its compiling only for GLES1
|
||||
#if defined( EE_GLES1 ) && !defined( EE_GLES2 )
|
||||
|
||||
#define GL_POINT_SPRITE GL_POINT_SPRITE_OES
|
||||
|
||||
#define glCheckFramebufferStatusEXT glCheckFramebufferStatusOES
|
||||
#define glDeleteFramebuffersEXT glDeleteFramebuffersOES
|
||||
#define glGenFramebuffersEXT glGenFramebuffersOES
|
||||
#define glGenRenderbuffersEXT glGenRenderbuffersOES
|
||||
#define glBindFramebufferEXT glBindFramebufferOES
|
||||
#define glRenderbufferStorageEXT glRenderbufferStorageOES
|
||||
#define glBindRenderbufferEXT glBindRenderbufferOES
|
||||
#define glFramebufferRenderbufferEXT glFramebufferRenderbufferOES
|
||||
#define glFramebufferTexture2DEXT glFramebufferTexture2DOES
|
||||
#define glBlendFuncSeparateEXT glBlendFuncSeparateOES
|
||||
|
||||
#define GL_FRAMEBUFFER GL_FRAMEBUFFER_OES
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACEGL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES
|
||||
#define GL_FRAMEBUFFER_COMPLETE GL_FRAMEBUFFER_COMPLETE_OES
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES
|
||||
#define GL_FRAMEBUFFER_UNSUPPORTED GL_FRAMEBUFFER_UNSUPPORTED_OES
|
||||
#define GL_FRAMEBUFFER_BINDING GL_FRAMEBUFFER_BINDING_OES
|
||||
|
||||
#define GL_RENDERBUFFER GL_RENDERBUFFER_OES
|
||||
#define GL_RENDERBUFFER_WIDTH GL_RENDERBUFFER_WIDTH_OES
|
||||
#define GL_RENDERBUFFER_HEIGHT GL_RENDERBUFFER_HEIGHT_OES
|
||||
#define GL_RENDERBUFFER_INTERNAL_FORMAT GL_RENDERBUFFER_INTERNAL_FORMAT_OES
|
||||
#define GL_RENDERBUFFER_RED_SIZE GL_RENDERBUFFER_RED_SIZE_OES
|
||||
#define GL_RENDERBUFFER_GREEN_SIZE GL_RENDERBUFFER_GREEN_SIZE_OES
|
||||
#define GL_RENDERBUFFER_BLUE_SIZE GL_RENDERBUFFER_BLUE_SIZE_OES
|
||||
#define GL_RENDERBUFFER_ALPHA_SIZE GL_RENDERBUFFER_ALPHA_SIZE_OES
|
||||
#define GL_RENDERBUFFER_DEPTH_SIZE GL_RENDERBUFFER_DEPTH_SIZE_OES
|
||||
#define GL_RENDERBUFFER_STENCIL_SIZE GL_RENDERBUFFER_STENCIL_SIZE_OES
|
||||
#define GL_RENDERBUFFER_BINDING GL_RENDERBUFFER_BINDING_OES
|
||||
|
||||
#define GL_FRAGMENT_SHADER 0x8B30
|
||||
#define GL_VERTEX_SHADER 0x8B31
|
||||
|
||||
#ifndef GL_UNSIGNED_INT
|
||||
#define GL_UNSIGNED_INT GL_UNSIGNED_INT_24_8_OES
|
||||
#endif
|
||||
|
||||
#define GL_LINE 0x1B01
|
||||
#define GL_FILL 0x1B02
|
||||
|
||||
#define GL_STREAM_DRAW 0x88E0
|
||||
#define GL_STREAM_READ 0x88E1
|
||||
#define GL_STREAM_COPY 0x88E2
|
||||
#define GL_STATIC_DRAW 0x88E4
|
||||
#define GL_STATIC_READ 0x88E5
|
||||
#define GL_STATIC_COPY 0x88E6
|
||||
#define GL_DYNAMIC_DRAW 0x88E8
|
||||
#define GL_DYNAMIC_READ 0x88E9
|
||||
#define GL_DYNAMIC_COPY 0x88EA
|
||||
|
||||
#ifdef GL_DEPTH_COMPONENT32_OES
|
||||
#define GL_DEPTH_COMPONENT GL_DEPTH_COMPONENT32_OES
|
||||
#else
|
||||
#define GL_DEPTH_COMPONENT GL_DEPTH_COMPONENT16_OES
|
||||
#endif
|
||||
|
||||
#define GL_DEPTH_ATTACHMENT GL_DEPTH_ATTACHMENT_OES
|
||||
#define GL_COLOR_ATTACHMENT0 GL_COLOR_ATTACHMENT0_OES
|
||||
|
||||
#define GL_SUBTRACT_ARB GL_SUBTRACT
|
||||
#define GL_ADD_SIGNED_ARB GL_ADD_SIGNED
|
||||
#define GL_INTERPOLATE_ARB GL_INTERPOLATE
|
||||
#define GL_DOT3_RGB_ARB GL_DOT3_RGB
|
||||
#define GL_DOT3_RGBA_ARB GL_DOT3_RGBA
|
||||
|
||||
#define GL_CONSTANT_ARB GL_CONSTANT
|
||||
#define GL_PRIMARY_COLOR_ARB GL_PRIMARY_COLOR
|
||||
#define GL_PREVIOUS_ARB GL_PREVIOUS
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef EE_GLES
|
||||
#define EE_QUAD_VERTEX 6
|
||||
#else
|
||||
#define EE_QUAD_VERTEX 4
|
||||
#endif
|
||||
|
||||
#include <eepp/math/vector2.hpp>
|
||||
#include <eepp/math/vector3.hpp>
|
||||
#include <eepp/math/rect.hpp>
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#define EE_GRAPHICSCBATCHRENDERER_H
|
||||
|
||||
#include <eepp/graphics/base.hpp>
|
||||
#include <eepp/graphics/glhelper.hpp>
|
||||
|
||||
namespace EE { namespace Graphics {
|
||||
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
#include <eepp/graphics/base.hpp>
|
||||
#include <eepp/graphics/ctexture.hpp>
|
||||
#include <eepp/window/cview.hpp>
|
||||
#include <eepp/window/cwindow.hpp>
|
||||
|
||||
namespace EE { namespace Window { class cWindow; } }
|
||||
|
||||
using namespace EE::Window;
|
||||
|
||||
|
||||
@@ -62,8 +62,8 @@ class EE_API cShader {
|
||||
void Reload();
|
||||
protected:
|
||||
friend class cRendererGL3;
|
||||
GLuint mGLId;
|
||||
GLenum mType;
|
||||
Uint32 mGLId;
|
||||
Uint32 mType;
|
||||
std::string mFilename;
|
||||
std::string mCompileLog;
|
||||
std::string mSource;
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
#include <eepp/graphics/base.hpp>
|
||||
#include <eepp/graphics/fonthelper.hpp>
|
||||
#include <eepp/graphics/glhelper.hpp>
|
||||
|
||||
namespace EE { namespace Graphics {
|
||||
|
||||
|
||||
@@ -16,10 +16,10 @@ namespace EE { namespace Graphics {
|
||||
class EE_API cTexture : public cImage {
|
||||
public:
|
||||
/** Set the OpenGL Texture Id (texture handle) */
|
||||
void Handle( const Uint32& texture ) { mTexture = texture; }
|
||||
void Handle( const int& texture ) { mTexture = texture; }
|
||||
|
||||
/** @return The OpenGL Texture Id (texture handle) */
|
||||
Uint32 Handle() const { return mTexture; }
|
||||
int Handle() const { return mTexture; }
|
||||
|
||||
/** @return The hash of the filename */
|
||||
const Uint32& HashName() const;
|
||||
@@ -233,7 +233,7 @@ class EE_API cTexture : public cImage {
|
||||
|
||||
Uint32 mId;
|
||||
Uint32 mTexId;
|
||||
GLint mTexture;
|
||||
int mTexture;
|
||||
|
||||
eeUint mImgWidth;
|
||||
eeUint mImgHeight;
|
||||
@@ -243,7 +243,7 @@ class EE_API cTexture : public cImage {
|
||||
EE_CLAMP_MODE mClampMode;
|
||||
EE_TEX_FILTER mFilter;
|
||||
|
||||
GLint mInternalFormat;
|
||||
int mInternalFormat;
|
||||
|
||||
void ApplyClampMode();
|
||||
|
||||
|
||||
@@ -113,13 +113,13 @@ class EE_API cTextureFactory : protected cMutex {
|
||||
* @return The real current texture id (OpenGL Texture Id)
|
||||
* @param TextureUnit The Texture Unit binded
|
||||
*/
|
||||
GLint GetCurrentTexture( const Uint32& TextureUnit = 0 ) const;
|
||||
int GetCurrentTexture( const Uint32& TextureUnit = 0 ) const;
|
||||
|
||||
/** Set the current internal texture id. This will set the TexId as the current texture binded.
|
||||
* @param TexId The internal Texture Id
|
||||
* @param TexId The real current texture id (OpenGL Texture Id)
|
||||
* @param TextureUnit The Texture Unit binded
|
||||
*/
|
||||
void SetCurrentTexture( const GLint& TexId, const Uint32& TextureUnit );
|
||||
void SetCurrentTexture( const int& TexId, const Uint32& TextureUnit );
|
||||
|
||||
/** Returns the number of textures loaded */
|
||||
Uint32 GetNumTextures() const { return (Uint32)mTextures.size(); }
|
||||
@@ -200,7 +200,7 @@ class EE_API cTextureFactory : protected cMutex {
|
||||
|
||||
cTextureFactory();
|
||||
|
||||
GLint mCurrentTexture[ EE_MAX_TEXTURE_UNITS ];
|
||||
int mCurrentTexture[ EE_MAX_TEXTURE_UNITS ];
|
||||
|
||||
EE_BLEND_MODE mLastBlend;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ class EE_API cVertexBufferVBO : public cVertexBuffer {
|
||||
|
||||
bool mTextured;
|
||||
|
||||
GLuint mVAO;
|
||||
Uint32 mVAO;
|
||||
|
||||
Uint32 mElementHandle;
|
||||
|
||||
|
||||
@@ -1,6 +1,37 @@
|
||||
#ifndef EE_GRAPHICSGLHELPER_HPP
|
||||
#define EE_GRAPHICSGLHELPER_HPP
|
||||
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
/** Just for reference */
|
||||
enum EEGL_ARRAY_STATES {
|
||||
EEGL_VERTEX_ARRAY = 0,
|
||||
EEGL_NORMAL_ARRAY,
|
||||
EEGL_COLOR_ARRAY,
|
||||
EEGL_ARRAY_STATES_COUNT,
|
||||
EEGL_TEXTURE_COORD_ARRAY
|
||||
};
|
||||
|
||||
enum EEGL_extensions {
|
||||
EEGL_ARB_texture_non_power_of_two = 0,
|
||||
EEGL_ARB_point_parameters,
|
||||
EEGL_ARB_point_sprite,
|
||||
EEGL_ARB_shading_language_100,
|
||||
EEGL_ARB_shader_objects,
|
||||
EEGL_ARB_vertex_shader,
|
||||
EEGL_ARB_fragment_shader,
|
||||
EEGL_EXT_framebuffer_object,
|
||||
EEGL_ARB_multitexture,
|
||||
EEGL_EXT_texture_compression_s3tc,
|
||||
EEGL_ARB_vertex_buffer_object,
|
||||
EEGL_ARB_vertex_array_object,
|
||||
EEGL_EXT_blend_func_separate
|
||||
};
|
||||
|
||||
enum EEGL_version {
|
||||
GLv_2,
|
||||
GLv_3,
|
||||
GLv_ES1,
|
||||
GLv_ES2,
|
||||
GLv_default
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
242
include/eepp/graphics/opengl.hpp
Normal file
242
include/eepp/graphics/opengl.hpp
Normal file
@@ -0,0 +1,242 @@
|
||||
#ifndef EE_OPENGL_HPP
|
||||
#define EE_OPENGL_HPP
|
||||
|
||||
#ifdef EE_64BIT
|
||||
#define GL_FP GL_DOUBLE
|
||||
#else
|
||||
#define GL_FP GL_FLOAT
|
||||
#endif
|
||||
|
||||
#if ( EE_PLATFORM == EE_PLATFORM_WIN || EE_PLATFORM == EE_PLATFORM_MACOSX || defined( EE_X11_PLATFORM ) ) && !defined( EE_GLES )
|
||||
#define EE_GLEW_AVAILABLE
|
||||
#endif
|
||||
|
||||
#ifndef EE_GLES
|
||||
//! GL2 and GL3 ( PC platform )
|
||||
|
||||
#ifdef EE_GLEW_AVAILABLE
|
||||
#include <eepp/helper/glew/glew.h>
|
||||
#else
|
||||
#ifndef GL_GLEXT_PROTOTYPES
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if EE_PLATFORM == EE_PLATFORM_MACOSX
|
||||
#include <OpenGL/gl.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
|
||||
#ifndef EE_GLEW_AVAILABLE
|
||||
#if defined( EE_X11_PLATFORM ) || EE_PLATFORM == EE_PLATFORM_WIN
|
||||
#include <GL/glext.h>
|
||||
#elif EE_PLATFORM == EE_PLATFORM_MACOSX
|
||||
#include <OpenGL/glext.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#else
|
||||
//! Mobile platform ( Android / iPhone / Maemo )
|
||||
|
||||
#ifdef EE_GLES_BOTH
|
||||
#if EE_PLATFORM == EE_PLATFORM_IOS
|
||||
#include <OpenGLES/ES2/gl.h>
|
||||
#include <OpenGLES/ES2/glext.h>
|
||||
#else
|
||||
#include <GLES2/gl2.h>
|
||||
#include <GLES2/gl2ext.h>
|
||||
#endif
|
||||
|
||||
#define EE_GLES1_LATE_INCLUDE
|
||||
#else
|
||||
//! GLES2 ( programmable pipeline )
|
||||
#ifdef EE_GLES2
|
||||
#if EE_PLATFORM == EE_PLATFORM_IOS
|
||||
#include <OpenGLES/ES2/gl.h>
|
||||
#include <OpenGLES/ES2/glext.h>
|
||||
#else
|
||||
#include <GLES2/gl2.h>
|
||||
#include <GLES2/gl2ext.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//! GLES1 ( fixed pipeline )
|
||||
#ifdef EE_GLES1
|
||||
#if EE_PLATFORM == EE_PLATFORM_IOS
|
||||
#include <OpenGLES/ES1/gl.h>
|
||||
#include <OpenGLES/ES1/glext.h>
|
||||
#else
|
||||
#include <GLES/gl.h>
|
||||
|
||||
#ifndef GL_GLEXT_PROTOTYPES
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#endif
|
||||
|
||||
#include <GLES/glext.h>
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef EE_GLES
|
||||
typedef GLfloat GLdouble;
|
||||
typedef char GLchar;
|
||||
|
||||
#define glDeleteBuffersARB glDeleteBuffers
|
||||
#define glGenBuffersARB glGenBuffers
|
||||
#define glBindBufferARB glBindBuffer
|
||||
#define glBufferDataARB glBufferData
|
||||
#define glBufferSubDataARB glBufferSubData
|
||||
#endif
|
||||
|
||||
/// Wrap GLES2 functions
|
||||
#if defined( EE_GLES2 )
|
||||
|
||||
#define glCheckFramebufferStatusEXT glCheckFramebufferStatus
|
||||
#define glDeleteFramebuffersEXT glDeleteFramebuffers
|
||||
#define glGenFramebuffersEXT glGenFramebuffers
|
||||
#define glGenRenderbuffersEXT glGenRenderbuffers
|
||||
#define glBindFramebufferEXT glBindFramebuffer
|
||||
#define glRenderbufferStorageEXT glRenderbufferStorage
|
||||
#define glBindRenderbufferEXT glBindRenderbuffer
|
||||
#define glFramebufferRenderbufferEXT glFramebufferRenderbuffer
|
||||
#define glFramebufferTexture2DEXT glFramebufferTexture2D
|
||||
#define glVertexAttribPointerARB glVertexAttribPointer
|
||||
|
||||
#endif
|
||||
|
||||
/// Exclusive only when its compiling only for GLES2
|
||||
#if ( defined( EE_GLES2 ) && !defined( EE_GLES1 ) ) || defined( EE_GLES_BOTH )
|
||||
|
||||
#define GL_MODELVIEW 0x1700
|
||||
#define GL_PROJECTION 0x1701
|
||||
#define GL_TEXTURE 0x1702
|
||||
#define GL_MODELVIEW_MATRIX 0x0BA6
|
||||
#define GL_PROJECTION_MATRIX 0x0BA7
|
||||
#define GL_TEXTURE_MATRIX 0x0BA8
|
||||
#define GL_VERTEX_ARRAY 0x8074
|
||||
#define GL_NORMAL_ARRAY 0x8075
|
||||
#define GL_COLOR_ARRAY 0x8076
|
||||
#define GL_INDEX_ARRAY 0x8077
|
||||
#define GL_TEXTURE_COORD_ARRAY 0x8078
|
||||
#define GL_EDGE_FLAG_ARRAY 0x8079
|
||||
#define GL_LINE 0x1B01
|
||||
#define GL_FILL 0x1B02
|
||||
#define GL_LINE_SMOOTH 0x0B20
|
||||
#define GL_LIGHTING 0x0B50
|
||||
#define GL_CLIP_PLANE0 0x3000
|
||||
#define GL_CLIP_PLANE1 0x3001
|
||||
#define GL_CLIP_PLANE2 0x3002
|
||||
#define GL_CLIP_PLANE3 0x3003
|
||||
#define GL_CLIP_PLANE4 0x3004
|
||||
#define GL_CLIP_PLANE5 0x3005
|
||||
#define GL_POINT_SPRITE 0x8861
|
||||
#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
|
||||
|
||||
#define glBlendFuncSeparateEXT glBlendFuncSeparate
|
||||
|
||||
#endif
|
||||
|
||||
#if defined( EE_GLES1 ) && !defined( EE_GLES2 ) || defined( EE_GLES_BOTH )
|
||||
|
||||
#define glOrtho glOrthof
|
||||
#define glClipPlane glClipPlanef
|
||||
#define glFrustum glFrustumf
|
||||
|
||||
#define GL_COORD_REPLACE GL_COORD_REPLACE_OES
|
||||
#define GL_COMBINE_ARB GL_COMBINE
|
||||
|
||||
#endif
|
||||
|
||||
/// Exclusive when its compiling only for GLES1
|
||||
#if defined( EE_GLES1 ) && !defined( EE_GLES2 )
|
||||
|
||||
#define GL_POINT_SPRITE GL_POINT_SPRITE_OES
|
||||
|
||||
#define glCheckFramebufferStatusEXT glCheckFramebufferStatusOES
|
||||
#define glDeleteFramebuffersEXT glDeleteFramebuffersOES
|
||||
#define glGenFramebuffersEXT glGenFramebuffersOES
|
||||
#define glGenRenderbuffersEXT glGenRenderbuffersOES
|
||||
#define glBindFramebufferEXT glBindFramebufferOES
|
||||
#define glRenderbufferStorageEXT glRenderbufferStorageOES
|
||||
#define glBindRenderbufferEXT glBindRenderbufferOES
|
||||
#define glFramebufferRenderbufferEXT glFramebufferRenderbufferOES
|
||||
#define glFramebufferTexture2DEXT glFramebufferTexture2DOES
|
||||
#define glBlendFuncSeparateEXT glBlendFuncSeparateOES
|
||||
|
||||
#define GL_FRAMEBUFFER GL_FRAMEBUFFER_OES
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACEGL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES
|
||||
#define GL_FRAMEBUFFER_COMPLETE GL_FRAMEBUFFER_COMPLETE_OES
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES
|
||||
#define GL_FRAMEBUFFER_UNSUPPORTED GL_FRAMEBUFFER_UNSUPPORTED_OES
|
||||
#define GL_FRAMEBUFFER_BINDING GL_FRAMEBUFFER_BINDING_OES
|
||||
|
||||
#define GL_RENDERBUFFER GL_RENDERBUFFER_OES
|
||||
#define GL_RENDERBUFFER_WIDTH GL_RENDERBUFFER_WIDTH_OES
|
||||
#define GL_RENDERBUFFER_HEIGHT GL_RENDERBUFFER_HEIGHT_OES
|
||||
#define GL_RENDERBUFFER_INTERNAL_FORMAT GL_RENDERBUFFER_INTERNAL_FORMAT_OES
|
||||
#define GL_RENDERBUFFER_RED_SIZE GL_RENDERBUFFER_RED_SIZE_OES
|
||||
#define GL_RENDERBUFFER_GREEN_SIZE GL_RENDERBUFFER_GREEN_SIZE_OES
|
||||
#define GL_RENDERBUFFER_BLUE_SIZE GL_RENDERBUFFER_BLUE_SIZE_OES
|
||||
#define GL_RENDERBUFFER_ALPHA_SIZE GL_RENDERBUFFER_ALPHA_SIZE_OES
|
||||
#define GL_RENDERBUFFER_DEPTH_SIZE GL_RENDERBUFFER_DEPTH_SIZE_OES
|
||||
#define GL_RENDERBUFFER_STENCIL_SIZE GL_RENDERBUFFER_STENCIL_SIZE_OES
|
||||
#define GL_RENDERBUFFER_BINDING GL_RENDERBUFFER_BINDING_OES
|
||||
|
||||
#define GL_FRAGMENT_SHADER 0x8B30
|
||||
#define GL_VERTEX_SHADER 0x8B31
|
||||
|
||||
#ifndef GL_UNSIGNED_INT
|
||||
#define GL_UNSIGNED_INT GL_UNSIGNED_INT_24_8_OES
|
||||
#endif
|
||||
|
||||
#define GL_LINE 0x1B01
|
||||
#define GL_FILL 0x1B02
|
||||
|
||||
#define GL_STREAM_DRAW 0x88E0
|
||||
#define GL_STREAM_READ 0x88E1
|
||||
#define GL_STREAM_COPY 0x88E2
|
||||
#define GL_STATIC_DRAW 0x88E4
|
||||
#define GL_STATIC_READ 0x88E5
|
||||
#define GL_STATIC_COPY 0x88E6
|
||||
#define GL_DYNAMIC_DRAW 0x88E8
|
||||
#define GL_DYNAMIC_READ 0x88E9
|
||||
#define GL_DYNAMIC_COPY 0x88EA
|
||||
|
||||
#ifdef GL_DEPTH_COMPONENT32_OES
|
||||
#define GL_DEPTH_COMPONENT GL_DEPTH_COMPONENT32_OES
|
||||
#else
|
||||
#define GL_DEPTH_COMPONENT GL_DEPTH_COMPONENT16_OES
|
||||
#endif
|
||||
|
||||
#define GL_DEPTH_ATTACHMENT GL_DEPTH_ATTACHMENT_OES
|
||||
#define GL_COLOR_ATTACHMENT0 GL_COLOR_ATTACHMENT0_OES
|
||||
|
||||
#define GL_SUBTRACT_ARB GL_SUBTRACT
|
||||
#define GL_ADD_SIGNED_ARB GL_ADD_SIGNED
|
||||
#define GL_INTERPOLATE_ARB GL_INTERPOLATE
|
||||
#define GL_DOT3_RGB_ARB GL_DOT3_RGB
|
||||
#define GL_DOT3_RGBA_ARB GL_DOT3_RGBA
|
||||
|
||||
#define GL_CONSTANT_ARB GL_CONSTANT
|
||||
#define GL_PRIMARY_COLOR_ARB GL_PRIMARY_COLOR
|
||||
#define GL_PREVIOUS_ARB GL_PREVIOUS
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef EE_GLES
|
||||
#define EE_QUAD_VERTEX 6
|
||||
#else
|
||||
#define EE_QUAD_VERTEX 4
|
||||
#endif
|
||||
|
||||
#include <eepp/graphics/glhelper.hpp>
|
||||
|
||||
#endif
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <eepp/graphics/renderer/base.hpp>
|
||||
#include <eepp/graphics/cshaderprogram.hpp>
|
||||
#include <eepp/graphics/opengl.hpp>
|
||||
|
||||
namespace EE { namespace Graphics {
|
||||
|
||||
@@ -10,39 +11,6 @@ namespace EE { namespace Graphics {
|
||||
#define EE_MAX_PLANES 6
|
||||
#endif
|
||||
|
||||
/** Just for reference */
|
||||
enum EEGL_ARRAY_STATES {
|
||||
EEGL_VERTEX_ARRAY = 0,
|
||||
EEGL_NORMAL_ARRAY,
|
||||
EEGL_COLOR_ARRAY,
|
||||
EEGL_ARRAY_STATES_COUNT,
|
||||
EEGL_TEXTURE_COORD_ARRAY
|
||||
};
|
||||
|
||||
enum EEGL_extensions {
|
||||
EEGL_ARB_texture_non_power_of_two = 0,
|
||||
EEGL_ARB_point_parameters,
|
||||
EEGL_ARB_point_sprite,
|
||||
EEGL_ARB_shading_language_100,
|
||||
EEGL_ARB_shader_objects,
|
||||
EEGL_ARB_vertex_shader,
|
||||
EEGL_ARB_fragment_shader,
|
||||
EEGL_EXT_framebuffer_object,
|
||||
EEGL_ARB_multitexture,
|
||||
EEGL_EXT_texture_compression_s3tc,
|
||||
EEGL_ARB_vertex_buffer_object,
|
||||
EEGL_ARB_vertex_array_object,
|
||||
EEGL_EXT_blend_func_separate
|
||||
};
|
||||
|
||||
enum EEGL_version {
|
||||
GLv_2,
|
||||
GLv_3,
|
||||
GLv_ES1,
|
||||
GLv_ES2,
|
||||
GLv_default
|
||||
};
|
||||
|
||||
class cRendererGL;
|
||||
class cRendererGL3;
|
||||
class cRendererGLES2;
|
||||
|
||||
@@ -78,7 +78,7 @@ typedef cpBB cBB;
|
||||
|
||||
#ifdef PHYSICS_RENDERER_ENABLED
|
||||
|
||||
static const GLfloat pillVAR[] = {
|
||||
static const float pillVAR[] = {
|
||||
0.0000f, 1.0000f, 1.0f,
|
||||
0.2588f, 0.9659f, 1.0f,
|
||||
0.5000f, 0.8660f, 1.0f,
|
||||
@@ -107,7 +107,7 @@ static const GLfloat pillVAR[] = {
|
||||
-0.2588f, 0.9659f, 0.0f,
|
||||
0.0000f, 1.0000f, 0.0f,
|
||||
};
|
||||
static const int pillVAR_count = sizeof(pillVAR)/sizeof(GLfloat)/3;
|
||||
static const int pillVAR_count = sizeof(pillVAR)/sizeof(float)/3;
|
||||
|
||||
inline eeColorA ColorFromPointer(void *ptr) {
|
||||
unsigned long val = (long)ptr;
|
||||
@@ -120,11 +120,11 @@ inline eeColorA ColorFromPointer(void *ptr) {
|
||||
val = (val+0xfd7046c5) + (val<<3);
|
||||
val = (val^0xb55a4f09) ^ (val>>16);
|
||||
|
||||
GLubyte r = (val>>0) & 0xFF;
|
||||
GLubyte g = (val>>8) & 0xFF;
|
||||
GLubyte b = (val>>16) & 0xFF;
|
||||
unsigned char r = (val>>0) & 0xFF;
|
||||
unsigned char g = (val>>8) & 0xFF;
|
||||
unsigned char b = (val>>16) & 0xFF;
|
||||
|
||||
GLubyte max = r>g ? (r>b ? r : b) : (g>b ? g : b);
|
||||
unsigned char max = r>g ? (r>b ? r : b) : (g>b ? g : b);
|
||||
|
||||
const int mult = 127;
|
||||
const int add = 63;
|
||||
@@ -141,11 +141,11 @@ inline eeColorA ColorForShape( cpShape *shape, cpSpace *space ) {
|
||||
|
||||
if(body){
|
||||
if(cpBodyIsSleeping(body)){
|
||||
GLfloat v = 0.25f;
|
||||
float v = 0.25f;
|
||||
nc = (int)( v * 255 );
|
||||
return eeColorA( nc, nc, nc, 255 );
|
||||
} else if(body->CP_PRIVATE(node).idleTime > space->sleepTimeThreshold) {
|
||||
GLfloat v = 0.9f;
|
||||
float v = 0.9f;
|
||||
nc = (int)( v * 255 );
|
||||
return eeColorA( nc, nc, nc, 255 );
|
||||
}
|
||||
@@ -154,7 +154,7 @@ inline eeColorA ColorForShape( cpShape *shape, cpSpace *space ) {
|
||||
return ColorFromPointer( shape );
|
||||
}
|
||||
|
||||
static const GLfloat springVAR[] = {
|
||||
static const float springVAR[] = {
|
||||
0.00f, 0.0f,
|
||||
0.20f, 0.0f,
|
||||
0.25f, 3.0f,
|
||||
@@ -171,7 +171,7 @@ static const GLfloat springVAR[] = {
|
||||
0.80f, 0.0f,
|
||||
1.00f, 0.0f,
|
||||
};
|
||||
static const int springVAR_count = sizeof(springVAR)/sizeof(GLfloat)/2;
|
||||
static const int springVAR_count = sizeof(springVAR)/sizeof(float)/2;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ using namespace EE::Window;
|
||||
#include <eepp/graphics/csprite.hpp>
|
||||
#include <eepp/graphics/cfont.hpp>
|
||||
#include <eepp/graphics/cprimitives.hpp>
|
||||
#include <eepp/graphics/glhelper.hpp>
|
||||
using namespace EE::Graphics;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -15,7 +15,7 @@ using namespace EE::Math;
|
||||
using namespace EE::System;
|
||||
|
||||
#include <eepp/graphics/renders.hpp>
|
||||
#include <eepp/graphics/glhelper.hpp>
|
||||
#include <eepp/graphics/opengl.hpp>
|
||||
using namespace EE::Graphics;
|
||||
|
||||
#if EE_PLATFORM == EE_PLATFORM_WIN
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <eepp/window/base.hpp>
|
||||
#include <eepp/window/cwindow.hpp>
|
||||
#include <list>
|
||||
|
||||
namespace EE { namespace System { class cIniFile; } }
|
||||
namespace EE { namespace Window { namespace Backend { class cBackend; } } }
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <eepp/window/inputevent.hpp>
|
||||
#include <eepp/window/cjoystickmanager.hpp>
|
||||
#include <eepp/window/cinputfinger.hpp>
|
||||
#include <list>
|
||||
|
||||
namespace EE { namespace Window {
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by Qt Creator 2.6.0, 2012-12-04T15:52:52. -->
|
||||
<!-- Written by Qt Creator 2.6.0, 2012-12-05T02:08:05. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
|
||||
@@ -128,7 +128,6 @@
|
||||
../../include/eepp/graphics/vbohelper.hpp
|
||||
../../include/eepp/graphics/renders.hpp
|
||||
../../include/eepp/graphics/pixelperfect.hpp
|
||||
../../include/eepp/graphics/glhelper.hpp
|
||||
../../include/eepp/graphics/fonthelper.hpp
|
||||
../../include/eepp/graphics/cvertexbuffervbo.hpp
|
||||
../../include/eepp/graphics/cvertexbufferogl.hpp
|
||||
@@ -569,3 +568,4 @@
|
||||
../../src/eepp/window/backend/SDL2/cbackendsdl.cpp
|
||||
../../include/eepp/system/filesystem.hpp
|
||||
../../src/eepp/system/filesystem.cpp
|
||||
../../include/eepp/graphics/glhelper.hpp
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <eepp/gaming/cisomap.hpp>
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
|
||||
namespace EE { namespace Gaming {
|
||||
|
||||
|
||||
@@ -8,12 +8,14 @@
|
||||
|
||||
#include <eepp/system/cpackmanager.hpp>
|
||||
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
#include <eepp/graphics/cprimitives.hpp>
|
||||
#include <eepp/graphics/ctextureatlasmanager.hpp>
|
||||
#include <eepp/graphics/ctextureatlasloader.hpp>
|
||||
#include <eepp/ui/cuithememanager.hpp>
|
||||
using namespace EE::Graphics;
|
||||
|
||||
#include <eepp/ui/cuithememanager.hpp>
|
||||
|
||||
namespace EE { namespace Gaming {
|
||||
|
||||
cMap::cMap() :
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <eepp/graphics/ctexture.hpp>
|
||||
#include <eepp/graphics/ctexturefactory.hpp>
|
||||
#include <eepp/graphics/cglobalbatchrenderer.hpp>
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
|
||||
namespace EE { namespace Graphics {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <eepp/graphics/cconsole.hpp>
|
||||
#include <eepp/graphics/glhelper.hpp>
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
#include <eepp/audio/caudiolistener.hpp>
|
||||
#include <eepp/window/cinput.hpp>
|
||||
#include <eepp/window/cengine.hpp>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <eepp/graphics/cfont.hpp>
|
||||
#include <eepp/graphics/cfontmanager.hpp>
|
||||
#include <eepp/graphics/cglobalbatchrenderer.hpp>
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
|
||||
namespace EE { namespace Graphics {
|
||||
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
#include <eepp/graphics/ctexturefactory.hpp>
|
||||
#include <eepp/graphics/cglobalbatchrenderer.hpp>
|
||||
#include <eepp/window/cengine.hpp>
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
#include <eepp/graphics/cframebufferfbo.hpp>
|
||||
#include <eepp/graphics/cframebufferpbuffer.hpp>
|
||||
#include <eepp/graphics/cframebuffermanager.hpp>
|
||||
#include <eepp/window/cwindow.hpp>
|
||||
using namespace EE::Graphics::Private;
|
||||
|
||||
namespace EE { namespace Graphics {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <eepp/graphics/cframebufferfbo.hpp>
|
||||
#include <eepp/graphics/ctexturefactory.hpp>
|
||||
#include <eepp/window/cengine.hpp>
|
||||
#include <eepp/graphics/glhelper.hpp>
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
|
||||
namespace EE { namespace Graphics {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <eepp/graphics/cparticlesystem.hpp>
|
||||
#include <eepp/graphics/glhelper.hpp>
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
#include <eepp/graphics/ctexturefactory.hpp>
|
||||
#include <eepp/graphics/cbatchrenderer.hpp>
|
||||
#include <eepp/graphics/cglobalbatchrenderer.hpp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <eepp/graphics/cshader.hpp>
|
||||
#include <eepp/graphics/glhelper.hpp>
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
#include <eepp/graphics/renderer/crenderergl3.hpp>
|
||||
#include <eepp/graphics/renderer/crenderergles2.hpp>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <eepp/graphics/cshaderprogram.hpp>
|
||||
#include <eepp/graphics/cshaderprogrammanager.hpp>
|
||||
#include <eepp/graphics/cglobalbatchrenderer.hpp>
|
||||
#include <eepp/graphics/glhelper.hpp>
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
|
||||
namespace EE { namespace Graphics {
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <eepp/graphics/ctextcache.hpp>
|
||||
#include <eepp/graphics/cfont.hpp>
|
||||
#include <eepp/graphics/cglobalbatchrenderer.hpp>
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
|
||||
namespace EE { namespace Graphics {
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <eepp/graphics/ctexturefactory.hpp>
|
||||
#include <eepp/graphics/cglobalbatchrenderer.hpp>
|
||||
#include <eepp/helper/SOIL2/src/SOIL2/SOIL2.h>
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
|
||||
namespace EE { namespace Graphics {
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <eepp/graphics/ctexturefactory.hpp>
|
||||
#include <eepp/graphics/ctextureloader.hpp>
|
||||
#include <eepp/graphics/glhelper.hpp>
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
#include <eepp/graphics/ctexture.hpp>
|
||||
#include <eepp/helper/SOIL2/src/SOIL2/stb_image.h>
|
||||
#include <eepp/helper/SOIL2/src/SOIL2/SOIL2.h>
|
||||
@@ -171,12 +171,12 @@ const bool& cTextureFactory::IsErasing() const {
|
||||
return mErasing;
|
||||
}
|
||||
|
||||
GLint cTextureFactory::GetCurrentTexture( const Uint32& TextureUnit ) const {
|
||||
int cTextureFactory::GetCurrentTexture( const Uint32& TextureUnit ) const {
|
||||
eeASSERT( TextureUnit < EE_MAX_TEXTURE_UNITS );
|
||||
return mCurrentTexture[ TextureUnit ];
|
||||
}
|
||||
|
||||
void cTextureFactory::SetCurrentTexture( const GLint& TexId, const Uint32& TextureUnit ) {
|
||||
void cTextureFactory::SetCurrentTexture( const int& TexId, const Uint32& TextureUnit ) {
|
||||
eeASSERT( TextureUnit < EE_MAX_TEXTURE_UNITS );
|
||||
mCurrentTexture[ TextureUnit ] = TexId;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <eepp/graphics/ctextureloader.hpp>
|
||||
#include <eepp/graphics/ctexture.hpp>
|
||||
#include <eepp/graphics/ctexturefactory.hpp>
|
||||
#include <eepp/graphics/glhelper.hpp>
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
#include <eepp/system/ciostreamfile.hpp>
|
||||
#include <eepp/helper/SOIL2/src/SOIL2/stb_image.h>
|
||||
#include <eepp/helper/SOIL2/src/SOIL2/SOIL2.h>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <eepp/graphics/cvertexbuffer.hpp>
|
||||
#include <eepp/graphics/cvertexbufferogl.hpp>
|
||||
#include <eepp/graphics/cvertexbuffervbo.hpp>
|
||||
#include <eepp/graphics/glhelper.hpp>
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
#include <eepp/graphics/cvertexbuffermanager.hpp>
|
||||
using namespace EE::Graphics::Private;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <eepp/graphics/cvertexbufferogl.hpp>
|
||||
#include <eepp/graphics/glhelper.hpp>
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
|
||||
namespace EE { namespace Graphics {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <eepp/graphics/cvertexbuffervbo.hpp>
|
||||
#include <eepp/graphics/glhelper.hpp>
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
#include <eepp/graphics/renderer/crenderergl3.hpp>
|
||||
|
||||
namespace EE { namespace Graphics {
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#include <eepp/graphics/glhelper.hpp>
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <eepp/physics/constraints/cdampedspring.hpp>
|
||||
|
||||
#ifdef PHYSICS_RENDERER_ENABLED
|
||||
#include <eepp/graphics/glhelper.hpp>
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
#include <eepp/graphics/cglobalbatchrenderer.hpp>
|
||||
using namespace EE::Graphics;
|
||||
#endif
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <eepp/helper/chipmunk/chipmunk_unsafe.h>
|
||||
|
||||
#ifdef PHYSICS_RENDERER_ENABLED
|
||||
#include <eepp/graphics/glhelper.hpp>
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
#include <eepp/graphics/cprimitives.hpp>
|
||||
using namespace EE::Graphics;
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <eepp/ui/cuicontrolanim.hpp>
|
||||
#include <eepp/ui/cuimanager.hpp>
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
|
||||
namespace EE { namespace UI {
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <eepp/ui/cuitextinput.hpp>
|
||||
#include <eepp/ui/cuimanager.hpp>
|
||||
#include <eepp/window/cengine.hpp>
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
|
||||
namespace EE { namespace UI {
|
||||
|
||||
|
||||
@@ -8,17 +8,19 @@
|
||||
#include <SDL/SDL_syswm.h>
|
||||
#endif
|
||||
|
||||
#include <eepp/helper/SOIL2/src/SOIL2/stb_image.h>
|
||||
|
||||
#include <eepp/window/backend/SDL/cclipboardsdl.hpp>
|
||||
#include <eepp/window/backend/SDL/cinputsdl.hpp>
|
||||
#include <eepp/window/backend/SDL/ccursormanagersdl.hpp>
|
||||
#include <eepp/window/platform/platformimpl.hpp>
|
||||
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
#include <eepp/graphics/cglobalbatchrenderer.hpp>
|
||||
#include <eepp/graphics/cshaderprogrammanager.hpp>
|
||||
#include <eepp/graphics/cvertexbuffermanager.hpp>
|
||||
#include <eepp/graphics/cframebuffermanager.hpp>
|
||||
#include <eepp/graphics/ctexturefactory.hpp>
|
||||
#include <eepp/window/platform/platformimpl.hpp>
|
||||
#include <eepp/helper/SOIL2/src/SOIL2/stb_image.h>
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace SDL {
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <eepp/graphics/ctexturefactory.hpp>
|
||||
#include <eepp/window/platform/platformimpl.hpp>
|
||||
#include <eepp/helper/SOIL2/src/SOIL2/stb_image.h>
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace SDL2 {
|
||||
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
#include <eepp/window/backend/SFML/cwindowsfml.hpp>
|
||||
|
||||
#ifdef EE_BACKEND_SFML_ACTIVE
|
||||
|
||||
#include <SFML/Graphics.hpp>
|
||||
|
||||
#include <eepp/window/backend/SFML/cclipboardsfml.hpp>
|
||||
#include <eepp/window/backend/SFML/cinputsfml.hpp>
|
||||
#include <eepp/window/backend/SFML/ccursormanagersfml.hpp>
|
||||
#include <eepp/window/platform/platformimpl.hpp>
|
||||
|
||||
#ifdef EE_BACKEND_SFML_ACTIVE
|
||||
|
||||
#include <SFML/Graphics.hpp>
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace SFML {
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
#ifdef EE_BACKEND_ALLEGRO_ACTIVE
|
||||
|
||||
#include <eepp/helper/SOIL2/src/SOIL2/stb_image.h>
|
||||
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
#include <eepp/graphics/cglobalbatchrenderer.hpp>
|
||||
#include <eepp/graphics/cshaderprogrammanager.hpp>
|
||||
#include <eepp/graphics/cvertexbuffermanager.hpp>
|
||||
@@ -9,6 +12,9 @@
|
||||
#include <eepp/graphics/ctexturefactory.hpp>
|
||||
|
||||
#include <eepp/window/platform/platformimpl.hpp>
|
||||
#include <eepp/window/backend/allegro5/cclipboardal.hpp>
|
||||
#include <eepp/window/backend/allegro5/cinputal.hpp>
|
||||
#include <eepp/window/backend/allegro5/ccursormanageral.hpp>
|
||||
|
||||
#if EE_PLATFORM == EE_PLATFORM_WIN
|
||||
#include <allegro5/allegro_windows.h>
|
||||
@@ -22,11 +28,6 @@
|
||||
#include <allegro5/internal/aintern_system.h>
|
||||
#include <allegro5/internal/aintern_thread.h>
|
||||
|
||||
#include <eepp/window/backend/allegro5/cclipboardal.hpp>
|
||||
#include <eepp/window/backend/allegro5/cinputal.hpp>
|
||||
#include <eepp/window/backend/allegro5/ccursormanageral.hpp>
|
||||
#include <eepp/helper/SOIL2/src/SOIL2/stb_image.h>
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace Al {
|
||||
|
||||
#if defined( EE_X11_PLATFORM )
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <eepp/graphics/cvertexbuffermanager.hpp>
|
||||
#include <eepp/ui/cuimanager.hpp>
|
||||
#include <eepp/audio/caudiolistener.hpp>
|
||||
#include <eepp/graphics/glhelper.hpp>
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
#include <eepp/helper/haikuttf/hkfontmanager.hpp>
|
||||
#include <eepp/physics/cphysicsmanager.hpp>
|
||||
|
||||
|
||||
@@ -2,10 +2,14 @@
|
||||
#include <eepp/window/cclipboard.hpp>
|
||||
#include <eepp/window/cinput.hpp>
|
||||
#include <eepp/window/ccursormanager.hpp>
|
||||
#include <eepp/window/platform/null/cnullimpl.hpp>
|
||||
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
#include <eepp/graphics/ctexturefactory.hpp>
|
||||
#include <eepp/graphics/cglobalbatchrenderer.hpp>
|
||||
#include <eepp/window/platform/null/cnullimpl.hpp>
|
||||
|
||||
#include <eepp/system/filesystem.hpp>
|
||||
|
||||
#include <eepp/helper/SOIL2/src/SOIL2/SOIL2.h>
|
||||
|
||||
#ifdef EE_GLES1_LATE_INCLUDE
|
||||
|
||||
Reference in New Issue
Block a user