Re: texture loading thread




"Phil Frisbie, Jr." <phil@xxxxxxxxxxxx> wrote in message
news:43973cdc$0$38629$742ec2ed@xxxxxxxxxxxxxxxxx
> jgeduldig@xxxxxxxxx wrote:
>
>> The renderer in this situation is continuously rendering in realtime
>> for TV refresh rates. It's true that texture loading could be managed
>> during the small intervals between field refreshes.
>
> Have you actually timed the rendering time to see how much 'free' time you
> have each frame?
>
> Is this really a multi CPU workstation with a professional OpenGL card
> that has a multithread optimized OpenGL driver? If not then you are
> actually blocking the main rendering thread each time you call
> glTexImage2D() from a texture loading thread.
>
> Also, if you are loading a native texture format supported by your card
> then the texture load will be very fast, just a memcopy, if no 'swizzling'
> is needed.
>
>> I think this would
>> actually be more complicated than using a separate thread for texture
>> loading. I think other similar applications use a separate thread for
>> loading textures.
>
> Using a low priority thread to load from disc to memory is common, but not
> to load the texture into the OpenGL context.
>
> --
> Phil Frisbie, Jr.
> Hawk Software
> http://www.hawksoft.com

Yea, I'll second that. Actually, OpenGL is *NOT* in general thread-safe. It
won't block,
it will just plain screw up if called from 2 threads. And, of course,as with
many thread collision
problems, not right away and not often enough for a quick test to show it
up, and it may crash in
various interesting ways.

jbw



.



Relevant Pages

  • Re: Blending and transparent edges?
    ... In any real world OpenGL appliation you'll switching hence and forth ... If not, set a flag, start the texture loading ... sharing its object with the main rendering thread. ... missing textures and detail for a few frames. ...
    (comp.graphics.api.opengl)
  • Re: Blending and transparent edges?
    ... In any real world OpenGL appliation you'll switching hence and forth ... If not, set a flag, start the texture loading ... sharing its object with the main rendering thread. ... missing textures and detail for a few frames. ...
    (comp.graphics.api.opengl)
  • Re: 3D Data Rendering Strategies
    ... > What are the optimal strategies for viewing this with OpenGL? ... > planes and then apply a texture map to each plane. ... See "Volume rendering", there are lots of much more sophisticated ...
    (comp.graphics.api.opengl)
  • Textured lines performance (was: glClipPlane precision)
    ... model-space with glTexGendv and let OpenGL decide which side of the ... plane each vertex is and so calculate a texture coordinate based on ... grid around the ellipsoid and to colour it to ... I should also mentioned that I'm rendering antialiased lines and when I ...
    (comp.graphics.api.opengl)
  • Re: texture loading thread
    ... >> Have you actually timed the rendering time to see how much 'free' time ... >> a multithread optimized OpenGL driver? ... if you are loading a native texture format supported by your card ...
    (comp.graphics.api.opengl)