refactor: format code
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "ShaderProgram.h"
|
||||
|
||||
class EntityShader : public ShaderProgram{
|
||||
class EntityShader : public ShaderProgram {
|
||||
private:
|
||||
unsigned int location_cam = 0, location_zoom = 0, location_aspect_ratio = 0, location_translation = 0, location_viewtype = 0;
|
||||
protected:
|
||||
@@ -13,6 +13,6 @@ public:
|
||||
void setCamPos(const glm::vec2& camPos);
|
||||
void setZoom(float zoom);
|
||||
void setAspectRatio(float aspectRatio);
|
||||
void setModelPos(const glm::vec2& modelPos);
|
||||
void setIsometricView(float isometric);
|
||||
void setModelPos(const glm::vec2& modelPos);
|
||||
void setIsometricView(float isometric);
|
||||
};
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
#include <string>
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
namespace gl{
|
||||
enum class GLenum : unsigned int;
|
||||
namespace gl {
|
||||
enum class GLenum : unsigned int;
|
||||
}
|
||||
|
||||
class ShaderProgram {
|
||||
@@ -22,7 +22,7 @@ public:
|
||||
void start() const;
|
||||
void stop() const;
|
||||
void loadProgramFile(const std::string& vertexFile, const std::string& fragmentFile);
|
||||
void loadProgram(const std::string& vertexSource, const std::string& fragmentSource);
|
||||
void loadProgram(const std::string& vertexSource, const std::string& fragmentSource);
|
||||
|
||||
protected:
|
||||
virtual void getAllUniformLocation() = 0;
|
||||
@@ -41,7 +41,7 @@ private:
|
||||
unsigned int vertexShaderID;
|
||||
unsigned int fragmentShaderID;
|
||||
int loadShaderFromFile(const std::string& file, gl::GLenum type);
|
||||
int loadShader(const std::string& source, gl::GLenum type);
|
||||
int loadShader(const std::string& source, gl::GLenum type);
|
||||
};
|
||||
|
||||
#endif /* RENDER_SHADERS_SHADERPROGRAM_H_ */
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#include "ShaderProgram.h"
|
||||
|
||||
class WorldShader : public ShaderProgram{
|
||||
class WorldShader : public ShaderProgram {
|
||||
private:
|
||||
unsigned int location_cam = 0, location_zoom = 0, location_aspect_ratio = 0, location_viewtype = 0;
|
||||
protected:
|
||||
@@ -21,7 +21,7 @@ public:
|
||||
void setCamPos(const glm::vec2& camPos);
|
||||
void setZoom(float zoom);
|
||||
void setAspectRatio(float aspectRatio);
|
||||
void setIsometricView(float isometric);
|
||||
void setIsometricView(float isometric);
|
||||
};
|
||||
|
||||
#endif /* RENDER_SHADERS_GAMESHADER_H_ */
|
||||
|
||||
Reference in New Issue
Block a user