Fixed some things, code up to styleguide

This commit is contained in:
tleety
2015-09-30 10:29:56 +02:00
parent a1c709a2db
commit 2491dd8b74
4 changed files with 117 additions and 114 deletions
+18 -25
View File
@@ -16,8 +16,8 @@
along with Daydream Engine. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef Renderer_h__
#define Renderer_h__
#ifndef DD_RENDERER_H__
#define DD_RENDERER_H__
#include "Util/Rectangle.h"
#include "Camera.h"
@@ -30,8 +30,6 @@ namespace dd
class Renderer
{
public:
//Render();
GLFWwindow* Window() const { return m_Window; }
Rectangle Resolution() const { return m_Resolution; }
void SetResolution(const Rectangle& resolution) { m_Resolution = resolution; }
@@ -39,8 +37,6 @@ public:
void SetFullscreen(bool fullscreen) { m_Fullscreen = fullscreen; }
bool VSYNC() const { return m_VSYNC; }
void SetVSYNC(bool vsync) { m_VSYNC = vsync; }
//void SetViewport(const Rectangle& viewport) { m_Viewport = viewport; }
//void SetScissor(const Rectangle& scissor) { m_Scissor = scissor; }
const dd::Camera* Camera() const { return m_Camera; }
void SetCamera(const dd::Camera* camera)
{
@@ -50,7 +46,6 @@ public:
m_Camera = camera;
}
}
void Initialize();
void Draw(RenderQueueCollection& rq);
@@ -58,8 +53,6 @@ private:
Rectangle m_Resolution = Rectangle(1280, 720);
bool m_Fullscreen = false;
bool m_VSYNC = false;
//Rectangle m_Viewport;
//Rectangle m_Scissor;
std::unique_ptr<dd::Camera> m_DefaultCamera = nullptr;
const dd::Camera* m_Camera = nullptr;
@@ -67,13 +60,13 @@ private:
std::string m_GLVendor;
GLFWwindow* m_Window = nullptr;
ShaderProgram* m_spDeferred1;
ShaderProgram* m_spDeferred2;
ShaderProgram* m_spDeferred3;
ShaderProgram* m_spForward;
ShaderProgram* m_spScreen;
ShaderProgram*m_spWater;
ShaderProgram*m_spWater2;
ShaderProgram* m_SpDeferred1;
ShaderProgram* m_SpDeferred2;
ShaderProgram* m_SpDeferred3;
ShaderProgram* m_SpForward;
ShaderProgram* m_SpScreen;
ShaderProgram* m_SpWater;
ShaderProgram* m_SpWater2;
GLuint m_ScreenQuad = 0;
Model* m_UnitSphere = nullptr;
@@ -82,22 +75,22 @@ private:
Texture* m_StandardSpecular;
Texture* m_WhiteSphereTexture;
GLuint m_rbDepthBuffer = 0; //DepthBuffer Texture
GLuint m_fbDeferred1 = 0; //Framebuffer for first pass
GLuint m_RbDepthBuffer = 0; //DepthBuffer Texture
GLuint m_FbDeferred1 = 0; //Framebuffer for first pass
GLuint m_GDiffuse = 0; //Texture for diffuseColors
GLuint m_GPosition = 0; //Texture for positions
GLuint m_GNormal = 0; //Texture for normals
GLuint m_GSpecular = 0; //Texture for specular
GLuint m_fbDeferred2 = 0; //Framebuffer that handles the lighting pass
GLuint m_tLighting = 0; //Texture for the lighting pass
GLuint m_fbDeferred3 = 0; //Frambuffer for handling the last pass.
GLuint m_tFinal = 0; //Final Texture to be printed to screen
GLuint m_FbDeferred2 = 0; //Framebuffer that handles the lighting pass
GLuint m_TLighting = 0; //Texture for the lighting pass
GLuint m_FbDeferred3 = 0; //Frambuffer for handling the last pass.
GLuint m_TFinal = 0; //Final Texture to be printed to screen
GLuint m_Gwater = 0; //Water Color Texture
GLuint m_BWater; //Water blur texture
GLuint m_BWater2; //Water blur texture
GLuint m_fbWater; //Waterpass Framebuffer
GLuint m_fbWaterBlur; //Waterpass Framebuffer
GLuint m_fbWaterBlur2; //Waterpass Framebuffer
GLuint m_FbWater; //Waterpass Framebuffer
GLuint m_FbWaterBlur; //Waterpass Framebuffer
GLuint m_FbWaterBlur2; //Waterpass Framebuffer
GLuint m_CurrentScreenBuffer = 0;
void LoadShaders();
+2 -1
View File
@@ -66,8 +66,9 @@ private:
std::unordered_map<b2Body*, EntityID> m_BodiesToEntities;
void CreateBody(EntityID entity);
void CreateParticleSystem(float radius);
b2ParticleSystem* m_ParticleSystem;
std::vector<b2ParticleSystem*> m_ParticleSystem;
std::vector<b2ParticleGroup*> t_ParticleGroup;
std::unordered_map<EntityID, const b2ParticleHandle*> m_EntitiesToParticleHandle;