mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-17 23:31:45 +00:00
gdk: Add support for building with OpenGL on Xbox
This commit is contained in:
@@ -25,6 +25,38 @@
|
||||
|
||||
#if SDL_VIDEO_OPENGL_WGL
|
||||
|
||||
#if __XBOXONE__ || __XBOXSERIES__
|
||||
typedef struct tagPIXELFORMATDESCRIPTOR
|
||||
{
|
||||
WORD nSize;
|
||||
WORD nVersion;
|
||||
DWORD dwFlags;
|
||||
BYTE iPixelType;
|
||||
BYTE cColorBits;
|
||||
BYTE cRedBits;
|
||||
BYTE cRedShift;
|
||||
BYTE cGreenBits;
|
||||
BYTE cGreenShift;
|
||||
BYTE cBlueBits;
|
||||
BYTE cBlueShift;
|
||||
BYTE cAlphaBits;
|
||||
BYTE cAlphaShift;
|
||||
BYTE cAccumBits;
|
||||
BYTE cAccumRedBits;
|
||||
BYTE cAccumGreenBits;
|
||||
BYTE cAccumBlueBits;
|
||||
BYTE cAccumAlphaBits;
|
||||
BYTE cDepthBits;
|
||||
BYTE cStencilBits;
|
||||
BYTE cAuxBuffers;
|
||||
BYTE iLayerType;
|
||||
BYTE bReserved;
|
||||
DWORD dwLayerMask;
|
||||
DWORD dwVisibleMask;
|
||||
DWORD dwDamageMask;
|
||||
} PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR;
|
||||
#endif
|
||||
|
||||
struct SDL_GLDriverData
|
||||
{
|
||||
SDL_bool HAS_WGL_ARB_pixel_format;
|
||||
@@ -53,6 +85,19 @@ struct SDL_GLDriverData
|
||||
BOOL (WINAPI *wglGetPixelFormatAttribivARB)(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
|
||||
BOOL (WINAPI *wglSwapIntervalEXT)(int interval);
|
||||
int (WINAPI *wglGetSwapIntervalEXT)(void);
|
||||
#if __XBOXONE__ || __XBOXSERIES__
|
||||
BOOL (WINAPI *wglSwapBuffers)(HDC hdc);
|
||||
int (WINAPI *wglDescribePixelFormat)(HDC hdc,
|
||||
int iPixelFormat,
|
||||
UINT nBytes,
|
||||
LPPIXELFORMATDESCRIPTOR ppfd);
|
||||
int (WINAPI *wglChoosePixelFormat)(HDC hdc,
|
||||
const PIXELFORMATDESCRIPTOR *ppfd);
|
||||
BOOL (WINAPI *wglSetPixelFormat)(HDC hdc,
|
||||
int format,
|
||||
const PIXELFORMATDESCRIPTOR *ppfd);
|
||||
int (WINAPI *wglGetPixelFormat)(HDC hdc);
|
||||
#endif
|
||||
/* *INDENT-ON* */ /* clang-format on */
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user