
Problem moving a bmp across the screen, help :(
Hey
Im trying to move a small bmp arround the screen.
Im loading it like that:
image=auxDIBImageLoad("d:/project/ship.bmp");
And drawing it with this:
glClear(GL_COLOR_BUFFER_BIT);
glRasterPos2i(x,y);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glPixelZoom(1,1);
glDrawPixels(image->sizeX,image->sizeY,GL_RGB,GL_UNSIGNED_BYTE,image->data);
Now when For example i click on Enter I want it to to move right (increasing x position):
case 13: { x=200;
glutPostRedisplay();
break;}
thats inside the keyboard glut function.
Now I checked if it DOES go to the Draw function and it does but it wont change the position of the bmp even in a bit
.
Anyone knows why?

This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement