Slow textures
I have a 3d world up and running with collision detection, rudimentary portal mechanics and a basic editor. I recently decided to try using textures and checked out some code from NeHe. After enabling GL_TEXTURE_2D my program became incredibly slow. Can anybody explain to me why this happens and whether there is any way around this slowdown?
1. How many different textures do you have. Each call to glBindTexture can be pretty expansive so you could sort your objects by texture ID and thus reduce the number of glBindTexture calls.
2. How big are your textures ? Do you use mipmaping ? Without mipmaping you can blow up the video card bandwidth, especially when you use big textures.
2. How big are your textures ? Do you use mipmaping ? Without mipmaping you can blow up the video card bandwidth, especially when you use big textures.
perhaps you are building all textures each frame :]] PPP
mmh... dont know how do you render your world? Vertex arrays? display list?
[edited by - cANaBiTz on October 22, 2002 7:28:37 AM]
mmh... dont know how do you render your world? Vertex arrays? display list?
[edited by - cANaBiTz on October 22, 2002 7:28:37 AM]
Prosper/LOADED...
1. The slowdown happens before calling glBindTexture. I only have to enable GL_TEXTURE_2D to create the slowdown.
2. The pictures are 256 X 256 and no, I don''t use mipmapping. But would that have any effect? Like I said the slowdown doesn''t seem to have anything to do with displaying the textures, only enabling the possibility of displaying textures.
cANaBiTz...
Hey, give me some credit :D The textures are built once in program initialization.
My world is rendered in the following way:
I have sectors, which are connected to each other with portals. If a portal is visible, the sector on the other side is rendered (basic portal engine). Each sector has a list of walls and a polygon for the floor and ceiling.
In any case...thanks for the reply, guys
1. The slowdown happens before calling glBindTexture. I only have to enable GL_TEXTURE_2D to create the slowdown.
2. The pictures are 256 X 256 and no, I don''t use mipmapping. But would that have any effect? Like I said the slowdown doesn''t seem to have anything to do with displaying the textures, only enabling the possibility of displaying textures.
cANaBiTz...
Hey, give me some credit :D The textures are built once in program initialization.
My world is rendered in the following way:
I have sectors, which are connected to each other with portals. If a portal is visible, the sector on the other side is rendered (basic portal engine). Each sector has a list of walls and a polygon for the floor and ceiling.
In any case...thanks for the reply, guys
quote:Original post by Freysi
1. The slowdown happens before calling glBindTexture. I only have to enable GL_TEXTURE_2D to create the slowdown.
2. The pictures are 256 X 256 and no, I don''t use mipmapping. But would that have any effect? Like I said the slowdown doesn''t seem to have anything to do with displaying the textures, only enabling the possibility of displaying textures.
Usually, mipmaping should improve performances but your case seems pretty weird. What are your system specs (CPU, Video card, OS, Drivers version) ?
Dumb question : are you sure you''re not in software mode ?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement