mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-27 02:00:41 +00:00
51922ea5be
2934af8af0 Added Patreon sponsor link. c8f18b6f0f Getting current program only when required for vglDrawObjects. 4c5d136b0d Added directive to enable vitaShaRK usage from cmd. 4a10df3be5 Minor adjustments and bugfixes. 14a0124acf Added GL_TEXTURE_LOD_BIAS support. 40c8c6205e Added GL_NONE def and fixed glUniform4f impl. 868079c51e Added glUniform4f implementation. 0a682cbad2 Typo fix. be3ce61ae7 Added GL_DEPTH_BITS and GL_STENCIL_BITS support. 21e6d1d330 Added runtime shader compiler support. 696e40bc62 Beautify error handler code. 537b37b110 Added glUniform3fv implementation. 7dd1403015 Fixed GLenum size and added missing types defines. 0c75f27ff1 Moved to NEON optimized memcpy usage. 98951895de Added gluPerspective implementation. 23e0b0b309 Fix for vglInitExtended not working on sys app mode. 4989c33ef5 Run clang-format. 429f1c1d8a Added system mode support. 9231680d02 Initializing sceGxm before free mem checking on vglInitExtended. 091e5e7882 Added vglInitWithCustomSizes. f4c646ea78 Added vglSetParamBufferSize. 1b9a063c41 Beautify some code. 089e81efc5 Fix for duplicated symbols 789dcbf812 Typo fix in readRGBA4444. 1514a4b2cb Disabling lto due to it being broken on vitasdk with gcc 9.1. fca18d9ab7 Added support for RGBA4444 texture format. d449f12808 Added support for RGB565 texture format. git-subtree-dir: deps/vitaGL git-subtree-split: 2934af8af083a9acf598ab75233c518a251c6f0d
97 lines
2.8 KiB
Diff
97 lines
2.8 KiB
Diff
diff --git a/gfx/drivers_context/wgl_ctx.c b/gfx/drivers_context/wgl_ctx.c
|
|
index b90a8e40c3..e57c4df194 100644
|
|
--- a/gfx/drivers_context/wgl_ctx.c
|
|
+++ b/gfx/drivers_context/wgl_ctx.c
|
|
@@ -78,6 +78,47 @@
|
|
#ifndef WGL_CONTEXT_DEBUG_BIT_ARB
|
|
#define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001
|
|
#endif
|
|
+
|
|
+#ifndef WGL_ACCELERATION_ARB
|
|
+#define WGL_ACCELERATION_ARB 0x2003
|
|
+#endif
|
|
+
|
|
+#ifndef WGL_FULL_ACCELERATION_ARB
|
|
+#define WGL_FULL_ACCELERATION_ARB 0x2027
|
|
+#endif
|
|
+
|
|
+#ifndef WGL_DRAW_TO_WINDOW_ARB
|
|
+#define WGL_DRAW_TO_WINDOW_ARB 0x2001
|
|
+#endif
|
|
+
|
|
+#ifndef WGL_DOUBLE_BUFFER_ARB
|
|
+#define WGL_DOUBLE_BUFFER_ARB 0x2011
|
|
+#endif
|
|
+
|
|
+#ifndef WGL_RED_BITS_ARB
|
|
+#define WGL_RED_BITS_ARB 0x2015
|
|
+#endif
|
|
+
|
|
+#ifndef WGL_GREEN_BITS_ARB
|
|
+#define WGL_GREEN_BITS_ARB 0x2017
|
|
+#endif
|
|
+
|
|
+#ifndef WGL_BLUE_BITS_ARB
|
|
+#define WGL_BLUE_BITS_ARB 0x2019
|
|
+#endif
|
|
+
|
|
+#ifndef WGL_ALPHA_BITS_ARB
|
|
+#define WGL_ALPHA_BITS_ARB 0x201B
|
|
+#endif
|
|
+
|
|
+#ifndef WGL_PIXEL_TYPE_ARB
|
|
+#define WGL_PIXEL_TYPE_ARB 0x2013
|
|
+#endif
|
|
+
|
|
+#ifndef WGL_TYPE_RGBA_ARB
|
|
+#define WGL_TYPE_RGBA_ARB 0x202B
|
|
+#endif
|
|
+
|
|
#endif
|
|
|
|
#if defined(HAVE_OPENGL)
|
|
@@ -313,6 +354,43 @@ static void create_gl_context(HWND hwnd, bool *quit)
|
|
RARCH_LOG("[WGL]: Adaptive VSync supported.\n");
|
|
wgl_adaptive_vsync = true;
|
|
}
|
|
+ if (wgl_has_extension("WGL_ARB_pixel_format", extensions))
|
|
+ {
|
|
+ BOOL (WINAPI * wglChoosePixelFormatARB)
|
|
+ (HDC hdc,
|
|
+ const int *piAttribIList,
|
|
+ const FLOAT *pfAttribFList,
|
|
+ UINT nMaxFormats,
|
|
+ int *piFormats,
|
|
+ UINT *nNumFormats);
|
|
+ UINT nMatchingFormats;
|
|
+ int index = 0;
|
|
+ int attribsDesired[] = {
|
|
+ WGL_DRAW_TO_WINDOW_ARB, 1,
|
|
+ WGL_ACCELERATION_ARB, WGL_FULL_ACCELERATION_ARB,
|
|
+ WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_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
|
|
+ };
|
|
+ wglChoosePixelFormatARB = (BOOL (WINAPI *) (HDC, const int *,
|
|
+ const FLOAT*, UINT, int*, UINT*))
|
|
+ gfx_ctx_wgl_get_proc_address("wglChoosePixelFormatARB");
|
|
+
|
|
+ RARCH_LOG("[WGL]: ARB pixel format supported.\n");
|
|
+
|
|
+ if (wglChoosePixelFormatARB(win32_hdc, attribsDesired,
|
|
+ NULL, 1, &index, &nMatchingFormats))
|
|
+ {
|
|
+ if (nMatchingFormats == 0)
|
|
+ {
|
|
+ RARCH_WARN("No 10bpc WGL_ARB_pixel_formats found!\n");
|
|
+ }
|
|
+ }
|
|
+ }
|
|
}
|
|
}
|
|
#endif
|