Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.3 KiB

  1. #ifndef __GLWIN_H__
  2. #define __GLWIN_H__
  3. #include <windows.h>
  4. #include <gl/gl.h>
  5. #ifndef __GLWIN_INTERNAL__
  6. typedef void *GLWINDOW;
  7. #endif
  8. typedef void (CALLBACK *GLWINIDLECALLBACK)(GLWINDOW gw);
  9. typedef BOOL (CALLBACK *GLWINMESSAGECALLBACK)
  10. (GLWINDOW gw, HWND hwnd, UINT uiMsg, WPARAM wpm, LPARAM lpm,
  11. LRESULT *plr);
  12. #define GLWIN_BACK_BUFFER 0x00000001
  13. #define GLWIN_Z_BUFFER_16 0x00000002
  14. #define GLWIN_Z_BUFFER_32 0x00000004
  15. #define GLWIN_ACCUM_BUFFER 0x00000008
  16. #define GLWIN_STENCIL_BUFFER 0x00000010
  17. #define GLWIN_GENERIC_ACCELERATED 0x00000020
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. GLWINDOW glwinCreateWindow(HWND hwndParent,
  22. char *pszTitle, int x, int y,
  23. int iWidth, int iHeight,
  24. DWORD dwFlags);
  25. void glwinDestroyWindow(GLWINDOW gw);
  26. HGLRC glwinGetGlrc(GLWINDOW gw);
  27. HWND glwinGetHwnd(GLWINDOW gw);
  28. HDC glwinGetHdc(GLWINDOW gw);
  29. DWORD glwinGetFlags(GLWINDOW gw);
  30. LONG glwinGetLastError(void);
  31. BOOL glwinMakeCurrent(GLWINDOW gw);
  32. BOOL glwinSwapBuffers(GLWINDOW gw);
  33. void glwinRunWindow(GLWINDOW gw);
  34. void glwinRun(GLWINIDLECALLBACK cb);
  35. void glwinIdleCallback(GLWINDOW gw, GLWINIDLECALLBACK cb);
  36. void glwinMessageCallback(GLWINDOW gw, GLWINMESSAGECALLBACK cb);
  37. #ifdef __cplusplus
  38. }
  39. #endif
  40. #endif // __GLWIN_H__