Am 05.11.2013 14:49, schrieb Robert Osfield:
HI Sebastian,
Could you list the error you are getting and what version of OpenGL
you have installed on your system?
Visual Studio 2010 output is:
error C2065: 'GL_RB' : undeclared identifier
d:\work\prj\OpenSceneGraph\src\OpenSceneGraph_trunk\src\osg\Texture.cpp 1497
I'm compiling trunk btw.
I've put the gl3 header into the systems directory, so this should be fine.
Anyways, GL_LUMINANCE_ALPHA is to be replaced with GL_RG in my opinion,
as GL_RB is not even defined, at least I did not find any reference to it.
http://www.opengl.org/sdk/docs/man/xhtml/glTexImage2D.xml
Robert.
On 5 November 2013 13:35, Sebastian Messerschmidt
<[email protected]
<mailto:[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] <mailto:[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 list
[email protected]
<mailto:[email protected]>
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
_______________________________________________
osg-submissions mailing list
[email protected]
<mailto:[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