Hi Bill,

You make  no mention where you do your glGet call, so my guess is that
you are doing it from a thread which does not have the context
current.  My guess is that is that were just lucky that your original
code worked, relying on single threaded, single context viewer having
keeping the context current througout the main thread.  I say lucky
because any change to the number of contexts or threading would have
screwed up you code.  In 2.6 osgViewer by default releases the context
at the end of the renderingTraversals() call, you can switch this
release off, but then you still have ropey code that you need to fix
at your end.

The way to fix it for all combinations is to place you check in a
camera pre/post draw callback, or even better in a realize operation.

This topic has been discussed since 2.6 so please just check the archives.

Robert.

On Fri, Aug 15, 2008 at 10:12 PM, Poirier, Guillaume
<[EMAIL PROTECTED]> wrote:
>
> Hello again,
>
> My program outputs the maximum vertices output for a geometry shader as
> follows:
>
> GLint maxGeomVerts;
> glGetIntegerv(GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT, &maxGeomVerts);
> osg::notify(osg::NOTICE) << "Max geometry shader output vertices: " <<
> maxGeomVerts << std::endl;
>
> Interestingly, building with osg2.4 yields 1024, whereas the exact same
> program built with
> osg2.6 yields 0.
>
> Is this a bug ?
>
>
> regards,
>
>
> Bill
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to