diff options
-rw-r--r-- | src/physics.c | 1 | ||||
-rw-r--r-- | src/render.c | 18 |
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); |