Hi Johannes, Peter and Ulrich,
Thanks for combined efforts on the fix. I've added my little two
pennies as well - the resize isn't required if you put the number of
elements in the vector into the vector constructor i.e.:
std::vector<GLint> formats(numFormats);
glGetIntegerv(GL_SHADER_BINARY_FORMATS, &formats[0]);
With this change we now have less lines of code and it's now robust ;-)
Changes now merged and checked into svn/trunk,
Cheers,
Robert.
On Tue, Mar 1, 2011 at 12:18 PM, Johannes Baeuerle <[email protected]> wrote:
> Hi Ulrich and Robert
>
> I implemented the changes from the previous suggestions. Please find attached
> another version of the shader class. My first suggestion is not contained in
> this fix.
>
> Due to the automatic destruction of the std::vector the delete call some
> lines later becomes obsolete.
>
> @Peter : Thanks for the hint with resize/reserve
>
> I have tested the fix in a gles2 environment and it works for me. On my
> platform I have to use binary shaders as source shaders are not supported at
> all.
>
> Cheers,
> Johannes
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=37210#37210
>
>
>
>
> Attachments:
> http://forum.openscenegraph.org//files/shader_137.zip
>
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org