µGFX  2.9
version 2.9
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.io/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 GFXON in your gfxconf.h
20  * @pre GWIN_NEED_GL3D must be set to GFXON 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 /**
42  * @brief Create a gl3d window.
43  * @return NULL if there is no resultant drawing area, otherwise a window handle.
44  *
45  * @param[in] g The GDisplay to display this window on
46  * @param[in] gg The GGL3DObject structure to initialise. If this is NULL the structure is dynamically allocated.
47  * @param[in] pInit The initialization parameters to use
48  *
49  * @note The drawing color and the background color get set to the current defaults. If you haven't called
50  * @p gwinSetDefaultColor() or @p gwinSetDefaultBgColor() then these are GFX_WHITE and GFX_BLACK respectively.
51  * @note The font gets set to the current default font. If you haven't called @p gwinSetDefaultFont() then there
52  * is no default font and text drawing operations will no nothing.
53  * @note The dimensions and position may be changed to fit on the real screen.
54  *
55  * @api
56  */
57 GHandle gwinGGL3DCreate(GDisplay *g, GGL3DObject *gg, const GWindowInit *pInit);
58 #define gwinGL3DCreate(gg, pInit) gwinGGL3DCreate(GDISP, gg, pInit)
59 
60 /* Include the gl interface */
61 #include "../../3rdparty/tinygl-0.4-ugfx/include/GL/gl.h"
62 
63 #endif /* _GWIN_GL3D_H */
64 /** @} */
65 
GHandle gwinGGL3DCreate(GDisplay *g, GGL3DObject *gg, const GWindowInit *pInit)
Create a gl3d window.
The structure to initialise a GWIN.
Definition: gwin.h:75
A window object structure.
Definition: gwin.h:40