fix starting point
This commit is contained in:
parent
39ff84c947
commit
aa77e8120c
1 changed files with 3 additions and 2 deletions
|
@ -59,8 +59,9 @@ static void draw(void) {
|
|||
|
||||
static Uint32 t0 = -1;
|
||||
GLfloat t, d;
|
||||
if (t0 < 0.0f)
|
||||
if ((int)t0 == -1) {
|
||||
t0 = SDL_GetTicks();
|
||||
}
|
||||
t = (GLfloat)(SDL_GetTicks() - t0) / 1000.f;
|
||||
d = -1.1f + .25f * t;
|
||||
|
||||
|
@ -72,7 +73,7 @@ static void draw(void) {
|
|||
gl4duBindMatrix("modview");
|
||||
gl4duLoadIdentityf();
|
||||
|
||||
gl4duTranslatef(0.f, d - 1.5f, -2.f);
|
||||
gl4duTranslatef(0.f, d, -2.f);
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
glBindTexture(GL_TEXTURE_2D, _texId);
|
||||
gl4duScalef(1.f, .3f, 1.f);
|
||||
|
|
Reference in a new issue