/project/jni/sdl-1.3/src/video/windows/SDL_windowsopengl.h

https://github.com/aichunyu/FFPlayer · C Header · 125 lines · 93 code · 10 blank · 22 comment · 0 complexity · d4ce0bac6cac63095f4a13a683adf728 MD5 · raw file

  1. /*
  2. Simple DirectMedia Layer
  3. Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
  4. This software is provided 'as-is', without any express or implied
  5. warranty. In no event will the authors be held liable for any damages
  6. arising from the use of this software.
  7. Permission is granted to anyone to use this software for any purpose,
  8. including commercial applications, and to alter it and redistribute it
  9. freely, subject to the following restrictions:
  10. 1. The origin of this software must not be misrepresented; you must not
  11. claim that you wrote the original software. If you use this software
  12. in a product, an acknowledgment in the product documentation would be
  13. appreciated but is not required.
  14. 2. Altered source versions must be plainly marked as such, and must not be
  15. misrepresented as being the original software.
  16. 3. This notice may not be removed or altered from any source distribution.
  17. */
  18. #include "SDL_config.h"
  19. #ifndef _SDL_windowsopengl_h
  20. #define _SDL_windowsopengl_h
  21. #if SDL_VIDEO_OPENGL_WGL
  22. struct SDL_GLDriverData
  23. {
  24. int WGL_ARB_pixel_format;
  25. void *(WINAPI * wglGetProcAddress) (const char *proc);
  26. HGLRC(WINAPI * wglCreateContext) (HDC hdc);
  27. BOOL(WINAPI * wglDeleteContext) (HGLRC hglrc);
  28. BOOL(WINAPI * wglMakeCurrent) (HDC hdc, HGLRC hglrc);
  29. BOOL(WINAPI * wglChoosePixelFormatARB) (HDC hdc,
  30. const int *piAttribIList,
  31. const FLOAT * pfAttribFList,
  32. UINT nMaxFormats,
  33. int *piFormats,
  34. UINT * nNumFormats);
  35. BOOL(WINAPI * wglGetPixelFormatAttribivARB) (HDC hdc, int iPixelFormat,
  36. int iLayerPlane,
  37. UINT nAttributes,
  38. const int *piAttributes,
  39. int *piValues);
  40. void (WINAPI * wglSwapIntervalEXT) (int interval);
  41. int (WINAPI * wglGetSwapIntervalEXT) (void);
  42. };
  43. /* OpenGL functions */
  44. extern int WIN_GL_LoadLibrary(_THIS, const char *path);
  45. extern void *WIN_GL_GetProcAddress(_THIS, const char *proc);
  46. extern void WIN_GL_UnloadLibrary(_THIS);
  47. extern int WIN_GL_SetupWindow(_THIS, SDL_Window * window);
  48. extern SDL_GLContext WIN_GL_CreateContext(_THIS, SDL_Window * window);
  49. extern int WIN_GL_MakeCurrent(_THIS, SDL_Window * window,
  50. SDL_GLContext context);
  51. extern int WIN_GL_SetSwapInterval(_THIS, int interval);
  52. extern int WIN_GL_GetSwapInterval(_THIS);
  53. extern void WIN_GL_SwapWindow(_THIS, SDL_Window * window);
  54. extern void WIN_GL_DeleteContext(_THIS, SDL_GLContext context);
  55. #ifndef WGL_ARB_pixel_format
  56. #define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
  57. #define WGL_DRAW_TO_WINDOW_ARB 0x2001
  58. #define WGL_DRAW_TO_BITMAP_ARB 0x2002
  59. #define WGL_ACCELERATION_ARB 0x2003
  60. #define WGL_NEED_PALETTE_ARB 0x2004
  61. #define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005
  62. #define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
  63. #define WGL_SWAP_METHOD_ARB 0x2007
  64. #define WGL_NUMBER_OVERLAYS_ARB 0x2008
  65. #define WGL_NUMBER_UNDERLAYS_ARB 0x2009
  66. #define WGL_TRANSPARENT_ARB 0x200A
  67. #define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037
  68. #define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038
  69. #define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
  70. #define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
  71. #define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B
  72. #define WGL_SHARE_DEPTH_ARB 0x200C
  73. #define WGL_SHARE_STENCIL_ARB 0x200D
  74. #define WGL_SHARE_ACCUM_ARB 0x200E
  75. #define WGL_SUPPORT_GDI_ARB 0x200F
  76. #define WGL_SUPPORT_OPENGL_ARB 0x2010
  77. #define WGL_DOUBLE_BUFFER_ARB 0x2011
  78. #define WGL_STEREO_ARB 0x2012
  79. #define WGL_PIXEL_TYPE_ARB 0x2013
  80. #define WGL_COLOR_BITS_ARB 0x2014
  81. #define WGL_RED_BITS_ARB 0x2015
  82. #define WGL_RED_SHIFT_ARB 0x2016
  83. #define WGL_GREEN_BITS_ARB 0x2017
  84. #define WGL_GREEN_SHIFT_ARB 0x2018
  85. #define WGL_BLUE_BITS_ARB 0x2019
  86. #define WGL_BLUE_SHIFT_ARB 0x201A
  87. #define WGL_ALPHA_BITS_ARB 0x201B
  88. #define WGL_ALPHA_SHIFT_ARB 0x201C
  89. #define WGL_ACCUM_BITS_ARB 0x201D
  90. #define WGL_ACCUM_RED_BITS_ARB 0x201E
  91. #define WGL_ACCUM_GREEN_BITS_ARB 0x201F
  92. #define WGL_ACCUM_BLUE_BITS_ARB 0x2020
  93. #define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
  94. #define WGL_DEPTH_BITS_ARB 0x2022
  95. #define WGL_STENCIL_BITS_ARB 0x2023
  96. #define WGL_AUX_BUFFERS_ARB 0x2024
  97. #define WGL_NO_ACCELERATION_ARB 0x2025
  98. #define WGL_GENERIC_ACCELERATION_ARB 0x2026
  99. #define WGL_FULL_ACCELERATION_ARB 0x2027
  100. #define WGL_SWAP_EXCHANGE_ARB 0x2028
  101. #define WGL_SWAP_COPY_ARB 0x2029
  102. #define WGL_SWAP_UNDEFINED_ARB 0x202A
  103. #define WGL_TYPE_RGBA_ARB 0x202B
  104. #define WGL_TYPE_COLORINDEX_ARB 0x202C
  105. #endif
  106. #ifndef WGL_ARB_multisample
  107. #define WGL_SAMPLE_BUFFERS_ARB 0x2041
  108. #define WGL_SAMPLES_ARB 0x2042
  109. #endif
  110. #endif /* SDL_VIDEO_OPENGL_WGL */
  111. #endif /* _SDL_windowsopengl_h */
  112. /* vi: set ts=4 sw=4 expandtab: */