Wraps an OS specific OpenGL surface to make other modules OS independent. A surface abstracts the frame buffer (color, depth, stencil, ...).
Supports OpenGL / GLES for drawing operations.
Graphic-Surface | Wraps an OS specific OpenGL surface to make other modules OS independent. |
Copyright | This program is free software. |
Files | |
C-kern/ | Header file Graphic-Surface. |
C-kern/ | Implementation file Graphic-Surface impl. |
Types | |
opengl_surface_t | Type which tags the native implementation of an OpenGL surface. |
struct surface_t | Export surface_t into global namespace. |
Functions | |
test | |
unittest_graphic_surface | Test surface_t functionality. |
surface_t | Wraps a native OpenGL surface (frame buffer). |
lifetime | |
surface_FREE | Static initializer. |
surface_FREE_EMBEDDED | Static initializer for types which inherit from surface_t with surface_EMBED. |
generic | |
surface_EMBED | Inherits from surface_t by embedding all data fields. |
query | |
gl_surface | Returns the native OpenGL surface type tagged with (opengl_surface_t*). |
isfree_surface | Returns true if surf->glsurface is set to 0. |
inline implementation | |
surface_t | |
gl_surface | Implements surface_t.gl_surface. |
isfree_surface | Implements surface_t.isfree_surface. |
This program is free software. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
© 2014 Jörg Seebohn
Header file Graphic-Surface.
Implementation file Graphic-Surface impl.
typedef struct surface_t surface_t
Export surface_t into global namespace.
test | |
unittest_graphic_surface | Test surface_t functionality. |
int unittest_graphic_surface( void )
Test surface_t functionality.
struct surface_t
Wraps a native OpenGL surface (frame buffer). Use gl_surface to query for the native type.
lifetime | |
surface_FREE | Static initializer. |
surface_FREE_EMBEDDED | Static initializer for types which inherit from surface_t with surface_EMBED. |
generic | |
surface_EMBED | Inherits from surface_t by embedding all data fields. |
query | |
gl_surface | Returns the native OpenGL surface type tagged with (opengl_surface_t*). |
isfree_surface | Returns true if surf->glsurface is set to 0. |
#define surface_FREE_EMBEDDED 0
Static initializer for types which inherit from surface_t with surface_EMBED.
#define surface_EMBED struct opengl_surface_t * glsurface
Inherits from surface_t by embedding all data fields.
surface_t | |
gl_surface | Implements surface_t.gl_surface. |
isfree_surface | Implements surface_t.isfree_surface. |
#define gl_surface( surf ) ((surf)->glsurface)
Implements surface_t.gl_surface.
#define isfree_surface( surf ) (0 == (surf)->glsurface)
Implements surface_t.isfree_surface.
Type which tags the native implementation of an OpenGL surface.
typedef struct opengl_surface_t opengl_surface_t
Export surface_t into global namespace.
typedef struct surface_t surface_t
Wraps a native OpenGL surface (frame buffer).
struct surface_t
Test surface_t functionality.
int unittest_graphic_surface( void )
Static initializer.
#define surface_FREE { 0 }
Static initializer for types which inherit from surface_t with surface_EMBED.
#define surface_FREE_EMBEDDED 0
Inherits from surface_t by embedding all data fields.
#define surface_EMBED struct opengl_surface_t * glsurface
Returns the native OpenGL surface type tagged with (opengl_surface_t*).
struct opengl_surface_t * gl_surface( surface_t * surf )
Returns true if surf->glsurface is set to 0.
bool isfree_surface( const surface_t * surf )
Implements surface_t.gl_surface.
#define gl_surface( surf ) ((surf)->glsurface)
Implements surface_t.isfree_surface.
#define isfree_surface( surf ) (0 == (surf)->glsurface)