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
14reproduced, in whole or part, in any form, or by any means of electronic,
15mechanical, or otherwise, without the written permission of DiSTI. Said
16permission may be derived through the purchase of applicable DiSTI product
17licenses which detail the distribution rights of this content and any
18Derivative Works based on this or other copyrighted DiSTI Software.
19
20 NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
21AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
22PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
23AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
24IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
25PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
26
27 LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
28IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
29INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
30DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
31INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
32INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
33OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
34EXCEED FIVE DOLLARS (US$5.00).
35
36 The aforementioned terms and restrictions are governed by the laws of the
37State 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
45namespace 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 */
52typedef 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 */
59
60/** Enumeration for texture filtering mode of the object */
61typedef 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 */
70
71/** Enumeration for the Depth Testing and Writting mode */
72typedef 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*/
79
80/** Enumeration for polygon drawing mode of the object */
81typedef 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 */
89
90/** Enumeration for Alpha Blending/Testing mode */
91typedef 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. */
98
99/** Enumeration for whether or not polygon is closed or open */
100typedef enum
101{
102 POLY_OPEN, /**< Polygon will be drawn open */
103 POLY_CLOSED /**< Polygon will be drawn closed */
105
106/** Enumeration for the type of rendering projection for a display frame */
107typedef 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) */
112
113/** Enumeration for the C++ protection status of an object */
114typedef 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 */
120
121/** Enumeration for the redraw behavior for a display frame */
122typedef 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 */
128
129/** Enumeration for the type of picking for an object */
130typedef 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.*/
138
139/** Enumeration for an object's usage of glColorMaterial */
140typedef 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 */
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
236static 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*/
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*/
263typedef 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
308
309} // namespace disti
310
311#endif
A file for all GL Studio files to include.
Force inclusion of the DirectShow library.
Definition: bmpimage.h:47
GLS_Initializers
Definition: display_types.h:264
PickableType_e
Definition: display_types.h:131
@ PICK_ALWAYS
Definition: display_types.h:135
@ PICK_FIRST
Definition: display_types.h:133
@ PICK_NEVER
Definition: display_types.h:132
@ PICK_BEST
Definition: display_types.h:134
TextureMap_e
Definition: display_types.h:53
@ TEXTURE_MAP_BLEND
Definition: display_types.h:56
@ TEXTURE_MAP_DECAL
Definition: display_types.h:55
@ TEXTURE_MAP_MODULATE
Definition: display_types.h:54
@ TEXTURE_MAP_REPLACE
Definition: display_types.h:57
TextureFilter_e
Definition: display_types.h:62
@ TEXTURE_FILTER_NEAREST
Definition: display_types.h:63
@ TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR
Definition: display_types.h:66
@ TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST
Definition: display_types.h:65
@ TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST
Definition: display_types.h:68
@ TEXTURE_FILTER_LINEAR
Definition: display_types.h:64
@ TEXTURE_FILTER_NEAREST_MIPMAP_LINEAR
Definition: display_types.h:67
DepthBuffer_e
Definition: display_types.h:73
@ DEPTH_BUFFER_TEST_NO_WRITE
Definition: display_types.h:76
@ DEPTH_BUFFER_NO_TEST_AND_WRITE
Definition: display_types.h:77
Views
Definition: display_types.h:247
PolygonMode_e
Definition: display_types.h:82
@ POLY_MODE_FILLED
Definition: display_types.h:86
@ POLY_MODE_POINTS
Definition: display_types.h:84
@ POLY_MODE_OUTLINE
Definition: display_types.h:85
@ POLY_MODE_UNDEFINED
Definition: display_types.h:83
@ POLY_MODE_FILL_AND_OUTLINE
Definition: display_types.h:87
AlphaMode_e
Definition: display_types.h:92
@ ALPHA_MODE_256_LEVEL
Definition: display_types.h:96
@ ALPHA_MODE_UNDEFINED
Definition: display_types.h:93
@ ALPHA_MODE_2_LEVEL
Definition: display_types.h:95
@ ALPHA_MODE_OPAQUE
Definition: display_types.h:94
ColorMaterialMode_e
Definition: display_types.h:141
@ EMISSION_COLOR_MATERIAL
Definition: display_types.h:146
@ NO_COLOR_MATERIAL
Definition: display_types.h:142
@ DIFFUSE_COLOR_MATERIAL
Definition: display_types.h:143
@ SPECULAR_COLOR_MATERIAL
Definition: display_types.h:147
@ DIFFUSE_AND_AMBIENT_COLOR_MATERIAL
Definition: display_types.h:145
@ AMBIENT_COLOR_MATERIAL
Definition: display_types.h:144
MemberAccess_e
Definition: display_types.h:115
@ PRIVATE
Definition: display_types.h:117
@ PROTECTED
Definition: display_types.h:118
@ PUBLIC
Definition: display_types.h:116
ShadingType_e
Definition: display_types.h:108
@ SHADING_FLAT
Definition: display_types.h:109
@ SHADING_GOURAUD
Definition: display_types.h:110
RedrawBehavior_e
Definition: display_types.h:123
@ REDRAW_CONDITIONAL
Definition: display_types.h:124
@ REDRAW_CONSTANT
Definition: display_types.h:125
@ REDRAW_CONTINUOUS
Definition: display_types.h:126
PolygonClose_e
Definition: display_types.h:101
@ POLY_OPEN
Definition: display_types.h:102
@ POLY_CLOSED
Definition: display_types.h:103