DriveWorks SDK Reference
5.6.215 Release
For Test and Development only

RenderEngine.h
Go to the documentation of this file.
1
2//
3// Notice
4// ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
5// NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
6// THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
7// MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8//
9// NVIDIA CORPORATION & AFFILIATES assumes no responsibility for the consequences of use of such
10// information or for any infringement of patents or other rights of third parties that may
11// result from its use. No license is granted by implication or otherwise under any patent
12// or patent rights of NVIDIA CORPORATION & AFFILIATES. No third party distribution is allowed unless
13// expressly authorized by NVIDIA. Details are subject to change without notice.
14// This code supersedes and replaces all information previously supplied.
15// NVIDIA CORPORATION & AFFILIATES products are not authorized for use as critical
16// components in life support devices or systems without express written approval of
17// NVIDIA CORPORATION & AFFILIATES.
18//
19// SPDX-FileCopyrightText: Copyright (c) 2017-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
20// SPDX-License-Identifier: LicenseRef-NvidiaProprietary
21//
22// NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
23// property and proprietary rights in and to this material, related
24// documentation and any modifications thereto. Any use, reproduction,
25// disclosure or distribution of this material and related documentation
26// without an express license agreement from NVIDIA CORPORATION or
27// its affiliates is strictly prohibited.
28//
30
46#ifndef DWVISUALIZATION_RENDERENGINE_H_
47#define DWVISUALIZATION_RENDERENGINE_H_
48
49#include "Renderer.h"
50
52
53#ifdef __cplusplus
54extern "C" {
55#endif
56
58typedef struct dwRenderEngineObject* dwRenderEngineHandle_t;
60typedef const struct dwRenderEngineObject* dwConstRenderEngineHandle_t;
61
63typedef enum {
74
77
81typedef enum {
127
130
133typedef enum {
141
143#define DW_RENDER_ENGINE_MAX_PLOTS2D 20
144
147
148static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_RED = {230.0f / 255.0f, 72.0f / 255.0f, 32.0f / 255.0f, 1.0f};
149static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_DARKRED = {180.0f / 255.0f, 5.0f / 255.0f, 0.0f / 255.0f, 1.0f};
150static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_PURPLE = {255.0f / 255.0f, 0.0f / 255.0f, 240.0f / 255.0f, 1.0f};
151static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_BLUE = {32.0f / 255.0f, 72.0f / 255.0f, 230.0f / 255.0f, 1.0f};
152static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_GREEN = {32.0f / 255.0f, 230.0f / 255.0f, 32.0f / 255.0f, 1.0f};
153static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_WHITE = {255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 1.0f};
154static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_DARKGREEN = {45.0f / 255.0f, 100.0f / 255.0f, 44.0f / 255.0f, 1.0f};
155static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_LIGHTGREEN = {118.0f / 255.0f, 185.0f / 255.0f, 0.0f / 255.0f, 1.0f};
156static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_LIGHTGREY = {185.0f / 255.0f, 185.0f / 255.0f, 185.0f / 255.0f, 1.0f};
157static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_DARKGREY = {72.0f / 255.0f, 72.0f / 255.0f, 72.0f / 255.0f, 1.0f};
158static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_DARKBLUE = {45.0f / 255.0f, 44.0f / 255.0f, 100.0f / 255.0f, 0.6f};
159static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_YELLOW = {230.0f / 255.0f, 230.0f / 255.0f, 10.0f / 255.0f, 1.0f};
160static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_ORANGE = {230.0f / 255.0f, 100.0f / 255.0f, 10.0f / 255.0f, 1.0f};
161static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_LIGHTBLUE = {51.0f / 255.0f, 153.0f / 255.0f, 255.0f / 255.0f, 0.6f};
162static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_BLACK = {0.0f / 255.0f, 0.0f / 255.0f, 0.0f / 255.0f, 1.0f};
163static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_PINK = {1.0f, 113.0f / 255.0f, 181.0f / 255.0f, 1.0f};
164static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_CYAN = {0.0f, 1.0f, 1.0f, 1.0f};
165static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_DARKBROWN = {101.0f / 255.0f, 67.0f / 255.0f, 33.0f / 255.0f, 1.0f};
166static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_DARKPURPLE = {70.0f / 255.0f, 39.0f / 255.0f, 89.0f / 255.0f, 1.0f};
167
170typedef enum {
199
202typedef enum {
214
217typedef enum {
277
280{
295
298{
320
323{
339 uint32_t bufferSize;
348
360 uint32_t width, uint32_t height);
361
374 const dwRenderEngineParams* params,
376
387
399
411
426 const dwRenderEngineTileState* params,
428
438
451
471 uint32_t* secondTileId,
472 bool horizontal,
473 const dwRenderEngineTileState* firstParams,
474 const dwRenderEngineTileState* secondParams,
476
494 uint32_t tileCount,
495 uint32_t maxPerRow,
496 const dwRenderEngineTileState* paramsList,
498
512
526
539
552
568
583
599
614
628 dwVector3f center,
629 dwVector3f up,
631
655 float32_t yAngleRadians,
656 float32_t distance,
657 dwVector3f center,
658 dwVector3f up,
660
677 float32_t bottom, float32_t top,
678 float32_t near, float32_t far,
680
696 float32_t aspect,
697 float32_t near,
698 float32_t far,
700
718
736
752
767
784
797
809
822
834
853 float32_t scale,
855
868
881
911
925
938
952
969
983
996
1025 uint32_t vertexStrideBytes,
1026 uint32_t offsetBytes,
1027 uint32_t primitiveCount,
1028 dwRenderEngineHandle_t engine);
1029
1041 dwRenderEngineHandle_t engine);
1042
1058 uint32_t bufferId,
1059 dwRenderEngineHandle_t engine);
1060
1085 const void* buffer,
1086 uint32_t vertexStrideBytes,
1087 uint32_t offsetBytes,
1088 uint32_t primitiveCount,
1089 dwRenderEngineHandle_t engine);
1090
1107 void** buffer,
1108 uint32_t offsetBytes,
1109 uint32_t sizeBytes,
1111 dwRenderEngineHandle_t engine);
1112
1126 dwRenderEngineHandle_t engine);
1127
1144 uint32_t primitiveCount,
1145 dwRenderEngineHandle_t engine);
1146
1171 uint32_t vertexStrideBytes,
1172 uint32_t offsetBytes,
1173 const char** labels,
1174 uint32_t primitiveCount,
1175 dwRenderEngineHandle_t engine);
1176
1204 const void* buffer,
1205 uint32_t vertexStrideBytes,
1206 uint32_t offsetBytes,
1207 uint32_t primitiveCount,
1208 dwRenderEngineHandle_t engine);
1209
1238 const void* buffer,
1239 uint32_t vertexStrideBytes,
1240 uint32_t offsetBytes,
1241 const char* labels[],
1242 uint32_t primitiveCount,
1243 dwRenderEngineHandle_t engine);
1244
1273 const void* buffer,
1274 uint32_t vertexStrideBytes,
1275 uint32_t offsetBytes,
1276 const char* label,
1277 uint32_t primitiveCount,
1278 dwRenderEngineHandle_t engine);
1279
1293 const char* filename,
1294 dwRenderEngineHandle_t engine);
1295
1307 dwRenderEngineHandle_t engine);
1308
1324 dwRectf plane,
1325 dwRenderEngineHandle_t engine);
1326
1341 dwRectf plane,
1342 const dwMatrix4f* modelMatrix,
1343 dwRenderEngineHandle_t engine);
1344
1360 dwVector2f pos,
1361 dwRenderEngineHandle_t engine);
1362
1378 dwVector3f pos,
1379 dwRenderEngineHandle_t engine);
1395 dwRectf plane,
1396 float32_t xSpacing,
1397 float32_t ySpacing,
1398 dwRenderEngineHandle_t engine);
1399
1414 float32_t xSpacing,
1415 float32_t ySpacing,
1416 dwRenderEngineHandle_t engine);
1417
1436 dwRectf plane,
1437 float32_t xSpacing,
1438 float32_t ySpacing,
1439 const dwMatrix4f* modelMatrix,
1440 dwRenderEngineHandle_t engine);
1441
1459 float32_t xSpacing,
1460 float32_t ySpacing,
1461 const dwMatrix4f* modelMatrix,
1462 dwRenderEngineHandle_t engine);
1463
1479 dwRectf plane,
1480 float32_t xSpacing,
1481 float32_t ySpacing,
1482 dwRenderEngineHandle_t engine);
1483
1498 float32_t xSpacing,
1499 float32_t ySpacing,
1500 dwRenderEngineHandle_t engine);
1501
1520 dwRectf plane,
1521 float32_t xSpacing,
1522 float32_t ySpacing,
1523 const dwMatrix4f* modelMatrix,
1524 dwRenderEngineHandle_t engine);
1525
1543 float32_t xSpacing,
1544 float32_t ySpacing,
1545 const dwMatrix4f* modelMatrix,
1546 dwRenderEngineHandle_t engine);
1547
1581 const void* buffer,
1582 uint32_t vertexStrideBytes,
1583 uint32_t offsetBytes,
1584 uint32_t primitiveCount,
1585 const char* label,
1586 dwVector4f range,
1587 dwRectf plane,
1588 dwRenderEngineColorRGBA axesColor,
1589 float32_t axesWidth,
1590 const char* title,
1591 const char* xLabel,
1592 const char* yLabel,
1593 dwRenderEngineHandle_t engine);
1594
1634 const void** buffers,
1635 const uint32_t* vertexStridesBytes,
1636 const uint32_t* offsetsBytes,
1637 const uint32_t* bufferCounts,
1638 const dwRenderEngineColorRGBA* colors,
1639 const float32_t* lineWidths,
1640 const char** labels,
1641 uint32_t plotsCount,
1642 dwVector4f range,
1643 dwRectf plane,
1644 dwRenderEngineColorRGBA axesColor,
1645 float32_t axesWidth,
1646 const char* title,
1647 const char* xLabel,
1648 const char* yLabel,
1649 dwRenderEngineHandle_t engine);
1650
1665 dwVector2f pixelPosition,
1666 dwVector2f screenSize,
1667 dwRenderEngineHandle_t engine);
1668
1682 dwVector3f worldPosition,
1683 dwVector2f screenSize,
1684 dwRenderEngineHandle_t engine);
1685
1701 dwVector2f pixelPosition,
1702 dwVector2f screenSize,
1704
1717
1730#ifdef __cplusplus
1731}
1732#endif
1734#endif // DW_VISUALIZATION_RENDERENGINE_H_
NVIDIA DriveWorks API: Renderer
struct dwVisualizationContextObject * dwVisualizationContextHandle_t
Context handle.
Definition: Visualization.h:67
dwStatus
Status definition.
Definition: Status.h:170
float float32_t
Specifies POD types.
Definition: Types.h:70
Defines a 4x4 matrix of floating point numbers (column major) by using only one array.
Definition: Types.h:295
Defines a rectangle with floating point numbers.
Definition: Types.h:224
Defines a two-element single-precision floating-point vector.
Definition: Types.h:325
Defines a three-element floating-point vector.
Definition: Types.h:355
Defines a four-element single-precision floating point vector.
Definition: Types.h:372
Defines a GL texture image.
Definition: Image.h:61
dwRenderEngineTileLayoutType positionLayout
The layout indicator for position.
Definition: RenderEngine.h:284
dwRenderEngineColorRGBA backgroundColor
The background color.
Definition: RenderEngine.h:306
uint32_t bufferSize
Default buffer size for rendering primitives in bytes.
Definition: RenderEngine.h:339
dwRenderEngineTileLayoutType sizeLayout
The layout indicator for size.
Definition: RenderEngine.h:282
dwRenderEngineTilePositionType positionType
The position type that determines how the position coordinates are interpreted.
Definition: RenderEngine.h:287
dwRectf viewport
The viewport for the tile.
Definition: RenderEngine.h:289
float32_t aspectRatio
The aspect ratio for the tile.
Definition: RenderEngine.h:291
dwRenderEngineColorByValueMode colorByValueMode
Color by value mode.
Definition: RenderEngine.h:310
dwRenderEngineFont font
The font.
Definition: RenderEngine.h:316
bool useAspectRatio
Use aspect ratio.
Definition: RenderEngine.h:293
dwRenderEngineTileLayout layout
The layout which includes the viewport.
Definition: RenderEngine.h:300
dwMatrix4f modelViewMatrix
The model view matrix.
Definition: RenderEngine.h:302
dwVector2f coordinateRange2D
The normalization factor for 2D rendering.
Definition: RenderEngine.h:318
float32_t pointSize
The point size.
Definition: RenderEngine.h:314
float32_t lineWidth
The line width.
Definition: RenderEngine.h:312
dwRenderEngineColorRGBA color
Color of the rendering primitives in the tile.
Definition: RenderEngine.h:308
dwMatrix4f projectionMatrix
The projection matrix for the camera.
Definition: RenderEngine.h:304
uint32_t maxBufferCount
Maximum static buffer count.
Definition: RenderEngine.h:346
dwRectf bounds
The default display bounds.
Definition: RenderEngine.h:325
dwRenderEngineTileState defaultTile
The default tile.
Definition: RenderEngine.h:327
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_DARKPURPLE
Definition: RenderEngine.h:166
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderText3D(const char *text, dwVector3f pos, dwRenderEngineHandle_t engine)
Renders text within the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setViewport(dwRectf viewport, dwRenderEngineHandle_t engine)
Sets the user-defined viewport which is used in conjunction with the other layout parameters to compu...
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_RED
Definition: RenderEngine.h:148
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderWithLabel(dwRenderEnginePrimitiveType type, const void *buffer, uint32_t vertexStrideBytes, uint32_t offsetBytes, const char *label, uint32_t primitiveCount, dwRenderEngineHandle_t engine)
Render an external buffer with one label.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderPlot2D(dwRenderEnginePlotType type, const void *buffer, uint32_t vertexStrideBytes, uint32_t offsetBytes, uint32_t primitiveCount, const char *label, dwVector4f range, dwRectf plane, dwRenderEngineColorRGBA axesColor, float32_t axesWidth, const char *title, const char *xLabel, const char *yLabel, dwRenderEngineHandle_t engine)
Renders a plot in 2D.
dwRenderEngineTileLayoutType
The layout indicator for size and position of each tile.
Definition: RenderEngine.h:202
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_LIGHTGREEN
Definition: RenderEngine.h:155
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setFont(dwRenderEngineFont font, dwRenderEngineHandle_t engine)
Sets the font for text drawn in the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_mapBuffer(uint32_t bufferId, void **buffer, uint32_t offsetBytes, uint32_t sizeBytes, dwRenderEnginePrimitiveType type, dwRenderEngineHandle_t engine)
maps internal buffer for data operations.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setBounds(dwRectf bounds, dwRenderEngineHandle_t engine)
Sets the bounds for the entire render area.
const uint32_t DW_RENDER_ENGINE_MAX_TILE_COUNT
Maximum number of tiles that can be added.
Definition: RenderEngine.h:76
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_removeTile(uint32_t tileId, dwRenderEngineHandle_t engine)
Removes a render tile from the render engine.
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_BLUE
Definition: RenderEngine.h:151
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderEllipticalGrid3D(dwRectf plane, float32_t xSpacing, float32_t ySpacing, const dwMatrix4f *modelMatrix, dwRenderEngineHandle_t engine)
Renders an elliptical grid in 3D.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_createImageGLFromFile(dwImageGL *img, const char *filename, dwRenderEngineHandle_t engine)
Reads a file from disk and puts it into an dwImageGL.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_initialize(dwRenderEngineHandle_t *engine, const dwRenderEngineParams *params, dwVisualizationContextHandle_t context)
Initializes a render engine handle.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getPointSize(float32_t *pointSize, dwConstRenderEngineHandle_t engine)
Gets the current tile point size.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_render(dwRenderEnginePrimitiveType type, const void *buffer, uint32_t vertexStrideBytes, uint32_t offsetBytes, uint32_t primitiveCount, dwRenderEngineHandle_t engine)
Render an external buffer.
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_GREEN
Definition: RenderEngine.h:152
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderBuffer(uint32_t bufferId, uint32_t primitiveCount, dwRenderEngineHandle_t engine)
Render the buffer.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_destroyImageGL(const dwImageGL *image, dwRenderEngineHandle_t engine)
Releases the memory of a dwImageGL.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getBackgroundColor(dwRenderEngineColorRGBA *color, dwConstRenderEngineHandle_t engine)
Gets the current tile background color.
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_WHITE
Definition: RenderEngine.h:153
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getRenderViewport(dwRectf *viewport, dwConstRenderEngineHandle_t engine)
Gets the render viewport for the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getBufferMaxPrimitiveCount(uint32_t *maxPrimitiveCount, uint32_t bufferId, dwRenderEngineHandle_t engine)
Get the max renderable primitive count for a buffer.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderPlanarGrid3D(dwRectf plane, float32_t xSpacing, float32_t ySpacing, const dwMatrix4f *modelMatrix, dwRenderEngineHandle_t engine)
Renders a grid in 3D.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderImage3D(const dwImageGL *img, dwRectf plane, const dwMatrix4f *modelMatrix, dwRenderEngineHandle_t engine)
Renders a 2D image in 3D space within the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_release(dwRenderEngineHandle_t engine)
Releases the render engine handle.
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_PINK
Definition: RenderEngine.h:163
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setBufferPlanarGrid2D(uint32_t bufferId, dwRectf plane, float32_t xSpacing, float32_t ySpacing, dwRenderEngineHandle_t engine)
Fills a buffer with a grid in 2D.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getCoordinateRange2D(dwVector2f *range, dwConstRenderEngineHandle_t engine)
Gets the coordinate range for 2D rendering of the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_unmapBuffer(uint32_t bufferId, dwRenderEnginePrimitiveType type, dwRenderEngineHandle_t engine)
Unmaps the internal buffer.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderEllipticalGrid2D(dwRectf plane, float32_t xSpacing, float32_t ySpacing, dwRenderEngineHandle_t engine)
Renders an elliptical grid in 2D.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getLineWidth(float32_t *lineWidth, dwConstRenderEngineHandle_t engine)
Gets the current tile line width.
dwRenderEnginePrimitiveType
When rendering 2D data the coordinate system is always from 0 to 1, unless changed by calling dwRende...
Definition: RenderEngine.h:81
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_ORANGE
Definition: RenderEngine.h:160
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getBounds(dwRectf *bounds, dwRenderEngineHandle_t engine)
Gets the bounds for the entire render area.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setBackgroundColor(dwRenderEngineColorRGBA color, dwRenderEngineHandle_t engine)
Sets the background color of the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setBufferPlanarGrid3D(uint32_t bufferId, dwRectf plane, float32_t xSpacing, float32_t ySpacing, const dwMatrix4f *modelMatrix, dwRenderEngineHandle_t engine)
Fills a buffer with a grid in 3D.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_createBuffer(uint32_t *bufferId, dwRenderEnginePrimitiveType type, uint32_t vertexStrideBytes, uint32_t offsetBytes, uint32_t primitiveCount, dwRenderEngineHandle_t engine)
Creates a buffer for static drawing.
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_LIGHTBLUE
Definition: RenderEngine.h:161
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_DARKGREY
Definition: RenderEngine.h:157
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setTile(uint32_t tileId, dwRenderEngineHandle_t engine)
Sets the state of the engine to be a particular tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getProjection(dwMatrix4f *projectionMatrix, dwConstRenderEngineHandle_t engine)
Gets the projection matrix for the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_initDefaultParams(dwRenderEngineParams *params, uint32_t width, uint32_t height)
Initialize params to default.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setPointSize(float32_t pointSize, dwRenderEngineHandle_t engine)
Sets the point size of the current tile.
dwRenderEnginePlotType
An enum that controls the type of plot to render when calling dwRenderEngine_renderPlot2D.
Definition: RenderEngine.h:133
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setModelView(const dwMatrix4f *modelViewMatrix, dwRenderEngineHandle_t engine)
Sets the model view matrix for the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderBufferWithLabels(uint32_t bufferId, dwRenderEnginePrimitiveType type, uint32_t vertexStrideBytes, uint32_t offsetBytes, const char **labels, uint32_t primitiveCount, dwRenderEngineHandle_t engine)
Render the internal buffer with labels.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setOrthoProjection(float32_t left, float32_t right, float32_t bottom, float32_t top, float32_t near, float32_t far, dwRenderEngineHandle_t engine)
Sets up an orthographic projection for the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_addTile(uint32_t *tileId, const dwRenderEngineTileState *params, dwRenderEngineHandle_t engine)
Adds a render tile to the render engine.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_screenToWorld3D(dwVector3f *worldPosition, dwVector2f pixelPosition, dwVector2f screenSize, dwRenderEngineHandle_t engine)
Get the world coordinate in 3D based on screen pixel input.
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_LIGHTGREY
Definition: RenderEngine.h:156
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_DARKBLUE
Definition: RenderEngine.h:158
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getModelView(dwMatrix4f *modelViewMatrix, dwConstRenderEngineHandle_t engine)
Gets the model view matrix for the current tile.
dwRenderEngineTilePositionType
The layout indicator for position of each tile.
Definition: RenderEngine.h:217
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setState(const dwRenderEngineTileState *state, dwRenderEngineHandle_t engine)
Set the current tile state parameters.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setBuffer(uint32_t bufferId, dwRenderEnginePrimitiveType type, const void *buffer, uint32_t vertexStrideBytes, uint32_t offsetBytes, uint32_t primitiveCount, dwRenderEngineHandle_t engine)
Set the data for a buffer.
const struct dwRenderEngineObject * dwConstRenderEngineHandle_t
Const handle for the render engine.
Definition: RenderEngine.h:60
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderImage2D(const dwImageGL *img, dwRectf plane, dwRenderEngineHandle_t engine)
Renders a 2D image within the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderWithLabels(dwRenderEnginePrimitiveType type, const void *buffer, uint32_t vertexStrideBytes, uint32_t offsetBytes, const char *labels[], uint32_t primitiveCount, dwRenderEngineHandle_t engine)
Render an external buffer with labels.
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_DARKRED
Definition: RenderEngine.h:149
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_initTileState(dwRenderEngineTileState *params)
Initialize tile params to default state.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getTileByScreenCoordinates(uint32_t *tileId, dwVector2f pixelPosition, dwVector2f screenSize, dwConstRenderEngineHandle_t engine)
Gets the tile id that surrounds the input pixel position.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setLookAt(dwVector3f eye, dwVector3f center, dwVector3f up, dwRenderEngineHandle_t engine)
Sets the model view matrix for the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setProjection(const dwMatrix4f *projectionMatrix, dwRenderEngineHandle_t engine)
Sets the projection matrix for the current tile.
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_DARKGREEN
Definition: RenderEngine.h:154
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_BLACK
Definition: RenderEngine.h:162
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_destroyBuffer(uint32_t bufferId, dwRenderEngineHandle_t engine)
Destroys a buffer for static drawing.
dwRenderEngineFont
The font types for the render engine.
Definition: RenderEngine.h:63
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_CYAN
Definition: RenderEngine.h:164
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_resetTile(dwRenderEngineHandle_t engine)
Resets the state of the current tile and clears the display.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getFont(dwRenderEngineFont *font, dwConstRenderEngineHandle_t engine)
Gets the current tile font.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setLayout(dwRenderEngineTileLayout layout, dwRenderEngineHandle_t engine)
Sets the layout of the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getState(dwRenderEngineTileState *state, dwConstRenderEngineHandle_t engine)
Get the current tile state parameters.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getTile(uint32_t *tileId, dwConstRenderEngineHandle_t engine)
Gets the current render tile id.
dwRenderEngineColorByValueMode
An enum that controls how primitive colors are rendered.
Definition: RenderEngine.h:170
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setLookAtByAngles(float32_t xAngleRadians, float32_t yAngleRadians, float32_t distance, dwVector3f center, dwVector3f up, dwRenderEngineHandle_t engine)
Defines the camera position on a sphere surface around a center point, with the camera looking toward...
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_addSplitScreenTiles(uint32_t *firstTileId, uint32_t *secondTileId, bool horizontal, const dwRenderEngineTileState *firstParams, const dwRenderEngineTileState *secondParams, dwRenderEngineHandle_t engine)
Adds two render tiles to the render engine that each take up half of the render area (defined by boun...
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_beginTextBatch(dwRenderEngineHandle_t engine)
Signal the start of a series of text-drawing calls.
dwVector4f dwRenderEngineColorRGBA
RGBA render color.
Definition: RenderEngine.h:146
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_world3DToScreen(dwVector2f *pixelPosition, dwVector3f worldPosition, dwVector2f screenSize, dwRenderEngineHandle_t engine)
Get the screen coordinate in based on world 3D input.
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_PURPLE
Definition: RenderEngine.h:150
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setPerspectiveProjection(float32_t fovRadsY, float32_t aspect, float32_t near, float32_t far, dwRenderEngineHandle_t engine)
Sets the projection matrix for the current tile as defined by the parameters.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setCoordinateRange2D(dwVector2f range, dwRenderEngineHandle_t engine)
Sets the coordinate range for 2D rendering of the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_addTilesByCount(uint32_t *outTileIds, uint32_t tileCount, uint32_t maxPerRow, const dwRenderEngineTileState *paramsList, dwRenderEngineHandle_t engine)
Evenly add render tiles to the screen from left to right.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setColor(dwRenderEngineColorRGBA color, dwRenderEngineHandle_t engine)
Sets the foreground drawing color of the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_endTextBatch(dwRenderEngineHandle_t engine)
Signal the end of a series of text-drawing calls.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setBufferEllipticalGrid3D(uint32_t bufferId, dwRectf plane, float32_t xSpacing, float32_t ySpacing, const dwMatrix4f *modelMatrix, dwRenderEngineHandle_t engine)
Fills a buffer with an elliptical grid in 3D.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderPlanarGrid2D(dwRectf plane, float32_t xSpacing, float32_t ySpacing, dwRenderEngineHandle_t engine)
Renders a grid in 2D.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setBufferEllipticalGrid2D(uint32_t bufferId, dwRectf plane, float32_t xSpacing, float32_t ySpacing, dwRenderEngineHandle_t engine)
Fills a buffer with an elliptical grid in 2D.
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_DARKBROWN
Definition: RenderEngine.h:165
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderText2D(const char *text, dwVector2f pos, dwRenderEngineHandle_t engine)
Renders text within the current tile.
struct dwRenderEngineObject * dwRenderEngineHandle_t
Handle for the render engine.
Definition: RenderEngine.h:58
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_reset(dwRenderEngineHandle_t engine)
Resets the state of all render tiles and clears the display.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getViewport(dwRectf *viewport, dwConstRenderEngineHandle_t engine)
Gets the user-defined viewport for the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_renderPlots2D(const dwRenderEnginePlotType *types, const void **buffers, const uint32_t *vertexStridesBytes, const uint32_t *offsetsBytes, const uint32_t *bufferCounts, const dwRenderEngineColorRGBA *colors, const float32_t *lineWidths, const char **labels, uint32_t plotsCount, dwVector4f range, dwRectf plane, dwRenderEngineColorRGBA axesColor, float32_t axesWidth, const char *title, const char *xLabel, const char *yLabel, dwRenderEngineHandle_t engine)
Renders multiple plots in one graph.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getLayout(dwRenderEngineTileLayout *layout, dwConstRenderEngineHandle_t engine)
Gets the layout of the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setColorByValue(dwRenderEngineColorByValueMode mode, float32_t scale, dwRenderEngineHandle_t engine)
Sets the color of the primitives to be rendered based on their values.
static const dwRenderEngineColorRGBA DW_RENDER_ENGINE_COLOR_YELLOW
Definition: RenderEngine.h:159
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_setLineWidth(float32_t lineWidth, dwRenderEngineHandle_t engine)
Sets the line width of the current tile.
DW_VIZ_API_PUBLIC dwStatus dwRenderEngine_getColor(dwRenderEngineColorRGBA *color, dwConstRenderEngineHandle_t engine)
Gets the current tile color.
@ DW_RENDER_ENGINE_TILE_LAYOUT_TYPE_RELATIVE
Layout the position or size relative to the bounds of the render engine.
Definition: RenderEngine.h:212
@ DW_RENDER_ENGINE_TILE_LAYOUT_TYPE_ABSOLUTE
Layout the position or size in a fixed position and size.
Definition: RenderEngine.h:207
@ DW_RENDER_ENGINE_PRIMITIVE_TYPE_TRIANGLES_2D
Interleaved is x,y,x,y Min vertex size is 2 floats.
Definition: RenderEngine.h:102
@ DW_RENDER_ENGINE_PRIMITIVE_TYPE_BOXES_2D
Interleaved is x,y,width,height,x,y,width,height Min vertex size is 4 floats.
Definition: RenderEngine.h:108
@ DW_RENDER_ENGINE_PRIMITIVE_TYPE_ELLIPSES_2D
Interleaved is center x,y,x radius,y radius,x,y,x radius,y radius Min vertex size is 4 floats.
Definition: RenderEngine.h:117
@ DW_RENDER_ENGINE_PRIMITIVE_TYPE_LINESTRIP_2D
Interleaved is x,y,x,y Min vertex size is 2 floats.
Definition: RenderEngine.h:96
@ DW_RENDER_ENGINE_PRIMITIVE_TYPE_ARROWS_2D
Interleaved is start x,start y,end y,end x Min vertex size is 4 floats.
Definition: RenderEngine.h:123
@ DW_RENDER_ENGINE_PRIMITIVE_TYPE_LINESTRIP_3D
Interleaved is x,y,z,x,y,z Min vertex size is 3 floats.
Definition: RenderEngine.h:99
@ DW_RENDER_ENGINE_PRIMITIVE_TYPE_POINTS_2D
Interleaved is x,y,x,y Min vertex size is 2 floats.
Definition: RenderEngine.h:84
@ DW_RENDER_ENGINE_PRIMITIVE_TYPE_POINTS_3D
Interleaved is x,y,z,x,y,z Min vertex size is 3 floats.
Definition: RenderEngine.h:87
@ DW_RENDER_ENGINE_PRIMITIVE_TYPE_COUNT
Definition: RenderEngine.h:128
@ DW_RENDER_ENGINE_PRIMITIVE_TYPE_ORIENTED_BOXES_3D
Interleaved is 8 sets of (x,y,z) representing the 8 vertices of an oriented box Min vertex size is 24...
Definition: RenderEngine.h:114
@ DW_RENDER_ENGINE_PRIMITIVE_TYPE_ARROWS_3D
Interleaved is start x,start y,start z,end y,end x,end z Min vertex size is 6 floats.
Definition: RenderEngine.h:126
@ DW_RENDER_ENGINE_PRIMITIVE_TYPE_BOXES_3D
Interleaved is x,y,z,width,height,depth,x,y,z,width,height,depth Min vertex size is 6 floats.
Definition: RenderEngine.h:111
@ DW_RENDER_ENGINE_PRIMITIVE_TYPE_ELLIPSES_3D
Interleaved is center x,y,z,x radius,y radius Min vertex size is 5 floats.
Definition: RenderEngine.h:120
@ DW_RENDER_ENGINE_PRIMITIVE_TYPE_LINES_3D
Interleaved is x,y,z,x,y,z Min vertex size is 3 floats.
Definition: RenderEngine.h:93
@ DW_RENDER_ENGINE_PRIMITIVE_TYPE_LINES_2D
Interleaved is x,y,x,y Min vertex size is 2 floats.
Definition: RenderEngine.h:90
@ DW_RENDER_ENGINE_PRIMITIVE_TYPE_TRIANGLES_3D
Interleaved is x,y,z,x,y,z Min vertex size is 3 floats.
Definition: RenderEngine.h:105
@ DW_RENDER_ENGINE_PLOT_TYPE_HISTOGRAM
Render plot as histogram. Data layout is y,y,y,y.
Definition: RenderEngine.h:139
@ DW_RENDER_ENGINE_PLOT_TYPE_LINESTRIP
Render plot as line strip. Data layout is x,y,x,y.
Definition: RenderEngine.h:137
@ DW_RENDER_ENGINE_PLOT_TYPE_POINTS
Render plot as point values. Data layout is x,y,x,y.
Definition: RenderEngine.h:135
@ DW_RENDER_ENGINE_TILE_POSITION_TYPE_BOTTOM_CENTER
Layout the position relative to the bottom of the bounds.
Definition: RenderEngine.h:247
@ DW_RENDER_ENGINE_TILE_POSITION_TYPE_BOTTOM_RIGHT
Layout the position relative to the bottom right of the bounds.
Definition: RenderEngine.h:253
@ DW_RENDER_ENGINE_TILE_POSITION_TYPE_CENTER
Layout the position relative to the center of the bounds.
Definition: RenderEngine.h:271
@ DW_RENDER_ENGINE_TILE_POSITION_TYPE_GRID
Layout the position in a grid.
Definition: RenderEngine.h:275
@ DW_RENDER_ENGINE_TILE_POSITION_TYPE_CENTER_LEFT
Layout the position relative to the left of the bounds.
Definition: RenderEngine.h:259
@ DW_RENDER_ENGINE_TILE_POSITION_TYPE_BOTTOM_LEFT
Layout the position relative to the bottom left of the bounds.
Definition: RenderEngine.h:241
@ DW_RENDER_ENGINE_TILE_POSITION_TYPE_TOP_CENTER
Layout the position relative to the top of the bounds.
Definition: RenderEngine.h:229
@ DW_RENDER_ENGINE_TILE_POSITION_TYPE_CENTER_RIGHT
Layout the position relative to the right of the bounds.
Definition: RenderEngine.h:265
@ DW_RENDER_ENGINE_TILE_POSITION_TYPE_TOP_LEFT
Layout the position relative to the top left of the bounds.
Definition: RenderEngine.h:223
@ DW_RENDER_ENGINE_TILE_POSITION_TYPE_TOP_RIGHT
Layout the position relative to the top right of the bounds.
Definition: RenderEngine.h:235
@ DW_RENDER_ENGINE_FONT_VERDANA_48
Definition: RenderEngine.h:70
@ DW_RENDER_ENGINE_FONT_VERDANA_12
Definition: RenderEngine.h:65
@ DW_RENDER_ENGINE_FONT_VERDANA_64
Definition: RenderEngine.h:71
@ DW_RENDER_ENGINE_FONT_VERDANA_20
Definition: RenderEngine.h:67
@ DW_RENDER_ENGINE_FONT_VERDANA_16
Definition: RenderEngine.h:66
@ DW_RENDER_ENGINE_FONT_VERDANA_32
Definition: RenderEngine.h:69
@ DW_RENDER_ENGINE_FONT_VERDANA_8
Definition: RenderEngine.h:64
@ DW_RENDER_ENGINE_FONT_COUNT
Definition: RenderEngine.h:72
@ DW_RENDER_ENGINE_FONT_VERDANA_24
Definition: RenderEngine.h:68
@ DW_RENDER_ENGINE_COLOR_BY_VALUE_MODE_Y
Render the hue by distance in y direction.
Definition: RenderEngine.h:178
@ DW_RENDER_ENGINE_COLOR_BY_VALUE_MODE_INTENSITY
Render the hue by intensity value (Last value of primitives.
Definition: RenderEngine.h:191
@ DW_RENDER_ENGINE_COLOR_BY_VALUE_MODE_X
Render the hue by distance in x direction.
Definition: RenderEngine.h:176
@ DW_RENDER_ENGINE_COLOR_BY_VALUE_COLOR
Render according to tile current color.
Definition: RenderEngine.h:172
@ DW_RENDER_ENGINE_COLOR_BY_VALUE_MODE_YZ
Render the hue by distance in yz directions.
Definition: RenderEngine.h:186
@ DW_RENDER_ENGINE_COLOR_BY_VALUE_MODE_XZ
Render the hue by distance in xz directions.
Definition: RenderEngine.h:184
@ DW_RENDER_ENGINE_COLOR_BY_VALUE_MODE_ATTRIBUTE_RGBA
Render the color with the primitive interleaved This requires the data have RGBA values interleaved w...
Definition: RenderEngine.h:197
@ DW_RENDER_ENGINE_COLOR_BY_VALUE_MODE_DISTANCE
Render the hue by distance to origin.
Definition: RenderEngine.h:174
@ DW_RENDER_ENGINE_COLOR_BY_VALUE_MODE_XY
Render the hue by distance in xy directions.
Definition: RenderEngine.h:182
@ DW_RENDER_ENGINE_COLOR_BY_VALUE_MODE_Z
Render the hue by distance in z direction.
Definition: RenderEngine.h:180
The initialization parameters for a render engine.
Definition: RenderEngine.h:323
The tile layout for the viewport.
Definition: RenderEngine.h:280
The state for a render engine tile.
Definition: RenderEngine.h:298
@ DW_RENDER_FONT_VERDANA_32
Definition: Renderer.h:117
@ DW_RENDER_FONT_COUNT
Definition: Renderer.h:120
@ DW_RENDER_FONT_VERDANA_48
Definition: Renderer.h:118
@ DW_RENDER_FONT_VERDANA_64
Definition: Renderer.h:119
@ DW_RENDER_FONT_VERDANA_20
Definition: Renderer.h:115
@ DW_RENDER_FONT_VERDANA_12
Definition: Renderer.h:113
@ DW_RENDER_FONT_VERDANA_24
Definition: Renderer.h:116
@ DW_RENDER_FONT_VERDANA_16
Definition: Renderer.h:114
@ DW_RENDER_FONT_VERDANA_8
Definition: Renderer.h:112
#define DW_VIZ_API_PUBLIC
Definition: Exports.h:49
NVIDIA DriveWorks GL API: Image Conversion and Streaming Functionality