src/video/windows/SDL_windowsopengl.h
author Sam Lantinga <slouken@libsdl.org>
Fri, 11 Feb 2011 22:37:15 -0800
changeset 5262 b530ef003506
parent 5062 e8916fe9cfc8
child 5535 96594ac5fd1a
permissions -rw-r--r--
Happy 2011! :)
slouken@1913
     1
/*
slouken@1913
     2
    SDL - Simple DirectMedia Layer
slouken@5262
     3
    Copyright (C) 1997-2011 Sam Lantinga
slouken@1913
     4
slouken@1913
     5
    This library is free software; you can redistribute it and/or
slouken@1913
     6
    modify it under the terms of the GNU Lesser General Public
slouken@1913
     7
    License as published by the Free Software Foundation; either
slouken@1913
     8
    version 2.1 of the License, or (at your option) any later version.
slouken@1913
     9
slouken@1913
    10
    This library is distributed in the hope that it will be useful,
slouken@1913
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@1913
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@1913
    13
    Lesser General Public License for more details.
slouken@1913
    14
slouken@1913
    15
    You should have received a copy of the GNU Lesser General Public
slouken@1913
    16
    License along with this library; if not, write to the Free Software
slouken@1913
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
slouken@1913
    18
slouken@1913
    19
    Sam Lantinga
slouken@1913
    20
    slouken@libsdl.org
slouken@1913
    21
*/
slouken@1913
    22
#include "SDL_config.h"
slouken@1913
    23
slouken@5062
    24
#ifndef _SDL_windowsopengl_h
slouken@5062
    25
#define _SDL_windowsopengl_h
slouken@1913
    26
slouken@1952
    27
#if SDL_VIDEO_OPENGL_WGL
slouken@1913
    28
slouken@1913
    29
struct SDL_GLDriverData
slouken@1913
    30
{
slouken@1913
    31
    int WGL_ARB_pixel_format;
slouken@1913
    32
slouken@1913
    33
    void *(WINAPI * wglGetProcAddress) (const char *proc);
slouken@1913
    34
      HGLRC(WINAPI * wglCreateContext) (HDC hdc);
slouken@1913
    35
      BOOL(WINAPI * wglDeleteContext) (HGLRC hglrc);
slouken@1913
    36
      BOOL(WINAPI * wglMakeCurrent) (HDC hdc, HGLRC hglrc);
slouken@1913
    37
      BOOL(WINAPI * wglChoosePixelFormatARB) (HDC hdc,
slouken@1913
    38
                                              const int *piAttribIList,
slouken@1913
    39
                                              const FLOAT * pfAttribFList,
slouken@1913
    40
                                              UINT nMaxFormats,
slouken@1913
    41
                                              int *piFormats,
slouken@1913
    42
                                              UINT * nNumFormats);
slouken@1913
    43
      BOOL(WINAPI * wglGetPixelFormatAttribivARB) (HDC hdc, int iPixelFormat,
slouken@1913
    44
                                                   int iLayerPlane,
slouken@1913
    45
                                                   UINT nAttributes,
slouken@1913
    46
                                                   const int *piAttributes,
slouken@1913
    47
                                                   int *piValues);
slouken@1913
    48
    void (WINAPI * wglSwapIntervalEXT) (int interval);
slouken@1913
    49
    int (WINAPI * wglGetSwapIntervalEXT) (void);
slouken@1913
    50
};
slouken@1913
    51
slouken@1913
    52
/* OpenGL functions */
slouken@1913
    53
extern int WIN_GL_LoadLibrary(_THIS, const char *path);
slouken@1913
    54
extern void *WIN_GL_GetProcAddress(_THIS, const char *proc);
slouken@3057
    55
extern void WIN_GL_UnloadLibrary(_THIS);
slouken@1913
    56
extern int WIN_GL_SetupWindow(_THIS, SDL_Window * window);
slouken@1913
    57
extern SDL_GLContext WIN_GL_CreateContext(_THIS, SDL_Window * window);
slouken@1913
    58
extern int WIN_GL_MakeCurrent(_THIS, SDL_Window * window,
slouken@1913
    59
                              SDL_GLContext context);
slouken@1913
    60
extern int WIN_GL_SetSwapInterval(_THIS, int interval);
slouken@1913
    61
extern int WIN_GL_GetSwapInterval(_THIS);
slouken@1913
    62
extern void WIN_GL_SwapWindow(_THIS, SDL_Window * window);
slouken@1913
    63
extern void WIN_GL_DeleteContext(_THIS, SDL_GLContext context);
slouken@1913
    64
slouken@1913
    65
#ifndef WGL_ARB_pixel_format
slouken@1913
    66
#define WGL_NUMBER_PIXEL_FORMATS_ARB   0x2000
slouken@1913
    67
#define WGL_DRAW_TO_WINDOW_ARB         0x2001
slouken@1913
    68
#define WGL_DRAW_TO_BITMAP_ARB         0x2002
slouken@1913
    69
#define WGL_ACCELERATION_ARB           0x2003
slouken@1913
    70
#define WGL_NEED_PALETTE_ARB           0x2004
slouken@1913
    71
#define WGL_NEED_SYSTEM_PALETTE_ARB    0x2005
slouken@1913
    72
#define WGL_SWAP_LAYER_BUFFERS_ARB     0x2006
slouken@1913
    73
#define WGL_SWAP_METHOD_ARB            0x2007
slouken@1913
    74
#define WGL_NUMBER_OVERLAYS_ARB        0x2008
slouken@1913
    75
#define WGL_NUMBER_UNDERLAYS_ARB       0x2009
slouken@1913
    76
#define WGL_TRANSPARENT_ARB            0x200A
slouken@1913
    77
#define WGL_TRANSPARENT_RED_VALUE_ARB  0x2037
slouken@1913
    78
#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038
slouken@1913
    79
#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
slouken@1913
    80
#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
slouken@1913
    81
#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B
slouken@1913
    82
#define WGL_SHARE_DEPTH_ARB            0x200C
slouken@1913
    83
#define WGL_SHARE_STENCIL_ARB          0x200D
slouken@1913
    84
#define WGL_SHARE_ACCUM_ARB            0x200E
slouken@1913
    85
#define WGL_SUPPORT_GDI_ARB            0x200F
slouken@1913
    86
#define WGL_SUPPORT_OPENGL_ARB         0x2010
slouken@1913
    87
#define WGL_DOUBLE_BUFFER_ARB          0x2011
slouken@1913
    88
#define WGL_STEREO_ARB                 0x2012
slouken@1913
    89
#define WGL_PIXEL_TYPE_ARB             0x2013
slouken@1913
    90
#define WGL_COLOR_BITS_ARB             0x2014
slouken@1913
    91
#define WGL_RED_BITS_ARB               0x2015
slouken@1913
    92
#define WGL_RED_SHIFT_ARB              0x2016
slouken@1913
    93
#define WGL_GREEN_BITS_ARB             0x2017
slouken@1913
    94
#define WGL_GREEN_SHIFT_ARB            0x2018
slouken@1913
    95
#define WGL_BLUE_BITS_ARB              0x2019
slouken@1913
    96
#define WGL_BLUE_SHIFT_ARB             0x201A
slouken@1913
    97
#define WGL_ALPHA_BITS_ARB             0x201B
slouken@1913
    98
#define WGL_ALPHA_SHIFT_ARB            0x201C
slouken@1913
    99
#define WGL_ACCUM_BITS_ARB             0x201D
slouken@1913
   100
#define WGL_ACCUM_RED_BITS_ARB         0x201E
slouken@1913
   101
#define WGL_ACCUM_GREEN_BITS_ARB       0x201F
slouken@1913
   102
#define WGL_ACCUM_BLUE_BITS_ARB        0x2020
slouken@1913
   103
#define WGL_ACCUM_ALPHA_BITS_ARB       0x2021
slouken@1913
   104
#define WGL_DEPTH_BITS_ARB             0x2022
slouken@1913
   105
#define WGL_STENCIL_BITS_ARB           0x2023
slouken@1913
   106
#define WGL_AUX_BUFFERS_ARB            0x2024
slouken@1913
   107
#define WGL_NO_ACCELERATION_ARB        0x2025
slouken@1913
   108
#define WGL_GENERIC_ACCELERATION_ARB   0x2026
slouken@1913
   109
#define WGL_FULL_ACCELERATION_ARB      0x2027
slouken@1913
   110
#define WGL_SWAP_EXCHANGE_ARB          0x2028
slouken@1913
   111
#define WGL_SWAP_COPY_ARB              0x2029
slouken@1913
   112
#define WGL_SWAP_UNDEFINED_ARB         0x202A
slouken@1913
   113
#define WGL_TYPE_RGBA_ARB              0x202B
slouken@1913
   114
#define WGL_TYPE_COLORINDEX_ARB        0x202C
slouken@1913
   115
#endif
slouken@1913
   116
slouken@1913
   117
#ifndef WGL_ARB_multisample
slouken@1913
   118
#define WGL_SAMPLE_BUFFERS_ARB         0x2041
slouken@1913
   119
#define WGL_SAMPLES_ARB                0x2042
slouken@1913
   120
#endif
slouken@1913
   121
slouken@1952
   122
#endif /* SDL_VIDEO_OPENGL_WGL */
slouken@1913
   123
slouken@5062
   124
#endif /* _SDL_windowsopengl_h */
slouken@1913
   125
slouken@1913
   126
/* vi: set ts=4 sw=4 expandtab: */