[EDIT] comments on each function

This commit is contained in:
Menno
2021-05-21 15:09:07 +02:00
parent e10aea5a15
commit bb4fcbc97b
9 changed files with 160 additions and 19 deletions

View File

@@ -9,17 +9,24 @@ namespace render_engine
namespace loader
{
/*
This function generates a model from model data.
@brief: This function generates a model from model data.
@param position: The positions of each vertex (in order: x, y, z) in the model
@param texture_coords: The texture coordinates of the model
@param normals: The normals of each face of the model
@param indices: A list with a sort of lookup table to the positions parameter
*/
models::RawModel LoadToVAO(std::vector<float>& positions, std::vector<float>& texture_coords, std::vector<float>& normals, std::vector<unsigned int>& indices);
/*
Loads a texture from a file into openGL using stb_image.h
@brief: Loads a texture from a file into openGL using stb_image.h
@param file_name: The filepath to the texture
*/
GLuint LoadTexture(std::string file_name);
/*
Call this function when cleaning up all the meshes (when exiting the program).
@brief: Call this function when cleaning up all the meshes (when exiting the program).
*/
void CleanUp();
}

View File

@@ -10,17 +10,23 @@ namespace render_engine
const glm::vec3 SKY_COLOR = { 0.3f, 0.4f, 0.6f };
/*
Call this function when starting the program
@brief: Call this function when starting the program
@param shader: The shader to render the entities with
*/
void Init(shaders::EntityShader& shader);
/*
Call this function before rendering.
@brief: Call this function before rendering.
This function will enable culling and load the projectionMatrix into the shader.
*/
void Prepare();
/*
Call this function when wanting to Render a mesh to the screen.
@brief: Call this function when wanting to Render a mesh to the screen.
@param entity: The entity which needs to be rendered
@param shader: The shader the entity needs to be rendered with
*/
void Render(entities::Entity& entity, shaders::EntityShader& shader);
}

View File

@@ -6,7 +6,9 @@
namespace render_engine
{
/*
* This function retrieves an .obj file, loads it into the VBO and returns a RawModel
* @brief: This function retrieves an .obj file, loads it into the VBO and returns a RawModel
*
* @param file_name: The path to the .obj file
*/
models::RawModel LoadObjModel(std::string file_name);
}