glTranslatef(x,0,z);
glRotatef(zrot,0,0,1);
glPushMatrix();
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glBindTexture(GL_TEXTURE_2D, bitmap_c.g_bmp);
glBegin(GL_QUADS);
glTexCoord2f(0.5f, 0);
glVertex2f(-1,-1);
glTexCoord2f(1, 0);
glVertex2f(1,-1);
glTexCoord2f(1, 1);
glVertex2f(1,1);
glTexCoord2f(0.5f, 1);
glVertex2f(-1,1);
glDisable(GL_BLEND);
glPopMatrix();
🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Keyboard not responding
In my bitmaps, I succesfuly made them animated...sorta, but it works!
Now, when I press WASD the x,z, or zrot functions are not working, can someone tell me why?
while (!exiting) { gSystem->Code(); gSystem->Render(); if(GetKeyState('W') & 0x80) { gSystem->z-=0.1f; } if(GetKeyState('S') & 0x80) { gSystem->z+=0.1f; } if(GetKeyState('A') & 0x80) { gSystem->x-=0.1f; } if(GetKeyState('D') & 0x80) { gSystem->x+=0.1f; } if(GetKeyState(VK_LEFT) & 0x80) { gSystem->zrot+=1; } if(GetKeyState(VK_RIGHT) & 0x80) { gSystem->zrot-=1; } SwapBuffers(hDC);
It used to work perfectly... ?_?
EDIT: I also saw something, it seems as though the engine is not keeping up with where the things are, if I take the screen and put it where I cannot see it and bring it back out, the image will be cut off and some of the background will be black. How do I make it where this does not happen, or a constant update?
[Edited by - Axesor on March 20, 2006 5:31:46 AM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement