├── doc
├── Add new shader.txt
└── How To.txt
├── include
├── glm
│ ├── gtx
│ │ ├── ocl_type.inl
│ │ ├── vec1.inl
│ │ ├── simd_vec4.hpp
│ │ ├── std_based_type.inl
│ │ ├── number_precision.inl
│ │ ├── unsigned_int.inl
│ │ ├── raw_data.inl
│ │ ├── perpendicular.inl
│ │ ├── projection.inl
│ │ ├── int_10_10_10_2.inl
│ │ ├── normal.inl
│ │ ├── mixed_product.inl
│ │ ├── log_base.inl
│ │ ├── noise.inl
│ │ ├── handed_coordinate_space.inl
│ │ ├── orthonormalize.inl
│ │ ├── matrix_cross_product.inl
│ │ ├── vector_access.inl
│ │ ├── closest_point.inl
│ │ ├── polar_coordinates.inl
│ │ ├── unsigned_int.hpp
│ │ ├── extend.inl
│ │ ├── gradient_paint.inl
│ │ ├── optimum_pow.inl
│ │ ├── vector_angle.inl
│ │ └── component_wise.inl
│ ├── core
│ │ ├── type_half.inl
│ │ ├── func_common.hpp
│ │ ├── func_common.inl
│ │ ├── func_integer.hpp
│ │ ├── type_mat.inl
│ │ ├── type_vec.inl
│ │ ├── intrinsic_exponential.inl
│ │ ├── intrinsic_trigonometric.inl
│ │ ├── type_vec.hpp
│ │ ├── hint.hpp
│ │ ├── dummy.cpp
│ │ ├── type_size.hpp
│ │ ├── _fixes.hpp
│ │ ├── intrinsic_trigonometric.hpp
│ │ └── intrinsic_vector_relational.hpp
│ ├── gtc
│ │ └── type_precision.inl
│ └── CMakeLists.txt
├── tinyxml
│ ├── changes.txt
│ ├── tinystr.cpp
│ ├── premake4.lua
│ └── tinyxmlerror.cpp
├── bullet
│ ├── BulletSoftBody
│ │ └── btSoftBody.cpp
│ ├── BulletCollision
│ │ ├── Gimpact
│ │ │ ├── btGImpactShape.h
│ │ │ ├── btGImpactCollisionAlgorithm.cpp
│ │ │ └── gim_geometry.h
│ │ ├── BroadphaseCollision
│ │ │ ├── btBroadphaseProxy.cpp
│ │ │ ├── btDispatcher.cpp
│ │ │ ├── btCollisionAlgorithm.cpp
│ │ │ ├── btOverlappingPairCallback.h
│ │ │ └── btAxisSweep3.cpp
│ │ ├── NarrowPhaseCollision
│ │ │ ├── btConvexCast.cpp
│ │ │ ├── btConvexPenetrationDepthSolver.h
│ │ │ ├── btMinkowskiPenetrationDepthSolver.h
│ │ │ ├── btGjkEpaPenetrationDepthSolver.h
│ │ │ └── btGjkConvexCast.h
│ │ ├── CollisionShapes
│ │ │ ├── btConcaveShape.cpp
│ │ │ ├── btTriangleCallback.cpp
│ │ │ ├── btTriangleBuffer.cpp
│ │ │ ├── btCollisionMargin.h
│ │ │ ├── btMaterial.h
│ │ │ ├── btEmptyShape.cpp
│ │ │ ├── btBox2dShape.cpp
│ │ │ ├── btTriangleCallback.h
│ │ │ └── btConvexPolyhedron.h
│ │ └── CollisionDispatch
│ │ │ ├── btEmptyCollisionAlgorithm.cpp
│ │ │ ├── btActivatingCollisionAlgorithm.h
│ │ │ ├── btCollisionCreateFunc.h
│ │ │ ├── btCollisionConfiguration.h
│ │ │ ├── btActivatingCollisionAlgorithm.cpp
│ │ │ ├── btInternalEdgeUtility.h
│ │ │ └── btBoxBoxDetector.h
│ ├── vectormath
│ │ └── vmInclude.h
│ ├── BulletDynamics
│ │ ├── Vehicle
│ │ │ ├── btVehicleRaycaster.h
│ │ │ └── btWheelInfo.cpp
│ │ ├── Dynamics
│ │ │ └── btActionInterface.h
│ │ └── Character
│ │ │ └── btCharacterControllerInterface.h
│ └── LinearMath
│ │ ├── btDefaultMotionState.h
│ │ ├── btRandom.h
│ │ ├── btMotionState.h
│ │ ├── btMinMax.h
│ │ └── btGeometryUtil.h
├── srutil
│ └── delegate
│ │ ├── delegate.hpp
│ │ └── detail
│ │ └── make_delegates.pl
└── SFML
│ ├── Graphics
│ ├── BlendMode.hpp
│ └── Export.hpp
│ ├── Audio
│ └── Export.hpp
│ ├── System
│ ├── Export.hpp
│ └── Sleep.hpp
│ ├── Window
│ └── Export.hpp
│ ├── Network
│ ├── Export.hpp
│ └── SocketHandle.hpp
│ ├── Audio.hpp
│ ├── Network.hpp
│ └── Window.hpp
├── tools
├── build_automator.bat
├── premake4.exe
└── README.txt
├── .gitignore
├── data
├── meshes
│ ├── quad.obj
│ └── cube.obj
├── shaders
│ ├── PassthroughFrag.frag
│ ├── MotionBlurVert.vert
│ ├── ReflectionVert.vert
│ ├── ShadowMapVert.vert
│ ├── PassthroughVert.vert
│ ├── DeferredLightingPassVert.vert
│ ├── RefractionVert.vert
│ ├── DeferredGeometryPassVert.vert
│ └── DeferredGeometryPassFrag.frag
└── materials
│ ├── cow.xml
│ ├── red.xml
│ ├── scatter.xml
│ ├── reflective.xml
│ └── refractive.xml
├── libs
├── SFML_2.0
│ ├── Debug
│ │ ├── sfml-main-d.lib
│ │ ├── sfml-audio-s-d.lib
│ │ ├── sfml-system-s-d.lib
│ │ ├── sfml-window-s-d.lib
│ │ ├── sfml-graphics-s-d.lib
│ │ └── sfml-network-s-d.lib
│ └── Release
│ │ ├── sfml-main.lib
│ │ ├── sfml-audio-s.lib
│ │ ├── sfml-system-s.lib
│ │ ├── sfml-window-s.lib
│ │ ├── sfml-graphics-s.lib
│ │ └── sfml-network-s.lib
└── bullet_2.79
│ ├── Release
│ ├── LinearMath.lib
│ ├── BulletCollision.lib
│ ├── BulletDynamics.lib
│ └── BulletSoftBody.lib
│ └── Debug
│ ├── LinearMath_Debug.lib
│ ├── BulletCollision_Debug.lib
│ ├── BulletDynamics_Debug.lib
│ └── BulletSoftBody_Debug.lib
├── src
├── OpenGL
│ ├── GLTexture.h
│ ├── GLUniformBlock.h
│ ├── GLView.h
│ ├── GLState.h
│ ├── Programs
│ │ ├── GLProgram_Passthrough.h
│ │ ├── GLProgram.cpp
│ │ ├── GLProgram.h
│ │ ├── GLProgramDatabase.h
│ │ ├── GLProgram_Reflection.h
│ │ ├── GLProgram_MotionBlur.h
│ │ └── GLProgram_ShadowMap.h
│ ├── GLMeshData.h
│ ├── GLUniformBlockHelper.h
│ ├── GLMesh.h
│ ├── GLUniformBlock.cpp
│ └── FrameBuffers
│ │ └── GLFramebuffer_DepthBuffer.h
├── Utils
│ ├── BoundingBox.h
│ ├── Singleton.h
│ ├── Factory.h
│ ├── Ray.h
│ ├── Database.h
│ └── IntersectionAlgorithms.h
├── Physics
│ ├── PhysicsUtils.h
│ ├── PhysicsWorld.h
│ ├── PhysicsUtils.cpp
│ └── PhysicsWorld.cpp
├── GlobalPaths.h
├── Objects
│ ├── ExampleObject.h
│ ├── Lights
│ │ ├── ShadowLight.h
│ │ ├── ShadowLight.cpp
│ │ └── Light.h
│ ├── ExampleObject.cpp
│ ├── Cameras
│ │ ├── Camera1stPerson.h
│ │ ├── Camera3rdPerson.h
│ │ └── Camera.cpp
│ └── RenderObject.h
├── WorldDatabase.h
├── MeshDatabase.h
├── MaterialDatabase.h
├── Material.h
├── GlobalPaths.cpp
├── SFMLCore.h
├── main.cpp
├── MeshDatabase.cpp
├── World.h
├── WorldDatabase.cpp
├── MaterialDatabase.cpp
└── SFMLCore.cpp
└── README.txt
/doc/Add new shader.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/include/glm/gtx/ocl_type.inl:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/include/glm/gtx/vec1.inl:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tools/build_automator.bat:
--------------------------------------------------------------------------------
1 | "premake4.exe" --platform=x32 --os=windows vs2010
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #OS junk files
2 | [Tt]humbs.db
3 | *.DS_Store
4 |
5 | [Bb]uild/
6 | *~*
7 |
--------------------------------------------------------------------------------
/data/meshes/quad.obj:
--------------------------------------------------------------------------------
1 | v -1 1 0
2 | v 1 1 0
3 | v -1 -1 0
4 | v 1 -1 0
5 | f 4 1 3
6 | f 2 1 4
7 |
--------------------------------------------------------------------------------
/tools/premake4.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/tools/premake4.exe
--------------------------------------------------------------------------------
/include/glm/gtx/simd_vec4.hpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/include/glm/gtx/simd_vec4.hpp
--------------------------------------------------------------------------------
/include/tinyxml/changes.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/include/tinyxml/changes.txt
--------------------------------------------------------------------------------
/include/tinyxml/tinystr.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/include/tinyxml/tinystr.cpp
--------------------------------------------------------------------------------
/include/glm/core/type_half.inl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/include/glm/core/type_half.inl
--------------------------------------------------------------------------------
/include/glm/core/func_common.hpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/include/glm/core/func_common.hpp
--------------------------------------------------------------------------------
/include/glm/core/func_common.inl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/include/glm/core/func_common.inl
--------------------------------------------------------------------------------
/include/glm/core/func_integer.hpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/include/glm/core/func_integer.hpp
--------------------------------------------------------------------------------
/libs/SFML_2.0/Debug/sfml-main-d.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/libs/SFML_2.0/Debug/sfml-main-d.lib
--------------------------------------------------------------------------------
/libs/SFML_2.0/Release/sfml-main.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/libs/SFML_2.0/Release/sfml-main.lib
--------------------------------------------------------------------------------
/libs/SFML_2.0/Debug/sfml-audio-s-d.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/libs/SFML_2.0/Debug/sfml-audio-s-d.lib
--------------------------------------------------------------------------------
/libs/SFML_2.0/Debug/sfml-system-s-d.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/libs/SFML_2.0/Debug/sfml-system-s-d.lib
--------------------------------------------------------------------------------
/libs/SFML_2.0/Debug/sfml-window-s-d.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/libs/SFML_2.0/Debug/sfml-window-s-d.lib
--------------------------------------------------------------------------------
/libs/SFML_2.0/Release/sfml-audio-s.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/libs/SFML_2.0/Release/sfml-audio-s.lib
--------------------------------------------------------------------------------
/libs/SFML_2.0/Release/sfml-system-s.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/libs/SFML_2.0/Release/sfml-system-s.lib
--------------------------------------------------------------------------------
/libs/SFML_2.0/Release/sfml-window-s.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/libs/SFML_2.0/Release/sfml-window-s.lib
--------------------------------------------------------------------------------
/libs/bullet_2.79/Release/LinearMath.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/libs/bullet_2.79/Release/LinearMath.lib
--------------------------------------------------------------------------------
/libs/SFML_2.0/Debug/sfml-graphics-s-d.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/libs/SFML_2.0/Debug/sfml-graphics-s-d.lib
--------------------------------------------------------------------------------
/libs/SFML_2.0/Debug/sfml-network-s-d.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/libs/SFML_2.0/Debug/sfml-network-s-d.lib
--------------------------------------------------------------------------------
/libs/SFML_2.0/Release/sfml-graphics-s.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/libs/SFML_2.0/Release/sfml-graphics-s.lib
--------------------------------------------------------------------------------
/libs/SFML_2.0/Release/sfml-network-s.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/libs/SFML_2.0/Release/sfml-network-s.lib
--------------------------------------------------------------------------------
/include/bullet/BulletSoftBody/btSoftBody.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/include/bullet/BulletSoftBody/btSoftBody.cpp
--------------------------------------------------------------------------------
/libs/bullet_2.79/Debug/LinearMath_Debug.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/libs/bullet_2.79/Debug/LinearMath_Debug.lib
--------------------------------------------------------------------------------
/libs/bullet_2.79/Release/BulletCollision.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/libs/bullet_2.79/Release/BulletCollision.lib
--------------------------------------------------------------------------------
/libs/bullet_2.79/Release/BulletDynamics.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/libs/bullet_2.79/Release/BulletDynamics.lib
--------------------------------------------------------------------------------
/libs/bullet_2.79/Release/BulletSoftBody.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/libs/bullet_2.79/Release/BulletSoftBody.lib
--------------------------------------------------------------------------------
/libs/bullet_2.79/Debug/BulletCollision_Debug.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/libs/bullet_2.79/Debug/BulletCollision_Debug.lib
--------------------------------------------------------------------------------
/libs/bullet_2.79/Debug/BulletDynamics_Debug.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/libs/bullet_2.79/Debug/BulletDynamics_Debug.lib
--------------------------------------------------------------------------------
/libs/bullet_2.79/Debug/BulletSoftBody_Debug.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/libs/bullet_2.79/Debug/BulletSoftBody_Debug.lib
--------------------------------------------------------------------------------
/include/bullet/BulletCollision/Gimpact/btGImpactShape.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/include/bullet/BulletCollision/Gimpact/btGImpactShape.h
--------------------------------------------------------------------------------
/data/shaders/PassthroughFrag.frag:
--------------------------------------------------------------------------------
1 | #version 330
2 | layout(std140) uniform;
3 |
4 | //Output
5 | out vec4 outputColor;
6 |
7 | //Main
8 | void main()
9 | {
10 | outputColor = vec4(0,0,0,1);
11 | }
12 |
--------------------------------------------------------------------------------
/include/bullet/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IanLilleyT/Real-Time-Reflections-OpenGL/HEAD/include/bullet/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp
--------------------------------------------------------------------------------
/data/shaders/MotionBlurVert.vert:
--------------------------------------------------------------------------------
1 | #version 330
2 | layout(std140) uniform;
3 |
4 | //Input
5 | layout(location = 0) in vec3 position;
6 |
7 | //Main
8 | void main()
9 | {
10 | gl_Position = vec4(position,1.0);
11 | }
12 |
--------------------------------------------------------------------------------
/data/shaders/ReflectionVert.vert:
--------------------------------------------------------------------------------
1 | #version 330
2 | layout(std140) uniform;
3 |
4 | //Input
5 | layout(location = 0) in vec3 position;
6 |
7 | //Main
8 | void main()
9 | {
10 | gl_Position = vec4(position,1.0);
11 | }
12 |
--------------------------------------------------------------------------------
/data/shaders/ShadowMapVert.vert:
--------------------------------------------------------------------------------
1 | #version 330
2 | layout(std140) uniform;
3 |
4 | //Input
5 | layout(location = 0) in vec3 position;
6 |
7 | //Main
8 | void main()
9 | {
10 | gl_Position = vec4(position,1.0);
11 | }
12 |
--------------------------------------------------------------------------------
/data/materials/cow.xml:
--------------------------------------------------------------------------------
1 |
2 | blue
3 | 0 0 1 1
4 | 1 1 1 1
5 | .1
6 | 1
7 |
--------------------------------------------------------------------------------
/data/materials/red.xml:
--------------------------------------------------------------------------------
1 |
2 | red
3 | 1 0 0 1
4 | 1 1 1 1
5 | .3
6 | 0
7 |
--------------------------------------------------------------------------------
/src/OpenGL/GLTexture.h:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | #include //For GL commands
4 |
5 | class GLTexture
6 | {
7 | public:
8 | GLTexture();
9 | ~GLTexture();
10 | private:
11 | GLuint textureObject;
12 | GLenum textureUnit;
13 |
14 | }*/
--------------------------------------------------------------------------------
/doc/How To.txt:
--------------------------------------------------------------------------------
1 | How to create a new shader:
2 |
3 | 1) Create NameFrag.frag and NameVert.vert
4 | 2) Add GLProgram_Name.h to "Programs" folder
5 | 3) Add code (base off another shader file)
6 | 4) Register in ClassRegister
7 |
8 | How to create a new Object class:
9 |
--------------------------------------------------------------------------------
/data/materials/scatter.xml:
--------------------------------------------------------------------------------
1 |
2 | blue
3 | 0 0 1 1
4 | 1 1 1 1
5 | .05
6 | .5
7 | 1
8 |
--------------------------------------------------------------------------------
/data/materials/reflective.xml:
--------------------------------------------------------------------------------
1 |
2 | blue
3 | 0 0 1 1
4 | 1 1 1 1
5 | .3
6 | .5
7 | 1
8 |
--------------------------------------------------------------------------------
/data/materials/refractive.xml:
--------------------------------------------------------------------------------
1 |
2 | blue
3 | 1 0 0 1
4 | 1 1 1 1
5 | .1
6 | 0
7 | 0
8 | 1
9 | 1.2
10 |
--------------------------------------------------------------------------------
/src/Utils/BoundingBox.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | #include //For math
6 |
7 | class BoundingBox
8 | {
9 | public:
10 | BoundingBox(glm::vec3 min, glm::vec3 max)
11 | {
12 | this->min = min;
13 | this->max = max;
14 | }
15 | BoundingBox(){}
16 | ~BoundingBox(){}
17 |
18 | glm::vec3 min;
19 | glm::vec3 max;
20 | };
--------------------------------------------------------------------------------
/src/Physics/PhysicsUtils.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include
6 |
7 | class PhysicsUtils
8 | {
9 | public:
10 | static glm::mat4 convertBulletTransformToGLM(btTransform& transform);
11 | static btTransform convertGLMTransformToBullet(glm::mat4 transform);
12 |
13 | static btVector3 convertGLMVectorToBullet(glm::vec3 vector);
14 | static glm::vec3 convertBulletVectorToGLM(btVector3& vector);
15 | };
--------------------------------------------------------------------------------
/data/shaders/PassthroughVert.vert:
--------------------------------------------------------------------------------
1 | #version 330
2 | layout(std140) uniform;
3 |
4 | //Input
5 | layout(location = 0) in vec3 position;
6 |
7 | //Uniforms
8 | uniform mat4 modelToCameraMatrix;
9 |
10 | //Projection matrix
11 | uniform ProjectionBlock
12 | {
13 | mat4 cameraToClipMatrix;
14 | float zNear;
15 | float zFar;
16 | float screenWidth;
17 | float screenHeight;
18 | };
19 |
20 | //Main
21 | void main()
22 | {
23 | gl_Position = cameraToClipMatrix * modelToCameraMatrix * vec4(position,1.0);
24 | }
25 |
--------------------------------------------------------------------------------
/data/shaders/DeferredLightingPassVert.vert:
--------------------------------------------------------------------------------
1 | #version 330
2 | layout(std140) uniform;
3 |
4 | //Input
5 | layout(location = 0) in vec3 position;
6 |
7 | //Uniforms
8 | uniform mat4 modelToCameraMatrix;
9 |
10 | //Projection matrix
11 | uniform ProjectionBlock
12 | {
13 | mat4 cameraToClipMatrix;
14 | float zNear;
15 | float zFar;
16 | float screenWidth;
17 | float screenHeight;
18 | };
19 |
20 | //Main
21 | void main()
22 | {
23 | gl_Position = /*cameraToClipMatrix * modelToCameraMatrix * */vec4(position,1.0);
24 | }
25 |
--------------------------------------------------------------------------------
/src/GlobalPaths.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include //For storing paths
4 |
5 | class GlobalPaths
6 | {
7 | public:
8 | GlobalPaths();
9 | ~GlobalPaths();
10 |
11 | void setDataPath(std::string path);
12 | std::string getDataPath();
13 | std::string getShaderPath();
14 | std::string getMeshPath();
15 | std::string getWorldPath();
16 | std::string getMaterialPath();
17 |
18 | private:
19 | std::string dataPath;
20 | std::string shaderPath;
21 | std::string meshPath;
22 | std::string worldPath;
23 | std::string materialPath;
24 | };
--------------------------------------------------------------------------------
/src/Objects/ExampleObject.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Object.h" //Superclass
4 |
5 | class ExampleObject: public Object
6 | {
7 | public:
8 | //Class
9 | static std::string className;
10 |
11 | //Construct/Destruct
12 | ExampleObject();
13 | virtual ~ExampleObject();
14 |
15 | //Initialize
16 | virtual void initialize(TiXmlElement* element);
17 | void initialize(std::string name, int value);
18 |
19 | //Type
20 | virtual std::string getClassname();
21 |
22 | protected:
23 | void initialize(int value);
24 |
25 | int value;
26 | };
--------------------------------------------------------------------------------
/include/glm/gtx/std_based_type.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
3 | ///////////////////////////////////////////////////////////////////////////////////////////////////
4 | // Created : 2008-06-08
5 | // Updated : 2008-06-08
6 | // Licence : This source is under MIT License
7 | // File : glm/gtx/std_based_type.inl
8 | ///////////////////////////////////////////////////////////////////////////////////////////////////
9 |
10 | namespace glm
11 | {
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/include/glm/gtx/number_precision.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
3 | ///////////////////////////////////////////////////////////////////////////////////////////////////
4 | // Created : 2007-05-10
5 | // Updated : 2007-05-10
6 | // Licence : This source is under MIT License
7 | // File : glm/gtx/number_precision.inl
8 | ///////////////////////////////////////////////////////////////////////////////////////////////////
9 |
10 | namespace glm
11 | {
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/include/glm/gtx/unsigned_int.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
3 | ///////////////////////////////////////////////////////////////////////////////////////////////////
4 | // Created : 2005-12-24
5 | // Updated : 2008-10-07
6 | // Licence : This source is under MIT License
7 | // File : glm/gtx/unsigned_int.inl
8 | ///////////////////////////////////////////////////////////////////////////////////////////////////
9 |
10 | namespace glm
11 | {
12 |
13 | }//namespace glm
14 |
--------------------------------------------------------------------------------
/src/Utils/Singleton.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include //Ensures that only one instance is present
4 | #include
5 |
6 | template
7 | class Singleton
8 | {
9 | public:
10 | static T* Instance()
11 | {
12 | if(!m_pInstance) m_pInstance = new T;
13 | assert(m_pInstance !=0);
14 | return m_pInstance;
15 | }
16 | protected:
17 | Singleton();
18 | ~Singleton();
19 | private:
20 | Singleton(Singleton const&);
21 | Singleton& operator=(Singleton const&);
22 | static T* m_pInstance;
23 | };
24 |
25 | template T* Singleton::m_pInstance=0;
26 |
--------------------------------------------------------------------------------
/src/WorldDatabase.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include //For names
4 | #include