New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve OpenGL context creation #884

Merged
merged 1 commit into from Sep 22, 2015

Conversation

Projects
None yet
4 participants
@binary1248
Member

binary1248 commented May 11, 2015

  • Make Glx context creation favour the attribsARB variant if it is available, just like how it is already done in the Wgl context creation.
  • Interpret context version settings <= 1.1 as requesting the most recent context version supported by the driver. This means the user will get the most recent version if they don't provide their own settings. There aren't any disadvantages to doing this.

@binary1248 binary1248 self-assigned this May 11, 2015

@binary1248 binary1248 added this to the 2.4 milestone May 11, 2015

};
// Append the terminating 0
attributes.push_back(0);
attributes.push_back(0);

This comment has been minimized.

@mantognini

mantognini Jul 4, 2015

Member

Is it intentional there're two terminating 0?

@mantognini

mantognini Jul 4, 2015

Member

Is it intentional there're two terminating 0?

This comment has been minimized.

@minirop

minirop Jul 4, 2015

glXCreateContextAttribsARB is probably reading values 2 by 2.

edit: the doc uses only 1 zero.

@minirop

minirop Jul 4, 2015

glXCreateContextAttribsARB is probably reading values 2 by 2.

edit: the doc uses only 1 zero.

This comment has been minimized.

@mantognini

mantognini Jul 4, 2015

Member

edit: the doc uses only 1 zero.

good to know. :-)

@mantognini

mantognini Jul 4, 2015

Member

edit: the doc uses only 1 zero.

good to know. :-)

// Append the terminating 0
attributes.push_back(0);
attributes.push_back(0);

This comment has been minimized.

@mantognini

mantognini Jul 4, 2015

Member

Same question.

@mantognini

mantognini Jul 4, 2015

Member

Same question.

This comment has been minimized.

@binary1248

binary1248 Jul 4, 2015

Member

The attributes are read in pairs... so theoretically the operating system doesn't have to read the second one, but who knows if it really does... There are a lot of broken things in X.

@binary1248

binary1248 Jul 4, 2015

Member

The attributes are read in pairs... so theoretically the operating system doesn't have to read the second one, but who knows if it really does... There are a lot of broken things in X.

This comment has been minimized.

@mantognini

mantognini Jul 4, 2015

Member

Alright. I didn't follow this policy on OS X though, for what it's worth.

@mantognini

mantognini Jul 4, 2015

Member

Alright. I didn't follow this policy on OS X though, for what it's worth.

@binary1248

This comment has been minimized.

Show comment
Hide comment
@binary1248

binary1248 Sep 17, 2015

Member

Bump.

Member

binary1248 commented Sep 17, 2015

Bump.

@eXpl0it3r

This comment has been minimized.

Show comment
Hide comment
@eXpl0it3r

eXpl0it3r Sep 20, 2015

Member

This PR has been added to my merge list, meaning it will be merged soon, unless someone raises any concerns.

Member

eXpl0it3r commented Sep 20, 2015

This PR has been added to my merge list, meaning it will be merged soon, unless someone raises any concerns.

Changed the GlxContext implementation to always try to use glXCreateC…
…ontextAttribsARB if it is available (was already done in the WGL implementation), specification of the context version attributes now only takes place when a context version greater than 1.1 is requested, requesting version 1.0 or 1.1 (default) will hint the driver to provide the most recent context version they support.

@eXpl0it3r eXpl0it3r merged commit c4be28b into master Sep 22, 2015

17 checks passed

sfml-debian-64-gcc Build #306 succeeded in 1 min 49 sec
Details
sfml-freebsd Build #822 succeeded in 6 min 19 sec
Details
sfml-osx Build #168 succeeded in 2 min 53 sec
Details
sfml-ubuntu-64-gcc Build #156 succeeded in 1 min 56 sec
Details
sfml-windows7-32-mingw492 Build #246 succeeded in 3 min 35 sec
Details
sfml-windows7-32-msvc10 Build #225 succeeded in 3 min 25 sec
Details
sfml-windows7-32-msvc11 Build #223 succeeded in 4 min 31 sec
Details
sfml-windows7-32-msvc12 Build #220 succeeded in 4 min 2 sec
Details
sfml-windows7-32-tdm471 Build #223 succeeded in 5 min 47 sec
Details
sfml-windows7-32-tdm481 Build #220 succeeded in 3 min 45 sec
Details
sfml-windows7-64-mingw492 Build #231 succeeded in 4 min 7 sec
Details
sfml-windows7-64-msvc10 Build #222 succeeded in 3 min 21 sec
Details
sfml-windows7-64-msvc11 Build #219 succeeded in 4 min 34 sec
Details
sfml-windows7-64-msvc12 Build #233 succeeded in 4 min 8 sec
Details
sfml-windows7-64-tdm471 Build #219 succeeded in 6 min 25 sec
Details
sfml-windows7-64-tdm481 Build #236 succeeded in 4 min 10 sec
Details
test Build #135 succeeded in 1 min 31 sec
Details

@eXpl0it3r eXpl0it3r deleted the bugfix/context_version branch Sep 22, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment