[vlc-commits] vout:wgl: add a TODO to handle higher bit depth on Windows
Steve Lhomme
git at videolan.org
Mon Jan 28 10:22:08 CET 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Jan 25 12:22:04 2019 +0100| [80f66a5f416681ec747bb5422928be55351d6e2b] | committer: Steve Lhomme
vout:wgl: add a TODO to handle higher bit depth on Windows
On my system it doesn't find any matching format.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=80f66a5f416681ec747bb5422928be55351d6e2b
---
modules/video_output/win32/wgl.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/modules/video_output/win32/wgl.c b/modules/video_output/win32/wgl.c
index a4325ea32d..3e485bffe1 100644
--- a/modules/video_output/win32/wgl.c
+++ b/modules/video_output/win32/wgl.c
@@ -196,6 +196,24 @@ static int Open(vlc_object_t *object)
}
wglMakeCurrent(sys->hGLDC, sys->hGLRC);
+#if 0 /* TODO pick higher display depth if possible and the source requires it */
+ int attribsDesired[] = {
+ WGL_DRAW_TO_WINDOW_ARB, 1,
+ WGL_ACCELERATION_ARB, WGL_FULL_ACCELERATION_ARB,
+ WGL_RED_BITS_ARB, 10,
+ WGL_GREEN_BITS_ARB, 10,
+ WGL_BLUE_BITS_ARB, 10,
+ WGL_ALPHA_BITS_ARB, 2,
+ WGL_DOUBLE_BUFFER_ARB, 1,
+ 0,0
+ };
+
+ UINT nMatchingFormats;
+ int index = 0;
+ PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormatARB__ = (PFNWGLCHOOSEPIXELFORMATARBPROC)wglGetProcAddress( "wglChoosePixelFormatARB" );
+ if (wglChoosePixelFormatARB__!= NULL)
+ wglChoosePixelFormatARB__(sys->hGLDC, attribsDesired, NULL, 1, &index, &nMatchingFormats);
+#endif
#ifdef WGL_EXT_swap_control
/* Create an GPU Affinity DC */
const char *extensions = (const char*)glGetString(GL_EXTENSIONS);
More information about the vlc-commits
mailing list