Can now load models from file, kinda
This commit is contained in:
parent
4c3c1687ef
commit
ac5bf9abdb
13 changed files with 10247 additions and 12 deletions
|
@ -47,10 +47,10 @@ int main(int argc, char** argv)
|
|||
|
||||
// Create vertices for square
|
||||
float vertices[] = {
|
||||
0.5f, 0.5f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, // top right
|
||||
0.5f, -0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, // bottom right
|
||||
-0.5f, -0.5f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, // bottom left
|
||||
-0.5f, 0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f // top left
|
||||
0.5f, 0.5f, 0.0f, 1.0f, 1.0f, // top right
|
||||
0.5f, -0.5f, 0.0f, 1.0f, 0.0f, // bottom right
|
||||
-0.5f, -0.5f, 0.0f, 0.0f, 0.0f, // bottom left
|
||||
-0.5f, 0.5f, 0.0f, 0.0f, 1.0f // top left
|
||||
};
|
||||
|
||||
unsigned int indices[] = {
|
||||
|
@ -59,9 +59,8 @@ int main(int argc, char** argv)
|
|||
};
|
||||
|
||||
oglu::VertexAttribute topology[] = {
|
||||
{ 0, 3, GL_FLOAT, GL_FALSE, 8 * sizeof(float), (void*)0 },
|
||||
{ 1, 3, GL_FLOAT, GL_FALSE, 8 * sizeof(float), (void*)(3 * sizeof(float)) },
|
||||
{ 2, 2, GL_FLOAT, GL_FALSE, 8 * sizeof(float), (void*)(6 * sizeof(float)) }
|
||||
{ 0, 3, GL_FLOAT, GL_FALSE, 5 * sizeof(float), (void*)0 },
|
||||
{ 1, 2, GL_FLOAT, GL_FALSE, 5 * sizeof(float), (void*)(3 * sizeof(float)) }
|
||||
};
|
||||
|
||||
// Make a square
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue