| GL Studio C++ Runtime API

display_types.h
Go to the documentation of this file.
1/*! \file
2 \brief GL Studio Enumerations and constants.
3
4 \par Copyright Information
5
6 Copyright (c) 2017 by The DiSTI Corporation.<br>
7 11301 Corporate Blvd; Suite 100<br>
8 Orlando, Florida 32817<br>
9 USA<br>
10 <br>
11 All rights reserved.<br>
12
13 This Software contains proprietary trade secrets of DiSTI and may not be
14 reproduced, in whole or part, in any form, or by any means of electronic,
15 mechanical, or otherwise, without the written permission of DiSTI. Said
16 permission may be derived through the purchase of applicable DiSTI product
17 licenses which detail the distribution rights of this content and any
18 Derivative Works based on this or other copyrighted DiSTI Software.
19
20 NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
21 AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
22 PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
23 AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
24 IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
25 PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
26
27 LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
28 IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
29 INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
30 DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
31 INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
32 INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
33 OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
34 EXCEED FIVE DOLLARS (US$5.00).
35
36 The aforementioned terms and restrictions are governed by the laws of the
37 State of Florida and the United States of America.
38
39*/
40#ifndef _DISPLAY_TYPES_H
41#define _DISPLAY_TYPES_H
42
43#include "gls_include.h"
44
45 namespace disti
46{
47#define NUM_TEXTURE_POINTS 4 ///< Number of texture points per object.
48
49#define OBJECT_SETTING_UNDEFINED -1 ///< Default value to returned for an undefined setting.
50
51/** Enumeration for texture mapping mode of the object */
52 typedef enum
53{
54 TEXTURE_MAP_MODULATE, /**< Texture color and alpha are modulated with polygon color and alpha */
55 TEXTURE_MAP_DECAL, /**< Texture color is blended with polygon color */
56 TEXTURE_MAP_BLEND, /**< Texture color is blended with polygon color, texture alpha is modulated with polygon alpha */
57 TEXTURE_MAP_REPLACE /**< Texture color and alpha replace polygon color and alpha */
58} TextureMap_e;
59
60/** Enumeration for texture filtering mode of the object */
61 typedef enum
62{
63 TEXTURE_FILTER_NEAREST, /**< Nearest pixel filtering */
64 TEXTURE_FILTER_LINEAR, /**< Bilinear interpolation filtering */
65 TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST, /**< Selects nearest pixel in the nearest mipmap */
66 TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR, /**< Linearly interpolates in two mipmaps then linearly interpolates between them */
67 TEXTURE_FILTER_NEAREST_MIPMAP_LINEAR, /**< Selects nearest pixel in two mipmaps then linearly interpolates between them */
68 TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST /**< Linearly interpolates in the nearest mipmap */
69} TextureFilter_e;
70
71/** Enumeration for the Depth Testing and Writting mode */
72 typedef enum
73{
74 DEPTH_BUFFER_NO_TEST_NO_WRITE = 0, //Save as 0 for compatability /**< Doesn't Test or Write */
75 DEPTH_BUFFER_TEST_AND_WRITE, //Save as 1 for compatability /**< Both Tests and Writes */
76 DEPTH_BUFFER_TEST_NO_WRITE, /**< Tests but doesn't write */
77 DEPTH_BUFFER_NO_TEST_AND_WRITE /**< Doesn't test but does write*/
78} DepthBuffer_e;
79
80/** Enumeration for polygon drawing mode of the object */
81 typedef enum
82{
83 POLY_MODE_UNDEFINED, /**< Polygon draw style is not defined; not a drawable type. Used with the properties page */
84 POLY_MODE_POINTS, /**< Polygon will be rendered with a point at each vertex */
85 POLY_MODE_OUTLINE, /**< Polygon will be rendered as an outline */
86 POLY_MODE_FILLED, /**< Polygon will be rendered filled-in */
87 POLY_MODE_FILL_AND_OUTLINE /**< Polygon will be rendered filled-in and with an outline */
88} PolygonMode_e;
89
90/** Enumeration for Alpha Blending/Testing mode */
91 typedef enum
92{
93 ALPHA_MODE_UNDEFINED, /**< Alpha mode is not defined. Used by the properties page */
94 ALPHA_MODE_OPAQUE, /**< Alpha testing and blending are disabled */
95 ALPHA_MODE_2_LEVEL, /**< Alpha testing with a threshold of 0.5 is enabled, alpha blending is enabled. */
96 ALPHA_MODE_256_LEVEL /**< Alpha blending is enabled, alpha testing is disabled. */
97} AlphaMode_e;
98
99/** Enumeration for whether or not polygon is closed or open */
100 typedef enum
101{
102 POLY_OPEN, /**< Polygon will be drawn open */
103 POLY_CLOSED /**< Polygon will be drawn closed */
104} PolygonClose_e;
105
106/** Enumeration for the type of rendering projection for a display frame */
107 typedef enum
108{
109 SHADING_FLAT, /**< The object will be drawn with flat shading (monochromatic) */
110 SHADING_GOURAUD /**< The object will be drawn with gouraud shading (linear color interpolation) */
111} ShadingType_e;
112
113/** Enumeration for the C++ protection status of an object */
114 typedef enum
115{
116 PUBLIC, /**< The object will be C++ public status */
117 PRIVATE, /**< The object will be C++ private status */
118 PROTECTED /**< The object will be C++ protected status */
119} MemberAccess_e;
120
121/** Enumeration for the redraw behavior for a display frame */
122 typedef enum
123{
124 REDRAW_CONDITIONAL, /**< The display frame is only redrawn when the scene changes */
125 REDRAW_CONSTANT, /**< The display frame is constantly redrawn at a specified rate */
126 REDRAW_CONTINUOUS /**< The display frame is constantly redrawn as fast as possible */
127} RedrawBehavior_e;
128
129/** Enumeration for the type of picking for an object */
130 typedef enum
131{
132 PICK_NEVER, /**< Picking will be disabled for this object and all children */
133 PICK_FIRST, /**< Picking will be based on draw order only. The first geometry hit wins. */
134 PICK_BEST, /**< Picking will find the best geometry hit of all available children */
135 PICK_ALWAYS /**< Picking will ignore geometry of this object, and always return a pick as if hit.
136 This is still only found through normal draw order traversal.*/
137} PickableType_e;
138
139/** Enumeration for an object's usage of glColorMaterial */
140 typedef enum
141{
142 NO_COLOR_MATERIAL, /**< glColorMaterial will be disabled for the object */
143 DIFFUSE_COLOR_MATERIAL, /**< glColorMaterial will be enabled for the diffuse material */
144 AMBIENT_COLOR_MATERIAL, /**< glColorMaterial will be enabled for the ambient material */
145 DIFFUSE_AND_AMBIENT_COLOR_MATERIAL, /**< glColorMaterial will be enabled for the diffuse & ambient materials */
146 EMISSION_COLOR_MATERIAL, /**< glColorMaterial will be enabled for the emission material */
147 SPECULAR_COLOR_MATERIAL /**< glColorMaterial will be enabled for the specular material */
148} ColorMaterialMode_e;
149
150/////////////////////////////////////////////////////////////////////////
151//
152// Default field values
153//
154/////////////////////////////////////////////////////////////////////////
155#define DEF_WINDOW_SIZE 500 ///< Default application window width and height.
156#define DEF_FILE_NAME "Untitled" ///< Default GLS design file name.
157
158#define DEF_LINE_RCOLOR 0 ///< Default red channel for object outlines.
159#define DEF_LINE_GCOLOR 0 ///< Default green channel for object outlines.
160#define DEF_LINE_BCOLOR 0 ///< Default blue channel for object outlines.
161#define DEF_LINE_ALPHA 255 ///< Default alpha channel for object outlines.
162
163#define DEF_FILL_RCOLOR 255 ///< Default red channel for object fill.
164#define DEF_FILL_GCOLOR 255 ///< Default green channel for object fill.
165#define DEF_FILL_BCOLOR 255 ///< Default blue channel for object fill.
166#define DEF_FILL_ALPHA 255 ///< Default alpha channel for object fill.
167
168#define DEF_GRID_RCOLOR 0 ///< Default red channel for the editor canvas grid.
169#define DEF_GRID_GCOLOR 0 ///< Default green channel for the editor canvas grid.
170#define DEF_GRID_BCOLOR 0 ///< Default blue channel for the editor canvas grid.
171#define DEF_GRID_ALPHA 255 ///< Default alpha channel for the editor canvas grid.
172
173#define DEF_AXES_RCOLOR 0 ///< Default red channel for the editor canvas axes.
174#define DEF_AXES_GCOLOR 0 ///< Default green channel for the editor canvas axes.
175#define DEF_AXES_BCOLOR 0 ///< Default blue channel for the editor canvas axes.
176#define DEF_AXES_ALPHA 255 ///< Default alpha channel for the editor canvas axes.
177
178#define DEF_TEXTURE_BLEND_RCOLOR 255 ///< Default red channel for texture blending.
179#define DEF_TEXTURE_BLEND_GCOLOR 255 ///< Default green channel for texture blending.
180#define DEF_TEXTURE_BLEND_BCOLOR 255 ///< Default blue channel for texture blending.
181#define DEF_TEXTURE_BLEND_ALPHA 255 ///< Default alpha channel for texture blending.
182
183#define DEF_BACKGROUND_RCOLOR 160 ///< Default red channel for editor canvas, and application clear color.
184#define DEF_BACKGROUND_GCOLOR 168 ///< Default green channel for editor canvas, and application clear color.
185#define DEF_BACKGROUND_BCOLOR 176 ///< Default blue channel for editor canvas, and application clear color.
186#define DEF_BACKGROUND_ALPHA 255 ///< Default alpha channel for editor canvas, and application clear color.
187
188#define DEF_LIGHT_COLOR 255 ///< Unused, remains for backward compatibility.
189
190#define DEF_LINE_WIDTH 1.0 ///< Default width in pixels for object outlines.
191#define DEF_LINE_STIPPLE_PATTERN 65535 ///< Default line stipple pattern (solid).
192#define DEF_LINE_STIPPLE_MULTIPLIER 1 ///< Default line stipple multiplier.
193
194#define DEF_QUAD_WIDTH 25.0 ///< Unused, remains for backward compatibility.
195#define DEF_QUAD_HEIGHT 25.0 ///< Unused, remains for backward compatibility.
196
197#define DEF_CIRCLE_WIDTH 25.0 ///< Unused, remains for backward compatibility.
198#define DEF_CIRCLE_HEIGHT 25.0 ///< Unused, remains for backward compatibility.
199#define DEF_SHADING SHADING_FLAT ///< Default shading model for objects.
200#define DEF_LIGHTING_ENABLED 0 ///< Default lighting state for objects.
201#define DEF_USE_PARENT_LIGHTING true ///< Default parent lighting for objects.
202#define DEF_POLY_MODE POLY_MODE_OUTLINE ///< Default draw mode for objects.
203#define DEF_POLY_END POLY_CLOSED ///< Default to drawing closed polygons.
204#define DEF_TEXTURE_REPEAT TRUE ///< Default texture repeat state for objects.
205#define DEF_TEXTURE_MAGNIFICATION TEXTURE_FILTER_LINEAR ///< Default texture magnification for objects.
206#define DEF_TEXTURE_MINIFICATION TEXTURE_FILTER_LINEAR ///< Default texture minification for objects.
207#define DEF_TEXTURE_MAP TEXTURE_MAP_REPLACE ///< Default texture mapping mode for objects.
208#define DEF_POLYGON_MIN_DIMENSION 1 ///< Unused, remains for backward compatibility.
209
210#define DEF_POLYGON_OFFSET 0 ///< Unused, remains for backward compatibility.
211
212#define DEF_DOUBLE_CLICK 500 ///< Editor canvas double click interval, in milliseconds.
213#define DEF_DOUBLE_CLICK_TOLERANCE 5 ///< Editor canvas location tolerance, in logical units.
214
215#define DEF_STATIC_FLAG FALSE ///< Unused, remains for backward compatibility.
216#define DEF_ALPHAMODE ALPHA_MODE_256_LEVEL ///< Default alpha test mode for objects.
217#define DEF_VISIBILITY TRUE ///< Default visibility for objects.
218#define DEF_CULLBACKFACE FALSE ///< Default backface drawing mode for objects.
219#define DEF_ZBUFFER DEPTH_BUFFER_TEST_NO_WRITE ///< Default depth buffer write mode for objects.
220#define DEF_ANTIALIAS FALSE ///< Default anti alias state for objects.
221#define DEF_CIRCLE_SEGMENTS 30 ///< Unused, remains for backward compatibility.
222#define DEF_PROTECTION_MODE PUBLIC ///< Default variable protection mode for objects.
223#define DEF_ARC_ANGLE_AMOUNT 90.0 ///< Unused, remains for backward compatibility.
224#define DEF_ARC_START_ANGLE 270.0 ///< Unused, remains for backward compatibility.
225#define DEF_PROJECTION ORTHOGRAPHIC ///< Unused, remains for backward compatibility.
226#define DEF_BUFFER DOUBLE_BUFFER ///< Unused, remains for backward compatibility.
227#define DEF_FRAME_RATE 30 ///< Default framerate for applications.
228#define DEF_REDRAW REDRAW_CONSTANT ///< Default redraw behavior for applications.
229#define DEF_BLINK false ///< Default blink mode for objects.
230#define DEF_BLINK_RATE 2.0 ///< Default blink rate for objects in seconds.
231#define DEF_PICKABLE PICK_FIRST ///< Default pick mode for objects.
232#define DEF_MATERIAL_INDEX 0 ///< Default material index for objects.
233
234#define DEF_TEXTURE_PALETTE_SIZE 50 ///< Unused, remains for backward compatibility.
235
236 static const int MULTIPLE_TEXTURES_ON_OBJECT = -2; ///< Special value to denote multiple textures are present on an object (like a mesh).
237
238//////////////////////////////////////////////////////////////////////////
239//
240// "View" of a window, either in runtime or in the editor
241//
242//////////////////////////////////////////////////////////////////////////
243/**
244 View
245*/
246 enum Views
247{
248 VIEW_XY = 1,
249 VIEW_XZ = 2,
250 VIEW_ZY = 4,
251 VIEW_PERSPECTIVE = 8,
252 VIEW_EYEPOINT = 16
253};
254
255//////////////////////////////////////////////////////////////////////////
256//
257// Used in Generated Code
258//
259//////////////////////////////////////////////////////////////////////////
260/**
261 Initializers
262*/
263 typedef enum
264{
265 GLS_INSTANCE_NAME = 1,
266 GLS_LOCATION,
267 GLS_ROTATION_POINT,
268 GLS_ACTION_CALLBACK,
269 GLS_OBJECT_NAME,
270 GLS_ATTRIBUTE_NAME,
271 GLS_TEXTURE_INDEX,
272 GLS_TEXTURE_REPEAT,
273 GLS_TEXTURE_MAP_MODE,
274 GLS_TEXTURE_MIN_FILTER,
275 GLS_TEXTURE_MAG_FILTER,
276 GLS_TEXTURE_BLEND_COLOR,
277 GLS_TEXTURE_ROTATION,
278 GLS_TEXTURE_SCALE_H,
279 GLS_TEXTURE_SCALE_V,
280 GLS_TEXTURE_OFFSET_X,
281 GLS_TEXTURE_OFFSET_Y,
282 GLS_POLYGON_MODE,
283 GLS_POLYGON_END,
284 GLS_POLYGON_OFFSET,
285 GLS_COLOR,
286 GLS_COLOR_MATERIAL_MODE,
287 GLS_LINE_WIDTH,
288 GLS_LINE_STIPPLE_PATTERN,
289 GLS_LINE_STIPPLE_MULTIPLIER,
290 GLS_VISIBILITY,
291 GLS_CULLBACKFACE,
292 GLS_ALPHAMODE,
293 GLS_ANTIALIAS,
294 GLS_ZBUFFER,
295 GLS_SHADING,
296 GLS_BLINKING,
297 GLS_BLINK_RATE,
298 GLS_PICKABLE,
299 GLS_LIGHTING_ENABLED,
300 GLS_MATERIAL_INDEX,
301 GLS_MATERIAL_INDICES,
302 GLS_DCS_MATRIX,
303 GLS_COMPONENT_ABSOLUTE_PLACEMENT,
304 GLS_COMPONENT_EDITOR_TRANSFORM,
305 GLS_TEXTURE_POINTS,
306 GLS_LAST_INITIALIZER
307} GLS_Initializers;
308
309} // namespace disti
310
311#endif
gls_include.h
A file for all GL Studio files to include.
disti
Definition: bmpimage.h:47
disti::GLS_Initializers
GLS_Initializers
Definition: display_types.h:264
disti::PickableType_e
PickableType_e
Definition: display_types.h:131
disti::PICK_ALWAYS
@ PICK_ALWAYS
Definition: display_types.h:135
disti::PICK_FIRST
@ PICK_FIRST
Definition: display_types.h:133
disti::PICK_NEVER
@ PICK_NEVER
Definition: display_types.h:132
disti::PICK_BEST
@ PICK_BEST
Definition: display_types.h:134
disti::TextureMap_e
TextureMap_e
Definition: display_types.h:53
disti::TEXTURE_MAP_BLEND
@ TEXTURE_MAP_BLEND
Definition: display_types.h:56
disti::TEXTURE_MAP_DECAL
@ TEXTURE_MAP_DECAL
Definition: display_types.h:55
disti::TEXTURE_MAP_MODULATE
@ TEXTURE_MAP_MODULATE
Definition: display_types.h:54
disti::TEXTURE_MAP_REPLACE
@ TEXTURE_MAP_REPLACE
Definition: display_types.h:57
disti::TextureFilter_e
TextureFilter_e
Definition: display_types.h:62
disti::TEXTURE_FILTER_NEAREST
@ TEXTURE_FILTER_NEAREST
Definition: display_types.h:63
disti::TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR
@ TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR
Definition: display_types.h:66
disti::TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST
@ TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST
Definition: display_types.h:65
disti::TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST
@ TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST
Definition: display_types.h:68
disti::TEXTURE_FILTER_LINEAR
@ TEXTURE_FILTER_LINEAR
Definition: display_types.h:64
disti::TEXTURE_FILTER_NEAREST_MIPMAP_LINEAR
@ TEXTURE_FILTER_NEAREST_MIPMAP_LINEAR
Definition: display_types.h:67
disti::DepthBuffer_e
DepthBuffer_e
Definition: display_types.h:73
disti::DEPTH_BUFFER_TEST_NO_WRITE
@ DEPTH_BUFFER_TEST_NO_WRITE
Definition: display_types.h:76
disti::DEPTH_BUFFER_NO_TEST_AND_WRITE
@ DEPTH_BUFFER_NO_TEST_AND_WRITE
Definition: display_types.h:77
disti::Views
Views
Definition: display_types.h:247
disti::PolygonMode_e
PolygonMode_e
Definition: display_types.h:82
disti::POLY_MODE_FILLED
@ POLY_MODE_FILLED
Definition: display_types.h:86
disti::POLY_MODE_POINTS
@ POLY_MODE_POINTS
Definition: display_types.h:84
disti::POLY_MODE_OUTLINE
@ POLY_MODE_OUTLINE
Definition: display_types.h:85
disti::POLY_MODE_UNDEFINED
@ POLY_MODE_UNDEFINED
Definition: display_types.h:83
disti::POLY_MODE_FILL_AND_OUTLINE
@ POLY_MODE_FILL_AND_OUTLINE
Definition: display_types.h:87
disti::AlphaMode_e
AlphaMode_e
Definition: display_types.h:92
disti::ALPHA_MODE_256_LEVEL
@ ALPHA_MODE_256_LEVEL
Definition: display_types.h:96
disti::ALPHA_MODE_UNDEFINED
@ ALPHA_MODE_UNDEFINED
Definition: display_types.h:93
disti::ALPHA_MODE_2_LEVEL
@ ALPHA_MODE_2_LEVEL
Definition: display_types.h:95
disti::ALPHA_MODE_OPAQUE
@ ALPHA_MODE_OPAQUE
Definition: display_types.h:94
disti::ColorMaterialMode_e
ColorMaterialMode_e
Definition: display_types.h:141
disti::EMISSION_COLOR_MATERIAL
@ EMISSION_COLOR_MATERIAL
Definition: display_types.h:146
disti::NO_COLOR_MATERIAL
@ NO_COLOR_MATERIAL
Definition: display_types.h:142
disti::DIFFUSE_COLOR_MATERIAL
@ DIFFUSE_COLOR_MATERIAL
Definition: display_types.h:143
disti::SPECULAR_COLOR_MATERIAL
@ SPECULAR_COLOR_MATERIAL
Definition: display_types.h:147
disti::DIFFUSE_AND_AMBIENT_COLOR_MATERIAL
@ DIFFUSE_AND_AMBIENT_COLOR_MATERIAL
Definition: display_types.h:145
disti::AMBIENT_COLOR_MATERIAL
@ AMBIENT_COLOR_MATERIAL
Definition: display_types.h:144
disti::MemberAccess_e
MemberAccess_e
Definition: display_types.h:115
disti::PRIVATE
@ PRIVATE
Definition: display_types.h:117
disti::PROTECTED
@ PROTECTED
Definition: display_types.h:118
disti::PUBLIC
@ PUBLIC
Definition: display_types.h:116
disti::ShadingType_e
ShadingType_e
Definition: display_types.h:108
disti::SHADING_FLAT
@ SHADING_FLAT
Definition: display_types.h:109
disti::SHADING_GOURAUD
@ SHADING_GOURAUD
Definition: display_types.h:110
disti::RedrawBehavior_e
RedrawBehavior_e
Definition: display_types.h:123
disti::REDRAW_CONDITIONAL
@ REDRAW_CONDITIONAL
Definition: display_types.h:124
disti::REDRAW_CONSTANT
@ REDRAW_CONSTANT
Definition: display_types.h:125
disti::REDRAW_CONTINUOUS
@ REDRAW_CONTINUOUS
Definition: display_types.h:126
disti::PolygonClose_e
PolygonClose_e
Definition: display_types.h:101
disti::POLY_OPEN
@ POLY_OPEN
Definition: display_types.h:102
disti::POLY_CLOSED
@ POLY_CLOSED
Definition: display_types.h:103