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"
Simple graphics running very slow
When I remove a map drawing part of code :
It runs ok , so the problem is in the map drawing.
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.
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)
Can you post your loadTexture() function?
Are you using shaders at all? (doesn't look like it)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement