HI Sebastian,

Could you list the error you are getting and what version of OpenGL you
have installed on your system?

Robert.


On 5 November 2013 13:35, Sebastian Messerschmidt <
[email protected]> wrote:

>  I'm currently building OSG with GL3 support and the build failes due to
> a missing definition of GL_RB.
> Also I never heard of GL_RB before. Are you sure it is not GL_RG?
>
>
>   A further refinement of my earlier suggested changes:
>
>  Index: Texture.cpp
> ===================================================================
> --- Texture.cpp (revision 13850)
> +++ Texture.cpp (working copy)
> @@ -1458,6 +1458,18 @@
>          case(GL_RGBA8_OES) : internalFormat = GL_RGBA; break;
>          default: break;
>      }
> +#elif defined(OSG_GL3_AVAILABLE)
> +    switch(internalFormat)
> +    {
> +        case(GL_INTENSITY) : internalFormat = GL_RED; break; // should it
> be swizzled to match RGBA(INTENSITY, INTENSITY, INTENSITY, INTENSITY)?
> +        case(GL_LUMINANCE) : internalFormat = GL_RED; break; // should it
> be swizzled to match RGBA(LUMINANCE, LUMINANCE, LUMINANCE, 1.0)?
> +        case(1) : internalFormat = GL_RED; break; // or sould this be
> GL_ALPHA?
> +        case(2) : internalFormat = GL_RG; break; // should we assume
> GL_LUMINANCE_ALPHA?
> +        case(GL_LUMINANCE_ALPHA) : internalFormat = GL_RB; break; //
> should it be swizlled to match RGAB(LUMUNIANCE, LUMINANCE, LUMINANCE,
> ALPHA)?
> +        case(3) : internalFormat = GL_RGB; break;
> +        case(4) : internalFormat = GL_RGBA; break;
> +        default: break;
> +    }
>  #endif
>
>
>
> On 22 October 2013 15:50, Robert Osfield <[email protected]> wrote:
>
>> Hi Lukasz,
>>
>> I have looked into how to internalFormat is processed with osg::Texture
>> and feel that we can probably achieve what is need for core profile builds
>> by extending a code block in Texture.cpp within the
>> Texture::computeInternalFormatWithImage(const osg::Image& image) method,
>> the change would be:
>>
>>
>>  ~/OpenSceneGraph/src/osg$ svn diff
>> Index: Texture.cpp
>> ===================================================================
>> --- Texture.cpp (revision 13850)
>> +++ Texture.cpp (working copy)
>> @@ -1458,6 +1458,15 @@
>>          case(GL_RGBA8_OES) : internalFormat = GL_RGBA; break;
>>          default: break;
>>      }
>> +#elif defined(OSG_GL3_AVAILABLE)
>> +    switch(internalFormat)
>>  +    {
>> +        case(1) : internalFormat = GL_RED; break;
>> +        case(2) : internalFormat = GL_RG; break;
>> +        case(3) : internalFormat = GL_RGB; break;
>> +        case(4) : internalFormat = GL_RGBA; break;
>> +        default: break;
>> +    }
>>  #endif
>>
>>      _internalFormat = internalFormat;
>>
>>
>>  I have attached the modified file, could you please test it.
>>
>>  Robert.
>>
>>
>
>
> _______________________________________________
> osg-submissions mailing 
> [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
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to