Archived

This topic is now archived and is closed to further replies.

Slow textures

This topic is 5528 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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 ?

Share this post


Link to post
Share on other sites
As it turns out, I was lied to about the specs of the computer I''m using (a school computer) The computer has a crap video card. I tried running it on another computer and it runs just fine. Stupid me...
Oh well, thanks anyway for the interest and support guys

Share this post


Link to post
Share on other sites