Commit Graph

57 Commits

Author SHA1 Message Date
Techjar ff972e3673 Reformat repo to clang-format 7.0 rules 2019-05-06 18:48:04 +00:00
Stenzek ef3306e954 GLContext: Fix shared context creation error on Mesa
This was failing if the first version tried (4.6) didn't succeed.
2019-02-09 21:51:23 +10:00
Stenzek 2c6d96433c GLContext: Try GL versions 3.2-4.6 when getting a context
GLX previously was only creating a 4.0 context.
2018-10-20 21:11:34 +10:00
Stenzek 0559311f92 GLContext: Runtime selection of EGL/GLX on Linux 2018-10-20 21:11:34 +10:00
Stenzek 025e909773 GLContext: Use destructor instead of Shutdown() to cleanup
Also uses the Initialize() method to make the context current.
2018-10-20 21:11:34 +10:00
Stenzek 4b8d1c2b42 GLContext: Combine shared context initialization and creation 2018-10-20 21:11:34 +10:00
Stenzek 9c57a98723 GLContext: Use host connection
This also removes the need for a sleeping event thread.
2018-10-20 21:11:34 +10:00
Stenzek 134d967be2 Refactoring and cleanup of GLInterface (now GLContext) 2018-10-20 21:11:34 +10:00
Stenzek 74b82bab3b GLInterface: Drop Haiku support 2018-10-20 21:11:33 +10:00
Scott Mansell 0e6d01220a Fix change in comment meaning by autoformat. 2018-04-13 09:20:27 +12:00
spycrab 40bb9974f2 Reformat all the things! 2018-04-12 21:28:39 +02:00
Stenzek c82be53d5c GLInterface: Use EXT_swap_control or MESA_swap_control over SGI
The SGI extension does not define calling SwapInterval with a parameter
of zero as valid. It was just lucky that drivers interpreted this as
vsync off. The EXT_swap_control extension defines zero as a valid value.

Mesa does not appear to support the EXT variant, so we fall back to
MESA_swap_control here, which also supports zero.
2018-03-26 22:09:22 +10:00
Vlad Firoiu 45ac9b678d Require WINDOW_BIT if we have a window handle. 2017-12-29 23:20:16 -05:00
Vlad Firoiu eb59267196 Surfaceless egl rendering. 2017-12-29 19:35:43 -05:00
Stenzek 287859c5e1 GLInterface: Support surfaceless contexts on GLX 2017-08-02 20:12:28 +10:00
Leo Lam ca49de80c5 Merge pull request #5826 from JonnyH/WIP/add-option-to-prefer-GLES-when-using-EGL
Add "PreferGLES" option to EGL GLInterface
2017-07-31 16:43:38 +08:00
Stenzek 447aeb8f77 EGLInterface: Create shared context with same attributes as main context 2017-07-30 12:38:50 +10:00
Stenzek 3e508fc0a2 GLInterface: Support shared contexts on AGL 2017-07-30 12:38:49 +10:00
Ryan Houdek 01ae02482c GLInterface: Support shared contexts in GLX 2017-07-30 12:38:49 +10:00
Jonathan Hamilton 0fbd0cab6a Add "PreferGLES" option to EGL GLInterface
This makes the EGL interface select OpenGL|ES contexts over "desktop"
OpenGL ones.

Possibly not useful for anyone outside my own debugging, but you never
know
2017-07-26 19:26:36 -07:00
Jules Blok f3508742ac OGL: Support Quad-Buffered stereoscopy. 2017-07-05 22:43:39 +02:00
Shawn Hoffman 9357cee2ef do not assign in conditional statements 2017-06-07 20:09:44 -07:00
shuffle2 192fec50b9 Merge pull request #5276 from ligfx/macosheadless
Add headless support on macOS
2017-06-05 20:49:02 -07:00
Léo Lam d9fd056803 Fix minor formatting issues
These were not caught by the lint script while it was broken.
2017-06-05 02:32:19 +02:00
Michael Maltese c63925dc21 AGL: small style fixes 2017-04-15 20:54:19 -07:00
Michael Maltese 4770e66811 AGL: refactor some functions 2017-04-15 20:53:47 -07:00
Michael Maltese 5298328cb1 Add headless support on macOS 2017-04-15 19:34:42 -07:00
Matthew Parlane 85d74a506f Merge pull request #4951 from waddlesplash/haiku-2
Initial support for Haiku.
2017-03-28 17:19:35 +13:00
Augustin Cavalier 0831dad467 Initial support for Haiku. 2017-03-27 23:46:19 -04:00
Michael Maltese 3f8a471d64 EGL: Fix missing-braces warning
Fixes warning:

```
../Source/Core/Common/GL/GLInterface/EGL.cpp:57:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
      EGL_OPENGL_BIT, (1 << 6), /* EGL_OPENGL_ES3_BIT_KHR */
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
2017-03-25 17:09:50 -07:00
Michael Maltese 713ec5ffd5 Add includes for building on Windows without PCH 2017-01-23 01:37:41 -08:00
Stenzek 7353cae707 GLInterface: Implement core and shared context creation for WGL 2016-11-29 20:04:32 +10:00
Emmanuel Gil Peyrot c9e6b05ce9 Core: Remove double newlines at the end of *_LOG messages. 2016-11-02 02:09:33 +00:00
Michael Maltese cd19c9fa22 Don't force compile everything as Objective-C++ on macOS 2016-09-18 17:33:51 -07:00
Pierre Bourdon 3570c7f03a Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Karol Herbst c0e21871cd EGL: specify version first
allthough this is a mesa bug, this is a simple enough workaround for context
creation fails with EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR set.

Otherwise dolphin will fail to create 3.3+ core context with current mesa
version
2016-05-29 22:12:31 +02:00
sigmabeta c92f7ef173 Fix builds when using newest version of NDK 2016-05-25 14:23:35 -04:00
degasus 64f9941595 EGL: Also check for higher GL versions.
Seems like NVidia just ignores the forward compatible flag.
Additionally, they neither enable any extension which was designed later...
So either compatible profile, or a huge list of core profiles....
2016-03-01 07:55:57 +01:00
Ryan Houdek 018625e54f Rearrange GLInterface interface generation.
This will be important when we enable headless on Android
2016-02-05 10:53:32 -06:00
Ryan Houdek 19cd9ecf16 Fix a few missing includes 2016-02-05 10:50:08 -06:00
Ryan Houdek 628e9bad92 Support a headless EGL option.
This is a new option to support completely headless running of Dolphin without X11 on systems that can properly support it.
2016-01-27 15:04:14 -06:00
Ryan Houdek 184a7a3e0d Include the EGL defines we need for KHR_create_context ourselves.
This is because Google decided it was in their best interest to update eglext.h for android-21/arch-arm only and completely neglect all the other
architectures.
Sucks to suck.
2016-01-27 14:54:44 -06:00
Ryan Houdek 34d0e7835b Support the OpenGL core profile in EGL.
This should make our Mesa EGL users happy.
2016-01-27 14:54:32 -06:00
Ryan Houdek aed693eded Implement shared contexts in the EGL context.
This is being implemented here first under EGL since the infrastructure is already in place for this due to the Android code requiring some bits.
The rest of the interfaces will come in a little bit.

This will be required for threaded shader compiling in the near future.
2016-01-27 13:15:02 -06:00
Ryan Houdek 6448e5e5ee Add support to EGL to on the fly destroy the resulting surface 2016-01-10 12:28:05 -06:00
Lioncash f3c05d39b9 GLInterface: Make GLInterfaceMode an enum class 2016-01-02 14:26:43 -05:00
Lioncash 11a7defdba WGL: Make class member private 2016-01-02 14:26:41 -05:00
Lioncash df2f6089be GLInterface: Add missing override specifiers 2016-01-02 14:26:36 -05:00
Lioncash f295182833 VideoBackends: Simplify initialization and deinitialization of resources
Approximately three or four times now, the issue of pointers being
in an inconsistent state been an issue in the video backend renderers
with regards to tripping up other developers.

Global (ugh) resources are put into a unique_ptr and will always have a
well-defined state of being - null or not null
2015-12-20 22:40:37 -05:00
Ryan Houdek d9999bf30c Fix minor memory leak in WGL interface.
Would have a memory leak on game end
2015-12-13 11:42:18 -06:00