Hi Chris,

On 12 January 2012 22:44, Chris 'Xenon' Hanson <xe...@alphapixel.com> wrote:
>
>  Just wanted to log a peculiar error I just dodged.
>
>  Ive been using a 1D texture to do contour lines on terrain, a common 
> technique. I had
> some trouble where it appeared that OSG was turning my GL_RGB UBYTE texture 
> into
> GL_UNSIGNED_SHORT as it was uploading. I'm not sure why this was. I also 
> tried adapting
> the very code from the osg osgtexture1D.cpp, create1DTextureStateToDecorate() 
> and it
> seemed to do the same.

Could you send this adapted code, or even better a version of
osgtexture1D.cpp that can be
run with a command line option (such as --ushort) to replicate this error?

>  I didn't debug it all the way into OSG, but I verified with gDebugger that 
> glTexImage1D
> was being called with GL_UNSIGNED_SHORT for some reason.
>
>  I switched to Texture2D, which seems to have no downside, and it works 
> properly.

I don't know what the issue is.  Texture2D has been used far more
heavily over the years than Texture1D
so I can imagine bugs that have been spotted and fixed in Texture2D
that haven't been in Texture1D.

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to