Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Modern OpenGL for Windows  (Read 4368 times)

0 Members and 1 Guest are viewing this topic.

Infinite

  • Newbie
  • *
  • Posts: 4
    • View Profile
Modern OpenGL for Windows
« on: May 07, 2014, 08:19:23 pm »
Does anyone have a neat little hack to get a 3.2+ core context for windows? I'd like to use SFML for Window Management/Sound/Networking. I'm quite comfortable with writing my own OpenGL code.

I got it to work on OS X and linux, but I can't get it to work on windows. Does anyone have any suggestions?

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Modern OpenGL for Windows
« Reply #1 on: May 07, 2014, 08:30:01 pm »
Is there a reason you can't use a 3.2+ compatibility context? There are subtle differences between a true core context and a compatibility context, but nothing that should make people worry about not wanting a compatibility context...

SFML currently has no way of specifying anything else but the version number of the context to be created. There was never a need for anything else. If you request a 4.4 context from SFML you will be able to use all 4.4 functions even though it is a compatibility context. The fact that a context is a compatibility context shouldn't really bother people. Just pretend it isn't there ;).
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

migizi

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Modern OpenGL for Windows
« Reply #2 on: May 07, 2014, 10:07:49 pm »
Does anyone have a neat little hack to get a 3.2+ core context for windows? I'd like to use SFML for Window Management/Sound/Networking. I'm quite comfortable with writing my own OpenGL code.

I got it to work on OS X and linux, but I can't get it to work on windows. Does anyone have any suggestions?

Did you get the actual core profile or just OGL 3.2/3.3? Like binary1248 says, they don't have the ability to specify a profile. The other question would be if you did get the core profile what GPU are you using?

There are subtle differences between a true core context and a compatibility context, but nothing that should make people worry about not wanting a compatibility context..

Doesn't the performance automatically increase when you specify a core profile over compatibility? Also I believe mesa on Linux doesn't do compatibility with anything above 3.2. I could be wrong but when I tried to use use compatibility profile with OGL 3.3 mesa would crash.

Yeah if you look at the release notes http://mesa3d.org/relnotes/10.0.html it states that compatibility context isn't supported.

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Modern OpenGL for Windows
« Reply #3 on: May 07, 2014, 10:19:34 pm »
Doesn't the performance automatically increase when you specify a core profile over compatibility?
Unless the compatibility context is implemented in a very stupid way (not likely but still possible) there should be no measureable performance penalty. The GL functions that are part of the API are only the API and don't define how the driver communicates with the hardware. The same elementary commands would probably be sent to the hardware regardless of whether newer functions or older functions are used (in a good implementation).

Also I believe mesa on Linux doesn't do compatibility with anything above 3.2. I could be wrong but when I tried to use use compatibility profile with OGL 3.3 mesa would crash.

Yeah if you look at the release notes http://mesa3d.org/relnotes/10.0.html it states that compatibility context isn't supported.
Mesa always lags behind the reference implementation. 3.3 is the latest it supports and compatibility isn't ready yet. When it is done it will support compatibility as well, and some time this year 4.x support is also supposed to show up. They didn't say "we won't support compatibility any more", they just said "it isn't done yet".
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

migizi

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Modern OpenGL for Windows
« Reply #4 on: May 07, 2014, 10:58:08 pm »
Yeah mesa is always behind but they are moving a lot faster now that linux is getting more gaming attention. I missed the part where they planned to implement compatibility profile.

As for the performance, I've read that using the core profile automatically increases performance in OGL because of the reduced overhead. At least that is what Graham Sellers states in the OGL Super Bible.

I'm not writing anything so intense that I need to edge out as much performance as possible, I just like to use the most efficient methods heh. But many people probably can't even see a performance difference between core and compatibility, unless it's Crysis 3 ;)

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Modern OpenGL for Windows
« Reply #5 on: May 08, 2014, 12:31:56 am »
But many people probably can't even see a performance difference between core and compatibility, unless it's Crysis 3 ;)
If only the CryEngine would run on OpenGL... Maybe AMD/Nvidia would actually care more about supporting it for gaming...
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

migizi

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Modern OpenGL for Windows
« Reply #6 on: May 08, 2014, 04:16:02 pm »
If only the CryEngine would run on OpenGL... Maybe AMD/Nvidia would actually care more about supporting it for gaming...

Ah but it is going to http://crytek.com/news/conference-attendees-can-also-see-a-brand-new-mobile-game-extra-engine-updates-and-much-more-at-crytek-s-booth

Pretty much all the major engine announced Linux support this year. Most are coming out with native SDKs as well. Expect much to change in the Linux driver and gaming sector in the next year.

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Modern OpenGL for Windows
« Reply #7 on: May 08, 2014, 05:06:14 pm »
So that it too can belong on the list of game engines that have supported OpenGL (Linux) for a long time. Unreal Engine, Id Tech, GameByro, and many others have been around forever with OpenGL and Linux support, and yet you don't see any games being released for that platform. I find it sad that it takes the lucrative mobile market to convince these companies to support anything else besides DirectX.

The worst part is, because these engines abstract from what rendering API they use, the studio using them for their next title shouldn't have to care about whether it uses OpenGL or DirectX for rendering and yet the fact that "Engine X uses DirectX YZ features" is always the main selling point of it with OpenGL support falling into the background.

Don't forget that AMD/Nvidia currently only produce hardware primarily for the desktop and consoles. Until many high profile games are ported to desktop Linux (not just mobile platforms) I don't think AMD/Nvidia will care about OpenGL any more than they do now.

You can look at http://www.amd.com/report to get an idea. If you did find an OpenGL specific bug (let alone on Linux) you will have a hard time providing any information using that form because it is obviously tailored primarily to gaming on Windows... using DirectX... I've seen reports of known OpenGL bugs on their support forums only to get replied to and never visited again, even months later.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

migizi

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Modern OpenGL for Windows
« Reply #8 on: May 08, 2014, 05:33:24 pm »
OpenGL will reign supreme again. Just like before DX9 came out.

I still think that Linux will see more adoption, especially once SteamOS is out of beta.

Either way I will continue to focus on OpenGL and Linux. I'm not a fan or Mac of Windows.

But back to the original question +1 for core profile support in SFML  :D