OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

GL3 Profile

Goto page 1, 2  Next
 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
dieslower81
User


Joined: 15 Feb 2010
Posts: 38

PostPosted: Sat Jun 23, 2018 5:19 pm    Post subject:
GL3 Profile
Reply with quote

Hi,

1) I've been playing around with GL3 and CORE profiles on windows, and noticed that for CORE, the CMake script makes VS look for GL/glcorearb.h and for GL3 profile it makes VS look for GL3/gl3.h neither of which are present on windows or VS. Just taking the glcorearb.h from the cronos page and placing it in the GL folder leads to other missing libraries.
Is this a bug? If I change the CMake script to just look for the standard gl/GL.h on windows, everything compiles and builds.
If that is how it should be, I can submit a fix for this, so that if set, GL3 profile would not create errors in the build, using only gl/GL.h and still turning off all the deprecated functions. Getting CORE to work is a bit more work....but at least GL3 will work...

2) When I do have GL3 profile enabled on windows, CMake turns off the fixed function pipeline and a few other deprecated functionalities. After I build OSG with this, most of the examples stop running correctly. I see a lot of GL errors and warning about things missing.
Is this a normal thing? Are they just not converted to using newer GL functionality?

_________________
Thank you,
--Maxim
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12093

PostPosted: Mon Jun 25, 2018 8:33 am    Post subject:
GL3 Profile
Reply with quote

Hi Maxim.

On Sat, 23 Jun 2018 at 18:19, Maxim Stere <> wrote:
Quote:
1) I've been playing around with GL3 and CORE profiles on windows, and noticed that for CORE, the CMake script makes VS look for GL/glcorearb.h and for GL3 profile it makes VS look for GL3/gl3.h neither of which are present on windows or VS. Just taking the glcorearb.h from the cronos page and placing it in the GL folder leads to other missing libraries.
Is this a bug? If I change the CMake script to just look for the standard gl/GL.h on windows, everything compiles and builds.
If that is how it should be, I can submit a fix for this, so that if set, GL3 profile would not create errors in the build, using only gl/GL.h and still turning off all the deprecated functions. Getting CORE to work is a bit more work....but at least GL3 will work...

This isn't a bug, just an awkward/inconstent way that GL3 is exposed
across platforms, so we've had to have GL3 and GLCORE variants to
attempt to cope with this. Within Cmake you can adjust the settings
yourself, the OPENGL_PROFILE are there to just provide defaults - best
guesses as to what you might need.


Quote:
2) When I do have GL3 profile enabled on windows, CMake turns off the fixed function pipeline and a few other deprecated functionalities. After I build OSG with this, most of the examples stop running correctly. I see a lot of GL errors and warning about things missing.
Is this a normal thing? Are they just not converted to using newer GL functionality?

This is normal. OpenGL core profile deliberatly drops all backwards
compatibility. OpenGL provides now mapping from fixed function
pipeline to shaders for us so to do this requires the whole fixed
function pipeline state to have a mapping matained by the OSG, this is
huge task so not something we can easily add.

Unless you need to run on MacOS with it's restrictions on exposing
modern GL features to just GLcore profile I would not recommend
building against GLcore profile, the whole deprecation strategy for
OpenGL has ended up a bit of mess and has caused more problems that it
solved. Outside of MacOS all the other desktop platforms still fully
support GL2 and with the advanced features all accessible via
extentions - the OSG will automatically set these all up for you. So
you can best of both worlds, continence of having fixed function still
work plus all the new features working as well.

Robert.


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
dieslower81
User


Joined: 15 Feb 2010
Posts: 38

PostPosted: Mon Jun 25, 2018 2:04 pm    Post subject:
Reply with quote

Hi Robert,

Quote:
This isn't a bug, just an awkward/inconstent way that GL3 is exposed
across platforms, so we've had to have GL3 and GLCORE variants to
attempt to cope with this. Within Cmake you can adjust the settings
yourself, the OPENGL_PROFILE are there to just provide defaults - best
guesses as to what you might need.

Would it help if I submit a fix for windows to make GL3 work out of the box when enabled?
It seems to be an easy one...

At least this way it will not error out if someone selects it...



Quote:

This is normal. OpenGL core profile deliberatly drops all backwards
compatibility. OpenGL provides now mapping from fixed function
pipeline to shaders for us so to do this requires the whole fixed
function pipeline state to have a mapping matained by the OSG, this is
huge task so not something we can easily add.

Right, that makes sense. Since it is a huge undertaking to upgrade everything, and since you know what examples use what GL version, would you be able to make a logic switch in cmake with the examples, that will exclude fixed function pipeline examples from the build when GL3 is enabled? This way users wont be going through 50 broken examples, trying to find one that works. This especially help new users who are trying out the engine.

_________________
Thank you,
--Maxim
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12093

PostPosted: Mon Jun 25, 2018 3:41 pm    Post subject:
GL3 Profile
Reply with quote

On Mon, 25 Jun 2018 at 15:59, Maxim Stere <> wrote:
Quote:
Would it help if I submit a fix for windows to make GL3 work out of the box?
It seems to be an easy one...

At least this way it will not error out if someone selects it...

You only get an error if you mismatch the CMake settings to the the
headers you have, these OPENGL_PROFILE is meant to help select the
appropriate headers. If you have gl3 headers (which are the old ones)
installed and try to use GLCORE then you should expect problems, and
have the modern GLcorearb.h installed and select GL3 then you'll get
problems.

So I don't think it's a case of "fixing" things for Windows. Just not
misusing it.

Robert.


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
dieslower81
User


Joined: 15 Feb 2010
Posts: 38

PostPosted: Mon Jun 25, 2018 4:52 pm    Post subject:
Reply with quote

Hi Robert,

It does not work like that on windows. Windows by default does not come with gl3.h or GLcorearb.h and neither does Visual Studio, so you need to install extra dependencies to make the OSG GL3 or GLCORE profiles to work. Otherwise you get errors when you select them as an option and try to build.
This prevents people from using the GL3 profile and GL3 graphics context because OSG will create and report a lower context version. Also if they want to have no older functions and turn off the fixed function pipeline they now have to do it manually through multiple cmake options instead of just defining OPENGL_PROFILE to GL3.
So the fix I can make is change the CMake script to use the modern default windows GL headers which will enable people to use the GL3 profile option, and configure cmake to disable everything that needs to be turned off in that case. I can make a PR if that makes sense.

_________________
Thank you,
--Maxim
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12093

PostPosted: Tue Jun 26, 2018 7:02 am    Post subject:
GL3 Profile
Reply with quote

HI Maxum,

On Mon, 25 Jun 2018 at 21:29, Maxim Stere <> wrote:
Quote:
It does not work like that on windows. Windows by default does not come with gl3.h or GLcorearb.h and neither does Visual Studio, so you need to install extra dependencies to make the OSG GL3 or GLCORE profiles to work. Otherwise you get errors when you select them as an option and try to build.
This prevents people from using the GL3 profile and GL3 graphics context because OSG will create and report a lower context version. Also if they want to have no older functions and turn off the fixed function pipeline they now have to do it manually through multiple cmake options instead of just defining OPENGL_PROFILE to GL3.
So the fix I can make is change the CMake script to use the modern default windows GL headers which will enable people to use the GL3 profile option, and configure cmake to disable everything that needs to be turned off in that case. I can make a PR if that makes sense.

As far as I'm aware VS just installs ancient GL headers, are you just
suggestion that you want to combine the OSG's fallbacks for these
ancient headers but with the OSG selecting just the GL3 code paths.

Are you suggestion another OPENGL_PROFILE path? Something like
GL3_WINDOWS? We can't break what is there already so if you want to
do something different then it has to be "yet another workaround for
the mess of different combinations of what should be standard".

Robert.


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
dieslower81
User


Joined: 15 Feb 2010
Posts: 38

PostPosted: Tue Jun 26, 2018 1:42 pm    Post subject:
Reply with quote

Hi Robert,

That is correct, I want to do a fallback.

We don't want to do anything like GL3_WINDOWS since most likely that will have to have a new external dependency. But if we make the GL3 profile fall back on what already is there, it might be missing a few functions that the user will have to link to manually in the windows environment, but at least the context version will be correct, and the deprecated functions will be gone.

Right now GL3 selection and auto configuration does not work on windows at all...

_________________
Thank you,
--Maxim
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12093

PostPosted: Tue Jun 26, 2018 3:42 pm    Post subject:
GL3 Profile
Reply with quote

Hi Maxim,

On Tue, 26 Jun 2018 at 14:59, Maxim Stere <> wrote:
Quote:
We don't want to do anything like GL3_WINDOWS since most likely that will have to have a new external dependency.

?? So you don't want to install the official glcorearb.h for some
reason, and me suggesition of just relying upon gl.h and have the OSG
add the extra's still isn't enough for you and think that you still
need an extra dependency.

Quote:
But if we make the GL3 profile fall back on what already is there, it might be missing a few functions that the user will have to link to manually in the windows environment, but at least the context version will be correct, and the deprecated functions will be gone.

?? What missing functions?

Quote:
Right now GL3 selection and auto configuration does not work on windows at all...

It might not be working for YOU, with you particular preference
for/against certain things, but I'm pretty sure that there are other
Windows users using GL3 without any issues.

I'm not a Window users myself so I'll defer to others to help you work
out what you need to do.

Robert.


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Daniel Emminizer, Code...
Guest





PostPosted: Tue Jun 26, 2018 4:16 pm    Post subject:
GL3 Profile
Reply with quote

Hi Maxim / Robert,

I am using GL3 on Windows. I had to download and slightly modify the Khronos glcorearb.h file, to get it working right with the declspec or dllimport or whatever it was. It was not trivial or obvious by any means. But it works now, after supplying that file.

I understand where you're coming from Maxim, but one thing I don't get:


Quote:
Quote:
So the fix I can make is change the CMake script to use the modern default windows GL headers which will enable people to use the GL3 profile option, and configure cmake to disable everything that needs to be turned off in that case.

What and where is the "modern default windows GL headers" ? I have the Windows Kit 8.1 installed currently. That's where my implementation is finding gl/GL.h. It has no glcorearb.h that I can find, and its GL.h is only defined up to OpenGL 1.1. Can you explain where the headers are that you're referring to?

I too would like it if Windows just worked better. But without the OS having a reasonable way to update the headers, I thought we were pretty much stuck with manually configuring OSG on the command line.

- Dan



Quote:
-----Original Message-----
From: osg-users [mailto:] On
Behalf Of Robert Osfield
Sent: Tuesday, June 26, 2018 11:42 AM
To: OpenSceneGraph Users
Subject: Re: GL3 Profile

Hi Maxim,

On Tue, 26 Jun 2018 at 14:59, Maxim Stere <> wrote:
Quote:
We don't want to do anything like GL3_WINDOWS since most likely that will
have to have a new external dependency.

?? So you don't want to install the official glcorearb.h for some
reason, and me suggesition of just relying upon gl.h and have the OSG
add the extra's still isn't enough for you and think that you still
need an extra dependency.

Quote:
But if we make the GL3 profile fall back on what already is there, it might be
missing a few functions that the user will have to link to manually in the
windows environment, but at least the context version will be correct, and
the deprecated functions will be gone.

?? What missing functions?

Quote:
Right now GL3 selection and auto configuration does not work on windows
at all...

It might not be working for YOU, with you particular preference
for/against certain things, but I'm pretty sure that there are other
Windows users using GL3 without any issues.

I'm not a Window users myself so I'll defer to others to help you work
out what you need to do.

Robert.



------------------
Post generated by Mail2Forum
Back to top
dieslower81
User


Joined: 15 Feb 2010
Posts: 38

PostPosted: Tue Jun 26, 2018 5:39 pm    Post subject:
Reply with quote

Hi Dan,

Quote:
I had to download and slightly modify the Khronos glcorearb.h file


That is actually what I'm trying to avoid. Having another dependency which users have to download and modify.

Quote:
What and where is the "modern default windows GL headers" ?


There is only one gl/GL.h in windows. It is the "modern" one since it will never be updated. It does not give you anything past OpenGL1.1 i think.
With my fix, users would still need to manually use the Open GL extension functions to access all the latest functionality as they do now, but they wont have to manually configure cmake.
My fix is only a cmake fix, not an OSG functionality fix. It lets the user define OPENGL_PROFILE before pressing "Configure" in windows cmake and automatically sets up the disabling of deprecated functions in OSG. Without it you have to know and manually select what you think should not be in the GL3 profile.
Robert already has that defined in CMake, in windows it is just never called unless you have the old gl3.h header...which no one does anymore. So this is more of an update.

I'll make a pull request, and let Robert look at it...

_________________
Thank you,
--Maxim
Back to top
View user's profile Send private message
dieslower81
User


Joined: 15 Feb 2010
Posts: 38

PostPosted: Fri Jun 29, 2018 3:12 am    Post subject:
Reply with quote

Made a PR #570

I will investigate windows GL libraries further, and see if I can make the Kronos GL headers work on windows without much modifications.
If I succeed I'll make another PR with fixes that will give users full GL functionality on Windows.

_________________
Thank you,
--Maxim
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12093

PostPosted: Fri Jun 29, 2018 8:40 am    Post subject:
GL3 Profile
Reply with quote

On Fri, 29 Jun 2018 at 04:29, Maxim Stere <> wrote:
Quote:

Made a PR #570

I will investigate windows GL libraries further, and see if I can make the Kronos GL headers work on windows without much modifications.
If I succeed I'll make another PR with fixes that will give users full GL functionality on Windows.

I have rejected this PR on ground that I absolutely appalled by your
choice of github handle. DieSlower? That's is incredibly obnoxious.
What on earth were you thinking? That people would respect you for
it? It's truly horrible.

I want this community to be respectful and professional. My
recommendation is that you delete your current github account and
start from scratch, respect yourself and those around, use a handle
that is either your own name or something positive.

Robert.


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
dieslower81
User


Joined: 15 Feb 2010
Posts: 38

PostPosted: Fri Jun 29, 2018 11:45 am    Post subject:
Reply with quote

Very well.
The name is actually a psychological test. It means different things depending on your outlook and demeanor. If you are more negative and take a more snap judgement outlook, then yes, it means something negative to you. If you you are a more positive person and look for a deeper meaning, you realize because of biology, that it's actually telling you to have a longer life.

_________________
Thank you,
--Maxim
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12093

PostPosted: Fri Jun 29, 2018 3:24 pm    Post subject:
GL3 Profile
Reply with quote

On Fri, 29 Jun 2018 at 12:54, Maxim Stere <> wrote:
Quote:
Very well.
The name is actually a psychological test. It means different things depending on your outlook and demeanor. If you are more negative and take a more snap judgement outlook, then yes, it means something negative to you. If you you are a more positive person and look for a deeper meaning, you realize because of biology, that it's actually telling you to have a longer life.

No it doesn't. It tells me you a steak of obnoxious twat who doesn't
give a shit or don't have a clue how others respond.

Please don't pull this "psychologocal test", I'm just being "clever"
shit. It's a ugly excuses for being obnoxious. *You* FUCKED up. It's
seem you haven't got a clue how stupid and insensitive you are. So
incredibly immature.

There are people out their struggling for physical and mental health,
or have loved ones who they have lost or struggling. I am not
thankfully in this boat personally but I know people who have, and I
absolutely wouldn't want anyone who is come up this crap.

You have lots all my respect in you choice of name *and* your
response. It's ugly and toxic. Is this what you intended? If so
please leave this community. If not, then you fucked up but may be
redeemable. First step is realizing out how offensive you've been and
fixing it.

I will not have anything to do with any support for you and will
reject all PR's until you fix this.

Robert.


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
dieslower81
User


Joined: 15 Feb 2010
Posts: 38

PostPosted: Fri Jun 29, 2018 4:14 pm    Post subject:
Reply with quote

Hi Robert,

I understand your opinion, but respectfully disagree.

This test has been working just fine for over 20 years. This is not something made up last night.

Quote:
There are people out their struggling for physical and mental health,
or have loved ones who they have lost or struggling.


This test has nothing to do with that, but when we met in Virginia, you told me about what your family went through, so I do understand why you might bring this up and your reaction.

My family has members who have intellectual disabilities, and members who work with disabled children, and are BCBAs by trade. So we are all psychology educated.

I respect all freedom of expression and freedom of choice, so if you don't want PR submissions from me to help out the project, that is completely understandable.

Thank you for making the GL3/gl3.h to GL/gl.h change anyway.

_________________
Thank you,
--Maxim
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts MacOSX/Core Profile: Attribute aliasi... remoe General 5 Tue Jul 31, 2018 8:27 am View latest post
No new posts Core Profile: glEnable/glDisable GL_P... Damian Dixon General 10 Sun Jul 29, 2018 1:24 pm View latest post
No new posts Terrain Deformation as per Road Profile umesh VirtualPlanetBuilder [vpb] 0 Mon Dec 04, 2017 4:44 pm View latest post
No new posts OSG is unable to create 3.3 core prof... ne0ndrag0n General 5 Sat Jul 22, 2017 4:21 pm View latest post
No new posts osgText and GL3.3 core profile Adun General 7 Wed Oct 05, 2016 7:04 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP