Skip to content
Snippets Groups Projects
Commit 1e6d6312 authored by bobarna's avatar bobarna
Browse files

added recording on c keypress

parent 16e7865a
Branches
No related tags found
No related merge requests found
......@@ -89,6 +89,12 @@ static void KeyCallback(GLFWwindow *window, int key, int scancode, int action, i
InputHandler->KeyPress(key);
InputHandler->SetModifiers(mods);
if (action == GLFW_RELEASE && key == GLFW_KEY_C) {
if (capturing) capturing = false;
else capturing = true;
}
}
static void MouseClickCallback(GLFWwindow *window, int button, int action, int mods) {
......@@ -204,13 +210,14 @@ int main(int argc, char **argv) {
Scene.Update(deltaTime);
Scene.Render();
if (capturing) {
glPointSize(20.0f);
glBegin(GL_POINTS);
glColor3f(200.0f, 0.0f, 0.0f);
glVertex3f(-0.8f, -0.8f, 1.0f);
glEnd();
}
// big red dot in lower left corner
// if (capturing) {
// glPointSize(20.0f);
// glBegin(GL_POINTS);
// glColor3f(200.0f, 0.0f, 0.0f);
// glVertex3f(-0.8f, -0.8f, 1.0f);
// glEnd();
// }
if (tick && capturing) {
char path[100];
......
......@@ -33,7 +33,7 @@ void Scene::Build() {
// Texture *headTexture = new CheckerBoardTexture(1, 0);
// auto headObject = new HeadObject(phongShader, sphere, headMaterial, headTexture);
auto headObject = new HeadObject(phongShader, new ObjGeometry("../data/sphere.obj"), headMaterial, headTexture);
auto headObject = new HeadObject(phongShader, new ObjGeometry("../data/susanne.obj"), headMaterial, headTexture);
headObject->Scale(vec3(.35, .35, .35));
objects.push_back(headObject);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment