directfbgl.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /*
  2. (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org)
  3. (c) Copyright 2000-2004 Convergence (integrated media) GmbH
  4. All rights reserved.
  5. Written by Denis Oliver Kropp <dok@directfb.org>,
  6. Andreas Hundt <andi@fischlustig.de>,
  7. Sven Neumann <neo@directfb.org>,
  8. Ville Syrjälä <syrjala@sci.fi> and
  9. Claudio Ciccani <klan@users.sf.net>.
  10. This library is free software; you can redistribute it and/or
  11. modify it under the terms of the GNU Lesser General Public
  12. License as published by the Free Software Foundation; either
  13. version 2 of the License, or (at your option) any later version.
  14. This library 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 GNU
  17. Lesser General Public License for more details.
  18. You should have received a copy of the GNU Lesser General Public
  19. License along with this library; if not, write to the
  20. Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  21. Boston, MA 02111-1307, USA.
  22. */
  23. #ifndef __DIRECTFBGL_H__
  24. #define __DIRECTFBGL_H__
  25. #include <directfb.h>
  26. #ifdef __cplusplus
  27. extern "C"
  28. {
  29. #endif
  30. /*
  31. * The DirectFBGL interface version.
  32. */
  33. #define DIRECTFBGL_INTERFACE_VERSION 1
  34. /*
  35. * Attributes of an OpenGL context.
  36. */
  37. typedef struct {
  38. int buffer_size;
  39. int depth_size;
  40. int stencil_size;
  41. int aux_buffers;
  42. int red_size;
  43. int green_size;
  44. int blue_size;
  45. int alpha_size;
  46. int accum_red_size;
  47. int accum_green_size;
  48. int accum_blue_size;
  49. int accum_alpha_size;
  50. DFBBoolean double_buffer;
  51. DFBBoolean stereo;
  52. } DFBGLAttributes;
  53. /***************
  54. * IDirectFBGL *
  55. ***************/
  56. /*
  57. * <i>No summary yet...</i>
  58. */
  59. DEFINE_INTERFACE( IDirectFBGL,
  60. /** Context handling **/
  61. /*
  62. * Acquire the hardware lock.
  63. */
  64. DFBResult (*Lock) (
  65. IDirectFBGL *thiz
  66. );
  67. /*
  68. * Release the lock.
  69. */
  70. DFBResult (*Unlock) (
  71. IDirectFBGL *thiz
  72. );
  73. /*
  74. * Query the OpenGL attributes.
  75. */
  76. DFBResult (*GetAttributes) (
  77. IDirectFBGL *thiz,
  78. DFBGLAttributes *attributes
  79. );
  80. /*
  81. * Get the address of an OpenGL function.
  82. */
  83. DFBResult (*GetProcAddress) (
  84. IDirectFBGL *thiz,
  85. const char *name,
  86. void **ret_address
  87. );
  88. )
  89. #ifdef __cplusplus
  90. }
  91. #endif
  92. #endif