projects
/
laserbrain_demo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
moving functionality into the avatar class, and drawing hands
[laserbrain_demo]
/
src
/
vrinput.cc
diff --git
a/src/vrinput.cc
b/src/vrinput.cc
index
2a25f53
..
d5692b8
100644
(file)
--- a/
src/vrinput.cc
+++ b/
src/vrinput.cc
@@
-2,6
+2,7
@@
#include <goatvr.h>
#include "vrinput.h"
#include "scene.h"
#include <goatvr.h>
#include "vrinput.h"
#include "scene.h"
+#include "shader.h"
VRHand vrhand[2];
VRHand vrhand[2];
@@
-13,6
+14,9
@@
bool init_vrhands()
if(!(scn->load("data/vrhands.obj"))) {
return false;
}
if(!(scn->load("data/vrhands.obj"))) {
return false;
}
+ scn->objects[0]->node->set_position(Vec3(0, 150, 0));
+ scn->objects[1]->node->set_position(Vec3(0, 250, 0));
+ scn->update(0);
return true;
}
return true;
}
@@
-22,7
+26,7
@@
void destroy_vrhands()
scn = 0;
}
scn = 0;
}
-void update_vrhands()
+void update_vrhands(const Avatar *avatar)
{
for(int i=0; i<2; i++) {
if(goatvr_hand_active(i)) {
{
for(int i=0; i<2; i++) {
if(goatvr_hand_active(i)) {
@@
-33,8
+37,12
@@
void update_vrhands()
vrhand[i].valid = false;
}
}
vrhand[i].valid = false;
}
}
+
+ scn->update(0);
}
void draw_vrhands()
{
}
void draw_vrhands()
{
+ bind_shader(0);
+ scn->draw();
}
}