Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Speed of glTexImage2D

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2002
    Location
    Leuven, Brabant, Belgium
    Posts
    8

    Speed of glTexImage2D

    Hello, I have a project where threads are started and stopped without my knowing so. Some of these threads may be rendering to OpenGL. Which means that they'll load a background. However, the problem is that glTexImage2D is very slow. Sometimes it's fast (in the order of 100-200 ms) but sometimes it's really slow (in the order of 6 seconds!). This is purely random. I assume it has to do with the fact that it can't access the hardware. So is there anyway to synchronize these activities, as in tell the OpenGL hardware to be ready for a texture? The same happens for when I create the list for the drawing of the backgroudn (however maximum is aroudn 2 seconds). This does not, however, happen when I start loading in my true type fonts( using freetype2 and FTGL).
    Any suggestions?
    Thanks

  2. #2
    Junior Member Newbie
    Join Date
    Sep 2001
    Location
    Toledo OH
    Posts
    29

    Re: Speed of glTexImage2D

    I am not realy sure about a blocking problem but one thing you might look at is how much textures you are feeding to openGL, if you are over filling the texture mem on your vid card its going to do the rendering for that in software, or it will swap data on your vid card, all taking a long time.

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Nov 2002
    Location
    Latvia
    Posts
    626

    Re: Speed of glTexImage2D

    When I was creating "game" I created all textures at the startup, before game actually started, so it didn't affected preformance at runtime. There is TexSubImage to get higher speeds.

    BTW, texture is assigned to uint, what will hapen if I call uint t=texture1, use t as texture, then call t=texture2 use t again. I've tried that out - works, but what happens with VRAM&RAM?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •