[osg-users] Possibility to cast/convert TextureRectangle to Texture2D

Robert Osfield robert.osfield at gmail.com
Mon Jun 25 06:03:27 PDT 2018

Hi Tim,

I just don't understand why Texture2D isn't sufficient for everything
you are doing.  glTextureRectangle is deprecated, it was a temporary
workaround added to OpenGL, you shouldn't need it at all now that
OpenGL fully support non power of two textures.

So please just use Texture2D all the way.

On Mon, 25 Jun 2018 at 13:55, Tim Whowantstoknow <Tare.noN at web.de> wrote:
> The problem that I have is that for the GBuffer in our deferred rendering pipeline, every texture is a Texture2D. The result of the lighting step is also a Texture2D. However, the last step, a lens simulation, is a TextureRectangle which get's positioned on the screen and then just displayed in a last step.
> The output of the deferred pipeline is wrong (or non-existend), so I'm trying to debug and see, where in the pipeline the error is. For that purpose, I want to display the individual steps of the Pipeline, i.e. the textures within the GBuffer, the output of the lighting step and in the end the lens simulation. We are planning our update from very old OpenGL to OpenGL4, but until that is done I have to work with texture2D and texture2DRect as the glsl methods to access the textures. And I have to change the shader code additionally if I want to change the input texture from Texture2D to TextureRectangle, which adds a lot of time for debugging purposes. It's just inconvenient to do and therefore it'd be a whole lot easier to just change the input texture from Texture2D to TextureRectangle and display it.
> I hope I could explain this sufficiently...
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=74145#74145
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

More information about the osg-users mailing list