gcsx_opengl.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* GCSx
  2. ** OPENGL.H
  3. **
  4. ** Core OpenGL functions
  5. */
  6. /*****************************************************************************
  7. ** Copyright (C) 2003-2006 Janson
  8. **
  9. ** This program is free software; you can redistribute it and/or modify
  10. ** it under the terms of the GNU General Public License as published by
  11. ** the Free Software Foundation; either version 2 of the License, or
  12. ** (at your option) any later version.
  13. **
  14. ** This program is distributed in the hope that it will be useful,
  15. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. ** GNU General Public License for more details.
  18. **
  19. ** You should have received a copy of the GNU General Public License
  20. ** along with this program; if not, write to the Free Software
  21. ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
  22. *****************************************************************************/
  23. #ifndef __GCSx_OPENGL_H_
  24. #define __GCSx_OPENGL_H_
  25. // Initialize GL video mode. Called from selectVideoMode
  26. void oglInit(int width, int height);
  27. // Turn on basic (cut-out) transparency and/or full alpha blending
  28. void oglAlphaMode(int transparency, int fullAlpha);
  29. // Output (debugging) current OpenGL error status
  30. void oglError(const char* note);
  31. // oglDebug() works anytime you don't need a return value
  32. #ifndef NDEBUG
  33. #define oglDebug(x) { x; oglError(#x); }
  34. #else
  35. #define oglDebug(x) { x; }
  36. #endif
  37. // OpenGL test
  38. // Once run, features can be queried with config
  39. void oglTestCapabilities();
  40. // Benchmark-type test for debugging use
  41. int oglTestPossibleTextures(int width, int height, int withAlpha, int limit = 1000);
  42. #endif