Fixed macos build problems

This commit is contained in:
Lauchmelder23 2021-01-25 02:33:21 +01:00
parent 265a7253cc
commit 3fdeb074c1
13 changed files with 73 additions and 27 deletions

View file

@ -19,6 +19,10 @@ namespace oglu
typedef std::shared_ptr<AbstractTexture> Texture;
class AbstractShader;
typedef std::shared_ptr<AbstractShader> Shader;
/**
* @brief An object representing an OpenGL Shader Program.
*
@ -40,7 +44,7 @@ namespace oglu
*
* @return A shared pointer to the shader program.
*/
friend std::shared_ptr<AbstractShader> OGLU_API MakeShader(const char* vertexShaderFile, const char* fragmentShaderFile);
friend Shader OGLU_API MakeShader(const char* vertexShaderFile, const char* fragmentShaderFile);
/**
* @brief Copy constructor.
@ -294,7 +298,7 @@ namespace oglu
* @param[in] v0 Value to set the uniform to
* @param[in] index Index of the texture unit
*/
void SetUniform(const GLchar* name, const Texture& v0, GLbyte index = 0);
void SetUniformTexture(const GLchar* name, const Texture& v0, GLbyte index = 0);
/**
* @brief Set uniform color.
@ -308,7 +312,7 @@ namespace oglu
* @param[in] v0 Value to set the uniform to
* @param[in] index Index of the texture unit
*/
void SetUniform(GLint location, const Texture& v0, GLbyte index = 0);
void SetUniformTexture(GLint location, const Texture& v0, GLbyte index = 0);
/**
* @brief Set uniform mat4.
@ -318,6 +322,7 @@ namespace oglu
*
* @param[in] name Name of the uniform
* @param[in] v0 Value to set the uniform to
* @param[in] transpose Transpose matrix before setting the uniform
*/
void SetUniform(const GLchar* name, Transformable& v0, GLboolean transpose = GL_FALSE);
@ -329,6 +334,7 @@ namespace oglu
*
* @param[in] location Location of the uniform
* @param[in] v0 Value to set the uniform to
* @param[in] transpose Transpose matrix before setting the uniform
*/
void SetUniform(GLint location, Transformable& v0, GLboolean transpose = GL_FALSE);
@ -754,7 +760,7 @@ namespace oglu
GLuint program; ///< Handle to the Shader program
};
typedef std::shared_ptr<AbstractShader> Shader;
Shader OGLU_API MakeShader(const char* vertexShaderFile, const char* fragmentShaderFile);
}
#endif

View file

@ -21,6 +21,10 @@ namespace oglu
*/
void OGLU_API ActiveTexture(GLubyte index);
class AbstractTexture;
typedef std::shared_ptr<AbstractTexture> Texture;
/**
* @brief An object representing an OpenGL Texture.
*
@ -41,7 +45,7 @@ namespace oglu
*
* @return A shared pointer to the texture.
*/
friend std::shared_ptr<AbstractTexture> OGLU_API MakeTexture(const char* filename);
friend Texture OGLU_API MakeTexture(const char* filename);
/**
* @brief Copy constructor.
@ -93,7 +97,7 @@ namespace oglu
GLuint texture; ///< OpenGL handle to the texture
};
typedef std::shared_ptr<AbstractTexture> Texture;
Texture OGLU_API MakeTexture(const char* filename);
}
#endif

View file

@ -27,6 +27,10 @@ namespace oglu
/*@}*/
};
class AbstractVertexArray;
typedef std::shared_ptr<AbstractVertexArray> VertexArray;
/**
* @brief An object representing an OpenGL VAO.
*
@ -52,7 +56,7 @@ namespace oglu
*
* @return A shared pointer to the texture.
*/
friend std::shared_ptr<AbstractVertexArray> OGLU_API MakeVertexArray(const GLfloat* vertices, size_t verticesSize, const GLuint* indices, size_t indicesSize, const VertexAttribute* topology, size_t topologySize);
friend VertexArray OGLU_API MakeVertexArray(const GLfloat* vertices, size_t verticesSize, const GLuint* indices, size_t indicesSize, const VertexAttribute* topology, size_t topologySize);
/**
* @brief Constructs a new VAO.
@ -61,7 +65,7 @@ namespace oglu
*
* @param[in] filepath Path to the .obj file
*/
friend std::shared_ptr<AbstractVertexArray> OGLU_API MakeVertexArray(const char* filepath);
friend VertexArray OGLU_API MakeVertexArray(const char* filepath);
/**
* @brief Copy constructor.
@ -127,7 +131,8 @@ namespace oglu
GLsizei count; ///< Amount of indices
};
typedef std::shared_ptr<AbstractVertexArray> VertexArray;
VertexArray OGLU_API MakeVertexArray(const GLfloat* vertices, size_t verticesSize, const GLuint* indices, size_t indicesSize, const VertexAttribute* topology, size_t topologySize);
VertexArray OGLU_API MakeVertexArray(const char* filepath);
}
#endif