I saw there were a lot of change in the trunk since i post this patch
so be aware it against trunk at 09/01/2015..
Tell me if you want it up to date


mp3butcher wrote:
> Hi, I repost this submission because I think it has been forgotten someway
> 
> Here's a small patch adressing win32 problems introduced with my previous 
> changes (missing #define under win32 added in osg/Program)
> Further I add few booleans in GLExtensions h et cpp...
> 
> PS:
> Don't know how to "link" 
> osg/Program #ifndef GL_ARB_transform_feedback2 
> with 
> osg/GLExtensions isTransformFeedbackSupported = 
> osg::isGLExtensionSupported(contextID, "GL_ARB_transform_feedback2");
> 
> 
> 
> Code:
> 
> Index: include/osg/GLExtensions
> ===================================================================
> --- include/osg/GLExtensions  (révision 14654)
> +++ include/osg/GLExtensions  (copie de travail)
> @@ -315,6 +315,8 @@
>          bool isBufferObjectSupported;
>          bool isPBOSupported;
>          bool isTBOSupported;
> +             bool isVAOSupported;
> +             bool isTransformFeedbackSupported;
>  
>          void (GL_APIENTRY * glGenBuffers) (GLsizei n, GLuint *buffers);
>          void (GL_APIENTRY * glBindBuffer) (GLenum target, GLuint buffer);
> Index: include/osg/Program
> ===================================================================
> --- include/osg/Program       (révision 14654)
> +++ include/osg/Program       (copie de travail)
> @@ -16,6 +16,7 @@
>  /* file:        include/osg/Program
>   * author:      Mike Weiblen 2008-01-02
>   *              Holger Helmich 2010-10-21
> + *              Julien Valentin 2015-01-09
>  */
>  
>  #ifndef OSG_PROGRAM
> @@ -31,6 +32,12 @@
>  #include <osg/Shader>
>  #include <osg/StateAttribute>
>  [b]
> +#ifndef GL_ARB_transform_feedback2
> +     #define GL_RASTERIZER_DISCARD 0x8C89
> +     #define GL_INTERLEAVED_ATTRIBS 0x8C8C
> +     #define GL_SEPARATE_ATTRIBS 0x8C8D
> +#endif[/b]
> +
>  namespace osg {
>  
>  class State;
> Index: src/osg/GLExtensions.cpp
> ===================================================================
> --- src/osg/GLExtensions.cpp  (révision 14654)
> +++ src/osg/GLExtensions.cpp  (copie de travail)
> @@ -678,8 +678,9 @@
>      setGLExtensionFuncPtr(glTexBuffer, "glTexBuffer","glTexBufferARB" );
>  
>      isPBOSupported = OSG_GL3_FEATURES || 
> osg::isGLExtensionSupported(contextID,"GL_ARB_pixel_buffer_object");
>      isUniformBufferObjectSupported = osg::isGLExtensionSupported(contextID, 
> "GL_ARB_uniform_buffer_object");
>      isTBOSupported = 
> osg::isGLExtensionSupported(contextID,"GL_ARB_texture_buffer_object");
> +     isVAOSupported = osg::isGLExtensionSupported(contextID, 
> "GL_ARB_vertex_array_object");
> +     isTransformFeedbackSupported = osg::isGLExtensionSupported(contextID, 
> "GL_ARB_transform_feedback2");
>  
>  
> 
> 
> 
> PS again:reading the specs again
> https://www.opengl.org/registry/specs/ARB/transform_feedback2.txt
> https://www.opengl.org/registry/specs/ARB/transform_feedback3.txt
> I have doubts about portability without AMD/NVIDIA GTX "big" cards.
> Would require users feedback from exotic driver...
> 
> 
> Thank you!
> 
> Cheers,
> Julien


------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=62346#62346





_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to