Re: [osg-users] glsl version 130 not supported (and related problems)

2016-12-21 Thread Hartwig Wiesmann
Hi,

did you solve your issue? In case you are using osgViewer's GraphicsWindowCocoa 
class there has once been a change in OSG: it explicitely specifies the OpenGL 
core version 4.1.
If you specify the legacy version you should be fine. You can find the line for 
patching in osgViewer::GraphicsWindowCocoa::realizeImplemenation() (last OpenGL 
profile attribute).

Cheers,
Hartwig

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] glsl version 130 not supported (and related problems)

2016-11-14 Thread Bruno Oliveira
Well I did some more research, and once again tried to tackled this
problem. If someone has already tried to use the current master branch on
OSX 10.12, could maybe give me some more in
I am using Qt 5.7 by the way.

This is what I tried so far:
Clone current master (which has, I think, the VAO branch merge onto it).
On CMake selected OPENGL_PROFILE=GLCORE. Deactivated GL1 and GL2 support,
activated GL3 support,and *deactivated* :
OSG_GL_FIXED_FUNCTION_AVAILABLE
OSG_GL_DISPLAYLISTS__AVAILABLE
OSG_GL_VERTEX_FUNCS_AVAILABLE
Compiled and installed, everything went smoothly.

Then in my app, I have to request a Core Profile. I am doing so using Qt's
QSurfaceFormat::setDefaultFormat() so request a OpenGL 3.2 Core Profile.

Also, in my OSG code, before I instantiate an osgViewer::Viewer, I use (as
Robert suggested)
osg::DisplaySettings::instance()->setVertexBufferHint(osg::
DisplaySettings::VERTEX_ARRAY_OBJECT);
and this effectively makes OSG print a message indicating it is requesting
the usage of VAO objects.


Now, with this setup, nothing is rendered on the screen, and I get lots of
shader compilation errors (These come from Qt). If I DON'T asctivate the
Core profile using the Qt API, These errsod o not appear, but when I try to
render a point cloud in a PagedLOD node, only white points start to appear
and after some LOD's are loaded the app crashes.


2016-11-13 15:21 GMT+00:00 Robert Osfield :

> On 12 November 2016 at 22:24, Bruno Oliveira
>  wrote:
> > I was now trying to solve this and searched for OSX VAO related posts,
> but
> > could not find relevant instructions on how to compile for OpenGL Core
> > Profile under OSX. Could you perhaps give some link to those discussions?
>
> As I'm not an OSX user I can't personally answer this without goig
> searching the mailing list/forum archives and the website.  Pointless
> me doing it when you could do it.
>
> Robert.
> ___
> 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


Re: [osg-users] glsl version 130 not supported (and related problems)

2016-11-13 Thread Robert Osfield
On 12 November 2016 at 22:24, Bruno Oliveira
 wrote:
> I was now trying to solve this and searched for OSX VAO related posts, but
> could not find relevant instructions on how to compile for OpenGL Core
> Profile under OSX. Could you perhaps give some link to those discussions?

As I'm not an OSX user I can't personally answer this without goig
searching the mailing list/forum archives and the website.  Pointless
me doing it when you could do it.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] glsl version 130 not supported (and related problems)

2016-11-12 Thread Bruno Oliveira
Hello,

I was now trying to solve this and searched for OSX VAO related posts, but
could not find relevant instructions on how to compile for OpenGL Core
Profile under OSX. Could you perhaps give some link to those discussions?

2016-10-26 9:00 GMT+01:00 Robert Osfield :

> Hi Bruno,
>
> On 25 October 2016 at 23:53, Bruno Oliveira
>  wrote:
> > I'm sorry but that did not work for me. I indeed created a new clone of
> the
> > OSG's master, recompiled OSG along with my app and I get a huge amount of
> > 'invalid operation' errors when trying to draw a simple scene that would
> > otherwise work...
>
> When I shortly after I first announced the vertex_array_object branch
> I asked for feedback on OSX GL3 core profile support and got feedback
> that the new VAO support for functioning and enabling GL3 usage under
> OSX.
>
> I don't have a OSX system so can't personally test, the best I can do
> provide general directions for others who have OSX to do testing and
> roll in any fixes that are required.
>
> For yourself I would recommend having a look through the threads on
> VAO over the last two months looking for discussions on the OSX, this
> might help you on your way.
>
> You'll also need patience, Apple over the years have made various
> changes that break builds and runtimes, or limit functionality to a
> narrow set of usage cases. Over the years I have worked under OSX at
> different points, but these days I'm more than happy to stay away from
> OSX, Apple have moved the goal posts so many times that it's a painful
> platform to support.  I say this prepare you for the effort required
> to port and then maintain your application on OSX, giving you the
> required time and resources for OSX  support is something that your
> management will need to be aware of and supportive of.
>
> On the OSG side I can't wave a magic wand and fix all the problems,
> one of the main motivations for adding VAO support to the OSG was
> fixing things under OSX.  I spent 6 weeks work unpaid on this to make
> it possible but as I don't have OSX I can't do the final testing.
> Others in the OSG that have OSX will need to help refine things if
> they need it and support each other.
>
> Robert.
> ___
> 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


Re: [osg-users] glsl version 130 not supported (and related problems)

2016-10-26 Thread Robert Osfield
Hi Bruno,

On 25 October 2016 at 23:53, Bruno Oliveira
 wrote:
> I'm sorry but that did not work for me. I indeed created a new clone of the
> OSG's master, recompiled OSG along with my app and I get a huge amount of
> 'invalid operation' errors when trying to draw a simple scene that would
> otherwise work...

When I shortly after I first announced the vertex_array_object branch
I asked for feedback on OSX GL3 core profile support and got feedback
that the new VAO support for functioning and enabling GL3 usage under
OSX.

I don't have a OSX system so can't personally test, the best I can do
provide general directions for others who have OSX to do testing and
roll in any fixes that are required.

For yourself I would recommend having a look through the threads on
VAO over the last two months looking for discussions on the OSX, this
might help you on your way.

You'll also need patience, Apple over the years have made various
changes that break builds and runtimes, or limit functionality to a
narrow set of usage cases. Over the years I have worked under OSX at
different points, but these days I'm more than happy to stay away from
OSX, Apple have moved the goal posts so many times that it's a painful
platform to support.  I say this prepare you for the effort required
to port and then maintain your application on OSX, giving you the
required time and resources for OSX  support is something that your
management will need to be aware of and supportive of.

On the OSG side I can't wave a magic wand and fix all the problems,
one of the main motivations for adding VAO support to the OSG was
fixing things under OSX.  I spent 6 weeks work unpaid on this to make
it possible but as I don't have OSX I can't do the final testing.
Others in the OSG that have OSX will need to help refine things if
they need it and support each other.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] glsl version 130 not supported (and related problems)

2016-10-25 Thread Bruno Oliveira
I'm sorry but that did not work for me. I indeed created a new clone of the
OSG's master, recompiled OSG along with my app and I get a huge amount of
'invalid operation' errors when trying to draw a simple scene that would
otherwise work...

2016-10-24 13:36 GMT+01:00 Bruno Oliveira :

> Thank you Robert for the extensive answer. I will test it today and
> provide feedback ASAP. Unfortunately OSX support is a requirement for my
> software.
>
> Thank you Tony for the link. I think you're right. It's probably some
> marketing strategy.
>
> 2016-10-24 9:10 GMT+01:00 Tony Vasile :
>
>> This may also help: http://stackoverflow.com/quest
>> ions/19865463/opengl-4-1-under-mavericks . It seems the Apple have truly
>> crippled their OpenGL support  or they want everyone to write Objective C
>> under XCode.
>>
>> 
>> Tony V
>>
>> --
>> Read this topic online here:
>> http://forum.openscenegraph.org/viewtopic.php?p=69131#69131
>>
>>
>>
>>
>>
>> ___
>> 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


Re: [osg-users] glsl version 130 not supported (and related problems)

2016-10-24 Thread Bruno Oliveira
Thank you Robert for the extensive answer. I will test it today and provide
feedback ASAP. Unfortunately OSX support is a requirement for my software.

Thank you Tony for the link. I think you're right. It's probably some
marketing strategy.

2016-10-24 9:10 GMT+01:00 Tony Vasile :

> This may also help: http://stackoverflow.com/
> questions/19865463/opengl-4-1-under-mavericks . It seems the Apple have
> truly crippled their OpenGL support  or they want everyone to write
> Objective C under XCode.
>
> 
> Tony V
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=69131#69131
>
>
>
>
>
> ___
> 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


Re: [osg-users] glsl version 130 not supported (and related problems)

2016-10-24 Thread Tony Vasile
This may also help: 
http://stackoverflow.com/questions/19865463/opengl-4-1-under-mavericks . It 
seems the Apple have truly crippled their OpenGL support  or they want everyone 
to write Objective C under XCode.


Tony V

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] glsl version 130 not supported (and related problems)

2016-10-24 Thread Robert Osfield
Hi Bruno,

Apple have made life difficult for OpenGL developers in the way they
have tackled modern OpenGL support so it tends to be awkward and
behind the curve on latest features.  It's the Apple way to mess
developers around though, unfortunately you just have accept the rough
with the smooth under OSX if you want to support it.  Personally I
wouldn't recommend OSX for OpenGL these days, so if you have choice
then Windows or Linux will likely lead to an easier life.

On the OSX front if you want to use the latest GL features you are
forced to use OpenGL core profile and dump all the backwards
compatibility support the other platforms provide.  So have to build
the OSG with the just the core profile enabled and fixed function
disabled, you'll also need to use the latest OSG dev work (master is
probably best) as it includes the VAO support you'll need.  The OSG
CMake system has an OPENGL_PROFILE var that you can set to GL3 or
GLCORE via:

   cmake OPENGL_PROFILE=GLCORE

If you are have already built the OSG then you'll want to remove the
previous CMakeCache.txt to make sure the CMake runs all setup afresh.

Once the OSG has been set up then you'll need to enable Vertex Array
Object usage by setting the osg::DisplaySetting::setVertexBufferHint()
with VERTEX_ARRAY_OBJECT prior to setting up the viewer i.e.

osg::DisplaySettings::instance()->setVertexBufferHint(osg::DisplaySettings::VERTEX_ARRAY_OBJECT);

osgViewer:Viewer viewer(..).
...


Or set the default value via the OSG_VERTEX_BUFFER_HINT to VERTEX_ARRAY_OBJECT.

Once the VAO work is more widely tested and debugged setting the VAO
hint on by default should be possible, but for now it's still a manual
step.

I realise this is a bit of pain, but that's down to the games that
Apple plays, provides sub par support and in a manner of it's choosing
not the type of solution that best fits the needs of developers.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] glsl version 130 not supported (and related problems)

2016-10-22 Thread Bruno Oliveira
Hello,

I am using a fragment shader that requires #version 130
I use OSG 3.5.5 and Qt 5.7 on MacOS 10.12

This results in a shader compilation error, 'version 130 not supported'

I tried compiling OSG with GL3 enabled, but the error persists. Then I
tried to activate a Core Profile globally in Qt using QFurfaceFormat (just
ensures that a 3.3. Core profile is set globally for all widgets): but
after I do this and start using a Core profile, I get tons of errors from
OSG pipeline and can't render anything at all.


What should I do here?

Thanks
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org