GL Studio C++ Runtime API
display_types.h
Go to the documentation of this file.
1/// \file display_types.h
2/// \brief GL Studio Enumerations and constants.
3///
4/// \par Copyright Information
5///
6/// Copyright (c) 2017 by The DiSTI Corporation.<br>
7/// 12249 Science Drive; Suite 300<br>
8/// Orlando, Florida 32826<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#ifndef INCLUDED_DISTI_DISPLAY_TYPES_H
40#define INCLUDED_DISTI_DISPLAY_TYPES_H
41
42#include "gls_include.h"
43
44namespace disti
45{
46#define NUM_TEXTURE_POINTS 4 ///< Number of texture points per object.
47
48#define OBJECT_SETTING_UNDEFINED -1 ///< Default value to returned for an undefined setting.
49
50/** Enumeration for texture mapping mode of the object */
51typedef enum
52{
53 TEXTURE_MAP_MODULATE, /**< Texture color and alpha are modulated with polygon color and alpha */
54 TEXTURE_MAP_DECAL, /**< Texture color is blended with polygon color */
55 TEXTURE_MAP_BLEND, /**< Texture color is blended with polygon color, texture alpha is modulated with polygon alpha */
56 TEXTURE_MAP_REPLACE /**< Texture color and alpha replace polygon color and alpha */
58
59/** Enumeration for texture filtering mode of the object */
60typedef enum
61{
62 TEXTURE_FILTER_NEAREST, /**< Nearest pixel filtering */
63 TEXTURE_FILTER_LINEAR, /**< Bilinear interpolation filtering */
64 TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST, /**< Selects nearest pixel in the nearest mipmap */
65 TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR, /**< Linearly interpolates in two mipmaps then linearly interpolates between them */
66 TEXTURE_FILTER_NEAREST_MIPMAP_LINEAR, /**< Selects nearest pixel in two mipmaps then linearly interpolates between them */
67 TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST /**< Linearly interpolates in the nearest mipmap */
69
70/** Enumeration for the Depth Testing and Writting mode */
71typedef enum
72{
73 DEPTH_BUFFER_NO_TEST_NO_WRITE = 0, //Save as 0 for compatability /**< Doesn't Test or Write */
74 DEPTH_BUFFER_TEST_AND_WRITE, //Save as 1 for compatability /**< Both Tests and Writes */
75 DEPTH_BUFFER_TEST_NO_WRITE, /**< Tests but doesn't write */
76 DEPTH_BUFFER_NO_TEST_AND_WRITE /**< Doesn't test but does write*/
78
79/** Enumeration for polygon drawing mode of the object */
80typedef enum
81{
82 POLY_MODE_UNDEFINED, /**< Polygon draw style is not defined; not a drawable type. Used with the properties page */
83 POLY_MODE_POINTS, /**< Polygon will be rendered with a point at each vertex */
84 POLY_MODE_OUTLINE, /**< Polygon will be rendered as an outline */
85 POLY_MODE_FILLED, /**< Polygon will be rendered filled-in */
86 POLY_MODE_FILL_AND_OUTLINE /**< Polygon will be rendered filled-in and with an outline */
88
89/** Enumeration for Alpha Blending/Testing mode */
90typedef enum
91{
92 ALPHA_MODE_UNDEFINED, /**< Alpha mode is not defined. Used by the properties page */
93 ALPHA_MODE_OPAQUE, /**< Alpha testing and blending are disabled */
94 ALPHA_MODE_2_LEVEL, /**< Alpha testing with a threshold of 0.5 is enabled, alpha blending is enabled. */
95 ALPHA_MODE_256_LEVEL /**< Alpha blending is enabled, alpha testing is disabled. */
97
98/** Enumeration for whether or not polygon is closed or open */
99typedef enum
100{
101 POLY_OPEN, /**< Polygon will be drawn open */
102 POLY_CLOSED /**< Polygon will be drawn closed */
104
105/** Enumeration for the type of rendering projection for a display frame */
106typedef enum
107{
108 SHADING_FLAT, /**< The object will be drawn with flat shading (monochromatic) */
109 SHADING_GOURAUD /**< The object will be drawn with gouraud shading (linear color interpolation) */
111
112/** Enumeration for the C++ protection status of an object */
113typedef enum
114{
115 PUBLIC, /**< The object will be C++ public status */
116 PRIVATE, /**< The object will be C++ private status */
117 PROTECTED /**< The object will be C++ protected status */
119
120/** Enumeration for the redraw behavior for a display frame */
121typedef enum
122{
123 REDRAW_CONDITIONAL, /**< The display frame is only redrawn when the scene changes */
124 REDRAW_CONSTANT, /**< The display frame is constantly redrawn at a specified rate */
125 REDRAW_CONTINUOUS /**< The display frame is constantly redrawn as fast as possible */
127
128/** Enumeration for the type of picking for an object */
129typedef enum
130{
131 PICK_NEVER, /**< Picking will be disabled for this object and all children */
132 PICK_FIRST, /**< Picking will be based on draw order only. The first geometry hit wins. */
133 PICK_BEST, /**< Picking will find the best geometry hit of all available children */
134 PICK_ALWAYS /**< Picking will ignore geometry of this object, and always return a pick as if hit.
135 This is still only found through normal draw order traversal.*/
137
138/** Enumeration for an object's usage of glColorMaterial */
139typedef enum
140{
141 NO_COLOR_MATERIAL, /**< glColorMaterial will be disabled for the object */
142 DIFFUSE_COLOR_MATERIAL, /**< glColorMaterial will be enabled for the diffuse material */
143 AMBIENT_COLOR_MATERIAL, /**< glColorMaterial will be enabled for the ambient material */
144 DIFFUSE_AND_AMBIENT_COLOR_MATERIAL, /**< glColorMaterial will be enabled for the diffuse & ambient materials */
145 EMISSION_COLOR_MATERIAL, /**< glColorMaterial will be enabled for the emission material */
146 SPECULAR_COLOR_MATERIAL /**< glColorMaterial will be enabled for the specular material */
148
149/////////////////////////////////////////////////////////////////////////
150//
151// Default field values
152//
153/////////////////////////////////////////////////////////////////////////
154#define DEF_WINDOW_SIZE 500 ///< Default application window width and height.
155#define DEF_FILE_NAME "Untitled" ///< Default GLS design file name.
156
157#define DEF_LINE_RCOLOR 0 ///< Default red channel for object outlines.
158#define DEF_LINE_GCOLOR 0 ///< Default green channel for object outlines.
159#define DEF_LINE_BCOLOR 0 ///< Default blue channel for object outlines.
160#define DEF_LINE_ALPHA 255 ///< Default alpha channel for object outlines.
161
162#define DEF_FILL_RCOLOR 255 ///< Default red channel for object fill.
163#define DEF_FILL_GCOLOR 255 ///< Default green channel for object fill.
164#define DEF_FILL_BCOLOR 255 ///< Default blue channel for object fill.
165#define DEF_FILL_ALPHA 255 ///< Default alpha channel for object fill.
166
167#define DEF_GRID_RCOLOR 0 ///< Default red channel for the editor canvas grid.
168#define DEF_GRID_GCOLOR 0 ///< Default green channel for the editor canvas grid.
169#define DEF_GRID_BCOLOR 0 ///< Default blue channel for the editor canvas grid.
170#define DEF_GRID_ALPHA 255 ///< Default alpha channel for the editor canvas grid.
171
172#define DEF_AXES_RCOLOR 0 ///< Default red channel for the editor canvas axes.
173#define DEF_AXES_GCOLOR 0 ///< Default green channel for the editor canvas axes.
174#define DEF_AXES_BCOLOR 0 ///< Default blue channel for the editor canvas axes.
175#define DEF_AXES_ALPHA 255 ///< Default alpha channel for the editor canvas axes.
176
177#define DEF_TEXTURE_BLEND_RCOLOR 255 ///< Default red channel for texture blending.
178#define DEF_TEXTURE_BLEND_GCOLOR 255 ///< Default green channel for texture blending.
179#define DEF_TEXTURE_BLEND_BCOLOR 255 ///< Default blue channel for texture blending.
180#define DEF_TEXTURE_BLEND_ALPHA 255 ///< Default alpha channel for texture blending.
181
182#define DEF_BACKGROUND_RCOLOR 160 ///< Default red channel for editor canvas, and application clear color.
183#define DEF_BACKGROUND_GCOLOR 168 ///< Default green channel for editor canvas, and application clear color.
184#define DEF_BACKGROUND_BCOLOR 176 ///< Default blue channel for editor canvas, and application clear color.
185#define DEF_BACKGROUND_ALPHA 255 ///< Default alpha channel for editor canvas, and application clear color.
186
187#define DEF_LIGHT_COLOR 255 ///< Unused, remains for backward compatibility.
188
189#define DEF_LINE_WIDTH 1.0 ///< Default width in pixels for object outlines.
190#define DEF_LINE_STIPPLE_PATTERN 65535 ///< Default line stipple pattern (solid).
191#define DEF_LINE_STIPPLE_MULTIPLIER 1 ///< Default line stipple multiplier.
192
193#define DEF_QUAD_WIDTH 25.0 ///< Unused, remains for backward compatibility.
194#define DEF_QUAD_HEIGHT 25.0 ///< Unused, remains for backward compatibility.
195
196#define DEF_CIRCLE_WIDTH 25.0 ///< Unused, remains for backward compatibility.
197#define DEF_CIRCLE_HEIGHT 25.0 ///< Unused, remains for backward compatibility.
198#define DEF_SHADING SHADING_FLAT ///< Default shading model for objects.
199#define DEF_LIGHTING_ENABLED 0 ///< Default lighting state for objects.
200#define DEF_USE_PARENT_LIGHTING true ///< Default parent lighting for objects.
201#define DEF_POLY_MODE POLY_MODE_OUTLINE ///< Default draw mode for objects.
202#define DEF_POLY_END POLY_CLOSED ///< Default to drawing closed polygons.
203#define DEF_TEXTURE_REPEAT TRUE ///< Default texture repeat state for objects.
204#define DEF_TEXTURE_MAGNIFICATION TEXTURE_FILTER_LINEAR ///< Default texture magnification for objects.
205#define DEF_TEXTURE_MINIFICATION TEXTURE_FILTER_LINEAR ///< Default texture minification for objects.
206#define DEF_TEXTURE_MAP TEXTURE_MAP_REPLACE ///< Default texture mapping mode for objects.
207#define DEF_POLYGON_MIN_DIMENSION 1 ///< Unused, remains for backward compatibility.
208
209#define DEF_POLYGON_OFFSET 0 ///< Unused, remains for backward compatibility.
210
211#define DEF_DOUBLE_CLICK 500 ///< Editor canvas double click interval, in milliseconds.
212#define DEF_DOUBLE_CLICK_TOLERANCE 5 ///< Editor canvas location tolerance, in logical units.
213
214#define DEF_STATIC_FLAG FALSE ///< Unused, remains for backward compatibility.
215#define DEF_ALPHAMODE ALPHA_MODE_256_LEVEL ///< Default alpha test mode for objects.
216#define DEF_VISIBILITY TRUE ///< Default visibility for objects.
217#define DEF_CULLBACKFACE FALSE ///< Default backface drawing mode for objects.
218#define DEF_ZBUFFER DEPTH_BUFFER_TEST_NO_WRITE ///< Default depth buffer write mode for objects.
219#define DEF_ANTIALIAS FALSE ///< Default anti alias state for objects.
220#define DEF_CIRCLE_SEGMENTS 30 ///< Unused, remains for backward compatibility.
221#define DEF_PROTECTION_MODE PUBLIC ///< Default variable protection mode for objects.
222#define DEF_ARC_ANGLE_AMOUNT 90.0 ///< Unused, remains for backward compatibility.
223#define DEF_ARC_START_ANGLE 270.0 ///< Unused, remains for backward compatibility.
224#define DEF_PROJECTION ORTHOGRAPHIC ///< Unused, remains for backward compatibility.
225#define DEF_BUFFER DOUBLE_BUFFER ///< Unused, remains for backward compatibility.
226#define DEF_FRAME_RATE 30 ///< Default framerate for applications.
227#define DEF_REDRAW REDRAW_CONSTANT ///< Default redraw behavior for applications.
228#define DEF_BLINK false ///< Default blink mode for objects.
229#define DEF_BLINK_RATE 2.0 ///< Default blink rate for objects in seconds.
230#define DEF_PICKABLE PICK_FIRST ///< Default pick mode for objects.
231#define DEF_MATERIAL_INDEX 0 ///< Default material index for objects.
232
233#define DEF_TEXTURE_PALETTE_SIZE 50 ///< Unused, remains for backward compatibility.
234
235static const int MULTIPLE_TEXTURES_ON_OBJECT = -2; ///< Special value to denote multiple textures are present on an object (like a mesh).
236
237//////////////////////////////////////////////////////////////////////////
238//
239// "View" of a window, either in runtime or in the editor
240//
241//////////////////////////////////////////////////////////////////////////
242/**
243 View
244*/
246{
247 VIEW_XY = 1,
248 VIEW_XZ = 2,
249 VIEW_ZY = 4,
250 VIEW_PERSPECTIVE = 8,
251 VIEW_EYEPOINT = 16
252};
253
254//////////////////////////////////////////////////////////////////////////
255//
256// Used in Generated Code
257//
258//////////////////////////////////////////////////////////////////////////
259/**
260 Initializers
261*/
262typedef enum
263{
264 GLS_INSTANCE_NAME = 1,
265 GLS_LOCATION,
266 GLS_ROTATION_POINT,
267 GLS_ACTION_CALLBACK,
268 GLS_OBJECT_NAME,
269 GLS_ATTRIBUTE_NAME,
270 GLS_TEXTURE_INDEX,
271 GLS_TEXTURE_REPEAT,
272 GLS_TEXTURE_MAP_MODE,
273 GLS_TEXTURE_MIN_FILTER,
274 GLS_TEXTURE_MAG_FILTER,
275 GLS_TEXTURE_BLEND_COLOR,
276 GLS_TEXTURE_ROTATION,
277 GLS_TEXTURE_SCALE_H,
278 GLS_TEXTURE_SCALE_V,
279 GLS_TEXTURE_OFFSET_X,
280 GLS_TEXTURE_OFFSET_Y,
281 GLS_POLYGON_MODE,
282 GLS_POLYGON_END,
283 GLS_POLYGON_OFFSET,
284 GLS_COLOR,
285 GLS_COLOR_MATERIAL_MODE,
286 GLS_LINE_WIDTH,
287 GLS_LINE_STIPPLE_PATTERN,
288 GLS_LINE_STIPPLE_MULTIPLIER,
289 GLS_VISIBILITY,
290 GLS_CULLBACKFACE,
291 GLS_ALPHAMODE,
292 GLS_ANTIALIAS,
293 GLS_ZBUFFER,
294 GLS_SHADING,
295 GLS_BLINKING,
296 GLS_BLINK_RATE,
297 GLS_PICKABLE,
298 GLS_LIGHTING_ENABLED,
299 GLS_MATERIAL_INDEX,
300 GLS_MATERIAL_INDICES,
301 GLS_DCS_MATRIX,
302 GLS_COMPONENT_ABSOLUTE_PLACEMENT,
303 GLS_COMPONENT_EDITOR_TRANSFORM,
304 GLS_TEXTURE_POINTS,
305 GLS_LAST_INITIALIZER
307
308} // namespace disti
309
310#endif
A file for all GL Studio files to include.
Definition: bmpimage.h:46
GLS_Initializers
Definition: display_types.h:263
PickableType_e
Definition: display_types.h:130
@ PICK_ALWAYS
Definition: display_types.h:134
@ PICK_FIRST
Definition: display_types.h:132
@ PICK_NEVER
Definition: display_types.h:131
@ PICK_BEST
Definition: display_types.h:133
TextureMap_e
Definition: display_types.h:52
@ TEXTURE_MAP_BLEND
Definition: display_types.h:55
@ TEXTURE_MAP_DECAL
Definition: display_types.h:54
@ TEXTURE_MAP_MODULATE
Definition: display_types.h:53
@ TEXTURE_MAP_REPLACE
Definition: display_types.h:56
TextureFilter_e
Definition: display_types.h:61
@ TEXTURE_FILTER_NEAREST
Definition: display_types.h:62
@ TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR
Definition: display_types.h:65
@ TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST
Definition: display_types.h:64
@ TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST
Definition: display_types.h:67
@ TEXTURE_FILTER_LINEAR
Definition: display_types.h:63
@ TEXTURE_FILTER_NEAREST_MIPMAP_LINEAR
Definition: display_types.h:66
DepthBuffer_e
Definition: display_types.h:72
@ DEPTH_BUFFER_TEST_NO_WRITE
Definition: display_types.h:75
@ DEPTH_BUFFER_NO_TEST_AND_WRITE
Definition: display_types.h:76
Views
Definition: display_types.h:246
PolygonMode_e
Definition: display_types.h:81
@ POLY_MODE_FILLED
Definition: display_types.h:85
@ POLY_MODE_POINTS
Definition: display_types.h:83
@ POLY_MODE_OUTLINE
Definition: display_types.h:84
@ POLY_MODE_UNDEFINED
Definition: display_types.h:82
@ POLY_MODE_FILL_AND_OUTLINE
Definition: display_types.h:86
AlphaMode_e
Definition: display_types.h:91
@ ALPHA_MODE_256_LEVEL
Definition: display_types.h:95
@ ALPHA_MODE_UNDEFINED
Definition: display_types.h:92
@ ALPHA_MODE_2_LEVEL
Definition: display_types.h:94
@ ALPHA_MODE_OPAQUE
Definition: display_types.h:93
ColorMaterialMode_e
Definition: display_types.h:140
@ EMISSION_COLOR_MATERIAL
Definition: display_types.h:145
@ NO_COLOR_MATERIAL
Definition: display_types.h:141
@ DIFFUSE_COLOR_MATERIAL
Definition: display_types.h:142
@ SPECULAR_COLOR_MATERIAL
Definition: display_types.h:146
@ DIFFUSE_AND_AMBIENT_COLOR_MATERIAL
Definition: display_types.h:144
@ AMBIENT_COLOR_MATERIAL
Definition: display_types.h:143
MemberAccess_e
Definition: display_types.h:114
@ PRIVATE
Definition: display_types.h:116
@ PROTECTED
Definition: display_types.h:117
@ PUBLIC
Definition: display_types.h:115
ShadingType_e
Definition: display_types.h:107
@ SHADING_FLAT
Definition: display_types.h:108
@ SHADING_GOURAUD
Definition: display_types.h:109
RedrawBehavior_e
Definition: display_types.h:122
@ REDRAW_CONDITIONAL
Definition: display_types.h:123
@ REDRAW_CONSTANT
Definition: display_types.h:124
@ REDRAW_CONTINUOUS
Definition: display_types.h:125
PolygonClose_e
Definition: display_types.h:100
@ POLY_OPEN
Definition: display_types.h:101
@ POLY_CLOSED
Definition: display_types.h:102