Advertisement

Problem moving a bmp across the screen, help :(

Started by July 22, 2002 11:36 PM
0 comments, last by R3alTiMe 22 years, 7 months ago
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?
x+= 200 maybe?
----------------------------
When hell freezes over it will be a pretty cool place to snowboard

This topic is closed to new replies.

Advertisement