split template into a public template for storage allocation and private implementation and move the code into the cpp
This commit is contained in:
@@ -47,7 +47,7 @@ void App::init()
|
||||
shader_color.create(shader_color_v, shader_color_f);
|
||||
plane.create<15>(.5f, .5f);
|
||||
longPlane.create<1>(.3, .05f);
|
||||
circle.create<6>(.5f);
|
||||
circle.create<6>(.5f, .25f);
|
||||
if (!tex.load("data/image.png"))
|
||||
printf("error loading image\n");
|
||||
|
||||
@@ -84,7 +84,7 @@ void App::update(float dt)
|
||||
glm::mat4 view = glm::lookAt(glm::vec3(sinf(theta), 0, 1), glm::vec3(0, 0, 0), glm::vec3(0, 1, 0));
|
||||
auto mvp = proj * view * model;
|
||||
|
||||
glClearColor(red, 0, 0, 1);
|
||||
//glClearColor(red, 0, 0, 1);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
shader.use();
|
||||
shader.u_mat4("mvp", glm::mat4());
|
||||
@@ -92,7 +92,7 @@ void App::update(float dt)
|
||||
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
tex.bind();
|
||||
//circle.draw_fill();
|
||||
circle.draw_fill();
|
||||
tex.unbind();
|
||||
|
||||
shader_color.use();
|
||||
|
||||
Reference in New Issue
Block a user