summaryrefslogtreecommitdiffstats
path: root/video/out/gl_w32.c
Commit message (Collapse)AuthorAgeFilesLines
* vo_opengl: move gl_* files to their own subdirNiklas Haas2015-09-091-302/+0
| | | | | This is mainly just to keep things a bit more organized and separated inside the codebase.
* win32: revert wchar_t changeswm42015-08-011-2/+2
| | | | | | | | | | | Revert "win32: more wchar_t -> WCHAR replacements" Revert "win32: replace wchar_t with WCHAR" Doing a "partial" port of this makes no sense anymore from my perspective. Revert the changes, as they're confusing without context, maintenance, and progress. These changes were a bit premature anyway, and might actually cause other issues (locale neutrality etc. as it was pointed out).
* win32: more wchar_t -> WCHAR replacementswm42015-07-301-2/+2
| | | | | | | | | | | | | This was essentially missing from commit 0b52ac8a. Since L"..." string literals have the type wchar_t[], we can't use them for UTF-16 strings. Use C11 u"..." string literals instead. These have the type char16_t[], but we simply assume char16_t is the same underlying type as WCHAR. In practice, they're both unsigned short. For this reason use -std=c11 on Windows. Since Windows is a "special" environment (we require either MinGW or Cygwin), we don't need to worry too much about compiler compatibility.
* vo_opengl: hardcode rquested GL version in backendswm42015-05-141-3/+2
| | | | | The requested version field didn't make much sense anymore, and was even partially ignored by some backends.
* Update license headersMarcin Kurczewski2015-04-131-4/+5
| | | | Signed-off-by: wm4 <wm4@nowhere>
* opengl: win32 - add option 'dwmflush' to sync in DWMAvi Halachmi (:avih)2015-04-091-0/+42
| | | | | | | This could help in cases where the DWM (Windows desktop compositor) adds another layer of bufferring and therefore the SwapBuffers timing could get messed up. Signed-off-by: wm4 <wm4@nowhere>
* vo_opengl: remove remnants of dropped stereo buffer supportwm42015-01-241-3/+0
|
* vo_opengl: cleanups after vo_opengl_old removalwm42015-01-211-2/+1
| | | | | | | | | | | | | Don't load all the legacy functions (including ancient extensions). Slightly simplify function loader and context creation, now that legacy GL doesn't need to be handled. Remove the code for drawing OSD in legacy mode. Remove all the header hacks, which were meant for ancient OpenGL headers which didn't even support things like OpenGL 1.3. Instead, adjust the GLX check to make sure we get both OpenGL 3x and 2.1 symbols. For win32 and OSX, we assume that the user has the latest headers anyway. For wayland, we hope that things somehow go right.
* win32: request UTF-16 API variants, Vista+ APIs, and COM C macroswm42015-01-071-1/+1
| | | | | Put the Vista+ (_WIN32_WINNT) and the COM C (COBJMACROS) defines into the build system, instead of defining them over and over in the code.
* win32: fix buildwm42014-08-051-1/+0
|
* win32: create OpenGL context on the GUI threadwm42014-08-051-12/+33
| | | | | | | | | | | | | | | | This fixes the fullscreen issues on Intel for me. I'm baffled by it and don't understand why this suddenly works. Intel drivers being shit? Windows being shit? HWND or HDC being only 97% thread-safe instead of 98%? Me missing something subtle that is not documented anywhere? Who knows. Now instead of creating the HDC and OpenGL context on the renderer thread, they're created on the GUI thread. The renderer thread will then only call wglMakeCurrent, SwapBuffers, and OpenGL standard functions. Probably fixes github issue #968.
* win32: cleanup OpenGL context creationwm42014-08-051-37/+33
| | | | | Might handle some corner cases better. In particular, always call wglMakeCurrent() with non-NULL HDC argument.
* win32: fix assertion failurewm42014-08-011-12/+10
| | | | | | | | If OpenGL 3.x doesn't work, the fallback to legacy GL will call the function to create the DC again, and it will assert. Just make it not to, and also simplify the code a bit. Fixes #974.
* win32: don't use CS_OWNDCwm42014-07-261-20/+63
| | | | | | | | | | | | | CS_OWNDC will make GetDC() always return the same HDC. This might become a problem when OpenGL rendering and window management are on different threads. Although I'm not too sure about this; our code never requests a HDC outside of the OpenGL backend, and it depends on whether win32 will internally request DCs. But in any case, this seems to be cleaner. Move the GL pixelformat setup code to gl_w32.c, where it's actually needed. This also fixes that SetPixelFormat() should be called only once, and not every time video params change.
* win32: make private struct private, refactorwm42014-07-261-4/+4
| | | | | | | | | | | | | | | | Preparation for moving win32 windowing to a separate thread. The codesize is reduced a bit, because some small functions are inlined, which reduces noise. The main change is that now most functions use the private struct directly, instead of accessing it indirectly through vo->w32. Accesses to vo are minimalized. The final goal is adding some sort of new windowing backend API. It would be cleaner to use that as context pointer for all functions (like struct vo was previously used), but since this is work in progress, we just go with this commit.
* gl_w32: remove unused variablewm42014-06-141-2/+0
|
* gl_w32: remove some non-sensewm42014-05-261-3/+1
| | | | Really now...
* video/out: remove unused config() parameterswm42014-05-071-2/+1
| | | | This was cleaned up yesterday.
* win32: don't use VOCTRL_UPDATE_SCREENINFOwm42014-05-061-1/+1
| | | | Not very tested. At least it compiles.
* gl_common: remove unneeded callbackwm42013-11-141-1/+0
| | | | We got rid of this some time ago, but apparently not completely.
* gl_common: complete mp_msg conversionwm42013-09-121-2/+2
| | | | Hopefully this works on Wayland and Cocoa, which I didn't test.
* gl_32: mp_msg conversionAlexander Preisinger2013-09-111-9/+7
|
* video/out: introduce vo_control for gl_common based VOswm42013-05-261-4/+1
| | | | | | | | | | | | | | | | Instead of having separate callbacks for each backend-handled feature (like MPGLContext.fullscreen, MPGLContext.border, etc.), pass the VOCTRL responsible for this directly to the backend. This allows removing a bunch of callbacks, that currently must be set even for optional/lesser features (like VOCTRL_BORDER). This requires changes to all VOs using gl_common, as well as all backends that support gl_common. Also introduce VOCTRL_CHECK_EVENTS. vo.check_events is now optional. VO backends can use VOCTRL_CHECK_EVENTS instead to implementing check_events. This has the advantage that the event handling code in VOs doesn't have to be duplicated if vo_control() is used.
* gl_common: split into platform specific fileswm42013-03-281-0/+218
Do this instead of stuffing all x11/cocoa/win32/wayland specific code into gl_common.c. The cocoa specific parts could probably go directly into cocoa_common.m, possibly same with wayland. Also redo how the list of backends is managed. Get rid of the GLTYPE_ constants. Instead of having a big switch() on GLTYPE_, each backend entry has a function pointer to setup the MPGLContext callback (e.g. mpgl_set_backend_x11()).