Simple graphics running very slow

Started by
15 comments, last by holtaf 12 years, 9 months ago
What happens if you don't draw the player? What is the fps then? Drawing a tiny square doesn't always mean higher fps ;)

EDIT: phrased in a better way -> "drawing a tiny square can mean low fps sometimes"
Advertisement
When I remove a map drawing part of code :



void Game::render(){

glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

switch ( m_sceneId ) {

case SCENE_MENU :
//menu.render();
break;
case SCENE_GAME :
//texture.setActiveTexture( m_mapTextureId );
//map.draw();
texture.setActiveTexture( m_playerTextureId );
player.draw();
break;
}



glXSwapBuffers( m_pDisplay, m_Window );
}




It runs ok , so the problem is in the map drawing.
What is your game's target resolution? And what is map.bmp's width and height?
Window : 640x480
Bitmap : 512x512( RGB )
Any way you can share your code via download? If not, here's more questions/requests...

Can you post your loadTexture() function?
Are you using shaders at all? (doesn't look like it)
Try drawing triangles instead of quads?

o3o

Ok here is my whole code. ( No i'm not using any shaders );
game.tar.gz

This topic is closed to new replies.

Advertisement