unsigned int sdr_ltmap, sdr_ltmap_notex;
static float cam_dist = 0.0;
unsigned int sdr_ltmap, sdr_ltmap_notex;
static float cam_dist = 0.0;
static float joy_deadzone = 0.01;
static Mat4 view_matrix, mouse_view_matrix, proj_matrix;
static float joy_deadzone = 0.01;
static Mat4 view_matrix, mouse_view_matrix, proj_matrix;
glClearColor(0.2, 0.2, 0.2, 1.0);
glClearColor(0.2, 0.2, 0.2, 1.0);
- // set initial cam_pos above the center of the walk mesh (if any)
- if(scn->walk_mesh) {
- Vec3 bcent;
- float brad;
- scn->walk_mesh->get_bsphere(&bcent, &brad);
-
- floor_y = bcent.y;
- cam_pos = bcent + Vec3(0, user_eye_height, 0);
- }
+ cam_pos = mscn->start_pos;
+ // TODO use start_rot
Ray downray = Ray(v, Vec3(0, -1, 0));
HitPoint hit;
Ray downray = Ray(v, Vec3(0, -1, 0));
HitPoint hit;
set_light(1, lpos[1], Vec3(0.6, 0.7, 1.0) * 0.6);
set_light(2, lpos[2], Vec3(0.8, 1.0, 0.8) * 0.3);
set_light(1, lpos[1], Vec3(0.6, 0.7, 1.0) * 0.6);
set_light(2, lpos[2], Vec3(0.8, 1.0, 0.8) * 0.3);
glPushAttrib(GL_ENABLE_BIT);
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE);
glPushAttrib(GL_ENABLE_BIT);
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE);