aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortaw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5>2008-06-21 17:38:28 +0000
committertaw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5>2008-06-21 17:38:28 +0000
commitcf9fa9e57abc1a553ec1f2d473806fae6eca7659 (patch)
tree7b24f06067df276d135646a3844b724c8151bb58 /src
parente51050b7c9b7c573d3b1b2079b978c9876024941 (diff)
Stuff
git-svn-id: svn://cook.msm.cam.ac.uk:745/thrust3d/thrust3d@97 84d2e878-0bd5-11dd-ad15-13eda11d74c5
Diffstat (limited to 'src')
-rw-r--r--src/physics.c1
-rw-r--r--src/render.c18
2 files changed, 9 insertions, 10 deletions
diff --git a/src/physics.c b/src/physics.c
index ec4334f..a29616e 100644
--- a/src/physics.c
+++ b/src/physics.c
@@ -311,7 +311,6 @@ static void physics_process(ModelInstance *obj, Uint32 dt, Game *game) {
/* Gravity */
if ( (obj->attribs & OBJ_GRAVITY) && (!obj->landed) ) {
- printf("Gravity\n");
obj->vz -= GRAVITY * dt;
}
diff --git a/src/render.c b/src/render.c
index 5068079..242a058 100644
--- a/src/render.c
+++ b/src/render.c
@@ -258,26 +258,26 @@ RenderContext *render_setup(int width, int height, int disable_vbos, int disable
xv = cos(theta)*cos(phi);
yv = sin(theta)*cos(phi);
zv = sin(phi);
- tx = 0.5 + 0.5*tan(phi)*cos(theta);
- ty = 0.5 + 0.5*tan(phi)*sin(theta);
+ tx = 0.5 + 0.5*cos(phi)*cos(theta);
+ ty = 0.5 + 0.5*cos(phi)*sin(theta);
ADD_VERTEX
xv = cos(theta+step_round)*cos(phi);
yv = sin(theta+step_round)*cos(phi);
zv = sin(phi);
- tx = 0.5 + 0.5*tan(phi)*cos(theta+step_round);
- ty = 0.5 + 0.5*tan(phi)*sin(theta+step_round);
+ tx = 0.5 + 0.5*cos(phi)*cos(theta+step_round);
+ ty = 0.5 + 0.5*cos(phi)*sin(theta+step_round);
ADD_VERTEX
xv = cos(theta+step_round)*cos(phi+step_up);
yv = sin(theta+step_round)*cos(phi+step_up);
zv = sin(phi+step_up);
- tx = 0.5 + 0.5*tan(phi+step_round)*cos(theta+step_round);
- ty = 0.5 + 0.5*tan(phi+step_round)*sin(theta+step_round);
+ tx = 0.5 + 0.5*cos(phi+step_round)*cos(theta+step_round);
+ ty = 0.5 + 0.5*cos(phi+step_round)*sin(theta+step_round);
ADD_VERTEX
xv = cos(theta)*cos(phi+step_up);
yv = sin(theta)*cos(phi+step_up);
zv = sin(phi+step_up);
- tx = 0.5 + 0.5*tan(phi+step_up)*cos(theta);
- ty = 0.5 + 0.5*tan(phi+step_up)*sin(theta);
+ tx = 0.5 + 0.5*cos(phi+step_up)*cos(theta);
+ ty = 0.5 + 0.5*cos(phi+step_up)*sin(theta);
ADD_VERTEX
}
}
@@ -428,7 +428,7 @@ static int render_model_instance_draw(ModelInstance *instance, Uint32 t, RenderC
glTexCoordPointer(2, GL_FLOAT, 0, r->hemisphere_t);
if ( r->fbos ) {
- glBindTexture(GL_TEXTURE_2D, r->fbotex);
+ glBindTexture(GL_TEXTURE_2D, r->swirly_texture);
glEnable(GL_TEXTURE_2D);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD);
if ( r->shaders ) glUniform1i(glGetUniformLocation(r->lighting_program, "texture_enabled"), 1);