SFML community forums

Help => Graphics => Topic started by: Acrobat on July 12, 2012, 04:22:07 pm

Title: Software Render to Texture
Post by: Acrobat on July 12, 2012, 04:22:07 pm
Currently there are problems with hardware render to texture, does anyone tried to implement a software renderer ?
It's is important to support old cards. Something like prerender text on textures (localization), or else. Perfomance is not important.
Any ideas ?
Title: Re: Software Render to Texture
Post by: Laurent on July 12, 2012, 04:27:46 pm
Old cards don't need software rendering to support render-to-texture. SFML has a fallback which uses hardware acceleration in case the optimized technique is not supported, and which is supposed to work for any card that supports OpenGL 1.1.

The problem is that some cards pretend to support the optimized technique, but all we get is a buggy behaviour. The solution might be to force them to use the fallback.
Title: Re: Software Render to Texture
Post by: Acrobat on July 12, 2012, 04:31:58 pm
is it possible to force the old technique ?
Title: Re: Software Render to Texture
Post by: Acrobat on July 12, 2012, 04:40:55 pm
this is what we need to change ?
    if (priv::RenderTextureImplFBO::isAvailable())
    {
        // Use frame-buffer object (FBO)
        m_impl = new priv::RenderTextureImplFBO;
    }
    else
    {
        // Use default implementation
        m_impl = new priv::RenderTextureImplDefault;
    }
 
Title: Re: Software Render to Texture
Post by: Laurent on July 12, 2012, 07:27:47 pm
Yes, you can test the fallback quickly by forcing the code to use the RenderTextureImplDefault class.