version 2.8
gwin_gl3d.h
Go to the documentation of this file.
1 /*
2  * This file is subject to the terms of the GFX License. If a copy of
3  * the license was not distributed with this file, you can obtain one at:
4  *
5  * http://ugfx.org/license.html
6  */
7 
8 /**
9  * @file src/gwin/gwin_gl3d.h
10  * @brief GWIN 3D module header file
11  *
12  * @defgroup 3D 3D
13  * @ingroup Windows
14  *
15  * @brief Widget that can be used to render OpenGL.
16  *
17  * @details 3D GWIN window based on OpenGL (or more exactly Tiny GL)
18  *
19  * @pre GFX_USE_GWIN must be set to TRUE in your gfxconf.h
20  * @pre GWIN_NEED_GL3D must be set to TRUE in your gfxconf.h
21  *
22  * @{
23  */
24 
25 #ifndef _GWIN_GL3D_H
26 #define _GWIN_GL3D_H
27 
28 /* This file is included within "src/gwin/gwin.h" */
29 
30 
31 // A gl3d window
32 typedef struct GGL3DObject {
33  GWindowObject g;
34  struct GLContext * glcxt;
35  } GGL3DObject;
36 
37 /*===========================================================================*/
38 /* External declarations. */
39 /*===========================================================================*/
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 /**
46  * @brief Create a gl3d window.
47  * @return NULL if there is no resultant drawing area, otherwise a window handle.
48  *
49  * @param[in] g The GDisplay to display this window on
50  * @param[in] gg The GGL3DObject structure to initialise. If this is NULL the structure is dynamically allocated.
51  * @param[in] pInit The initialization parameters to use
52  *
53  * @note The drawing color and the background color get set to the current defaults. If you haven't called
54  * @p gwinSetDefaultColor() or @p gwinSetDefaultBgColor() then these are White and Black respectively.
55  * @note The font gets set to the current default font. If you haven't called @p gwinSetDefaultFont() then there
56  * is no default font and text drawing operations will no nothing.
57  * @note The dimensions and position may be changed to fit on the real screen.
58  *
59  * @api
60  */
61 GHandle gwinGGL3DCreate(GDisplay *g, GGL3DObject *gg, const GWindowInit *pInit);
62 #define gwinGL3DCreate(gg, pInit) gwinGGL3DCreate(GDISP, gg, pInit)
63 
64 /* Include the gl interface */
65 #include "../../3rdparty/tinygl-0.4-ugfx/include/GL/gl.h"
66 
67 #ifdef __cplusplus
68 }
69 #endif
70 
71 #endif /* _GWIN_GL3D_H */
72 /** @} */
73 
The structure to initialise a GWIN.
Definition: gwin.h:75
GHandle gwinGGL3DCreate(GDisplay *g, GGL3DObject *gg, const GWindowInit *pInit)
Create a gl3d window.
A window object structure.
Definition: gwin.h:40