projects
/
laserbrain_demo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
foo
[laserbrain_demo]
/
src
/
app.cc
diff --git
a/src/app.cc
b/src/app.cc
index
7fc5c13
..
7f173f3
100644
(file)
--- a/
src/app.cc
+++ b/
src/app.cc
@@
-147,8
+147,6
@@
bool app_init(int argc, char **argv)
float ambient[] = {0.0, 0.0, 0.0, 0.0};
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambient);
float ambient[] = {0.0, 0.0, 0.0, 0.0};
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambient);
- glClearColor(1, 1, 1, 1);
-
init_audio();
if(!init_vrhands()) {
init_audio();
if(!init_vrhands()) {
@@
-364,8
+362,9
@@
static void update(float dt)
if(have_handtracking) {
update_vrhands(&avatar);
} else {
if(have_handtracking) {
update_vrhands(&avatar);
} else {
+ // TODO do this properly
// set the position of the left hand at a suitable position for the exhibit UI
// set the position of the left hand at a suitable position for the exhibit UI
- Vec3 dir = transpose(mouse_view_matrix.upper3x3()) * Vec3(0, 0, -1);
+ dir = transpose(mouse_view_matrix.upper3x3()) * Vec3(-0.47, 0, -1);
exslot_left.node.set_position(avatar.pos + dir * 30); // magic: distance in front
}
exslot_left.node.set_position(avatar.pos + dir * 30); // magic: distance in front
}
@@
-386,6
+385,8
@@
void app_display()
ImGui::ShowTestWindow();
}
ImGui::ShowTestWindow();
}
+ glClearColor(1, 1, 1, 1);
+
if(opt.vr) {
// VR mode
goatvr_draw_start();
if(opt.vr) {
// VR mode
goatvr_draw_start();