Can now load models from file, kinda

This commit is contained in:
Robert 2021-01-22 13:37:57 +01:00
parent 4c3c1687ef
commit ac5bf9abdb
13 changed files with 10247 additions and 12 deletions

View file

@ -12,7 +12,10 @@
#include <memory>
#include <stdexcept>
#include <string>
#ifdef OGLU_BUILD_DLL
#include <glad/glad.h>
#endif
#ifdef OGLU_WIN32
#ifdef OGLU_BUILD_DLL

View file

@ -45,6 +45,44 @@ namespace oglu
* @param[in] clearColor Color to clear the screen with
*/
OGLU_API void ClearScreen(GLbitfield mask, Color clearColor);
/**
* @brief Wrapper for glEnable.
*
* @param[in] cap A GL capability
*/
OGLU_API void Enable(GLenum cap);
/**
* @brief Wrapper for glDisable.
*
* @param[in] cap A GL capability
*/
OGLU_API void Disable(GLenum cap);
/**
* @brief Wrapper for glEnablei.
*
* @param[in] cap A GL capability
* @param[in] index Index of the switch
*/
OGLU_API void Enable(GLenum cap, GLuint index);
/**
* @brief Wrapper for glDisablei.
*
* @param[in] cap A GL capability
* @param[in] index Index of the switch
*/
OGLU_API void Disable(GLenum cap, GLuint index);
/**
* @brief Wrapper for glPolygonMode.
*
* @param[in] face Type of polygon to apply @p mode to
* @param[in] mode Type of rasterization for polygons
*/
OGLU_API void PolygonMode(GLenum face, GLenum mode);
}
#endif //OPENGLU_HPP

View file

@ -54,6 +54,15 @@ namespace oglu
*/
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);
/**
* @brief Constructs a new VAO.
*
* Reads an .obj file and converts it into a VAO
*
* @param[in] filepath Path to the .obj file
*/
friend std::shared_ptr<AbstractVertexArray> OGLU_API MakeVertexArray(const char* filepath);
/**
* @brief Copy constructor.
*