[FEATURE] simple GUI support
This commit is contained in:
@@ -19,7 +19,7 @@ namespace render_engine
|
||||
static std::vector<GLuint> textures;
|
||||
|
||||
/*
|
||||
This function will generate a Model from vertex positions, textureCoordinates and indices.
|
||||
This function will generate a Model from vertex positions, textureCoordinates normals and indices.
|
||||
*/
|
||||
models::RawModel LoadToVAO(std::vector<float>& positions, std::vector<float>& texture_coords, std::vector<float>& normals, std::vector<unsigned int>& indices)
|
||||
{
|
||||
@@ -35,6 +35,17 @@ namespace render_engine
|
||||
return { vao_id, static_cast<int>(indices.size()), model_size };
|
||||
}
|
||||
|
||||
/*
|
||||
This function will generate a Model from vertex positions.
|
||||
*/
|
||||
models::RawModel LoadToVAO(std::vector<float>& positions)
|
||||
{
|
||||
const GLuint vao_id = CreateVao();
|
||||
StoreDataInAttributeList(0, 2, positions);
|
||||
glBindVertexArray(0);
|
||||
return { vao_id, static_cast<int>(positions.size()) / 2 };
|
||||
}
|
||||
|
||||
/*
|
||||
Loads an image as texture into openGL
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user