DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

Renderer.h File Reference

Detailed Description

NVIDIA DriveWorks API: Renderer

Description: This file defines the C-style interface for Renderer.

Definition in file Renderer.h.

Go to the source code of this file.

Data Structures

struct  dwRenderBufferVertexLayout
 Vertex layout describing format and semantics for position, color, and texture. More...
 

Typedefs

typedef const struct dwRenderBufferObject * dwConstRenderBufferHandle_t
 Const handle representing vertex data for rendering. More...
 
typedef const struct dwRendererObject * dwConstRendererHandle_t
 Const handle for the renderer. More...
 
typedef struct dwRenderBufferObject * dwRenderBufferHandle_t
 Handle representing vertex data for rendering. More...
 
typedef struct dwRendererObject * dwRendererHandle_t
 Handle for the renderer. More...
 

Enumerations

enum  dwRenderBufferColorSemantic {
  DW_RENDER_SEMANTIC_COL_NULL = 0,
  DW_RENDER_SEMANTIC_COL_R = 1,
  DW_RENDER_SEMANTIC_COL_A = 2,
  DW_RENDER_SEMANTIC_COL_RGB = 3,
  DW_RENDER_SEMANTIC_COL_RGBA = 4,
  DW_RENDER_SEMANTIC_COL_LUT = 5,
  DW_RENDER_SEMANTIC_COL_HUE = 6
}
 Vertex component semantics. More...
 
enum  dwRenderBufferFormat {
  DW_RENDER_FORMAT_NULL = 0,
  DW_RENDER_FORMAT_R32G32B32A32_FLOAT = 1,
  DW_RENDER_FORMAT_R32G32B32_FLOAT = 2,
  DW_RENDER_FORMAT_R32G32_FLOAT = 3,
  DW_RENDER_FORMAT_R32_FLOAT = 4
}
 Vertex component channel count and format. More...
 
enum  dwRenderBufferPositionSemantic {
  DW_RENDER_SEMANTIC_POS_NULL = 0,
  DW_RENDER_SEMANTIC_POS_XY = 1,
  DW_RENDER_SEMANTIC_POS_XYZ = 2
}
 Vertex component semantics. More...
 
enum  dwRenderBufferPrimitiveType {
  DW_RENDER_PRIM_POINTLIST = 0,
  DW_RENDER_PRIM_LINELIST = 1,
  DW_RENDER_PRIM_TRIANGLELIST = 2,
  DW_RENDER_PRIM_LINESTRIP = 3,
  DW_RENDER_PRIM_LINELOOP = 4,
  DW_RENDER_PRIM_COUNT = 5
}
 Render primitives supported by the renderer. More...
 
enum  dwRenderBufferTexSemantic {
  DW_RENDER_SEMANTIC_TEX_NULL = 0,
  DW_RENDER_SEMANTIC_TEX_S = 1,
  DW_RENDER_SEMANTIC_TEX_ST = 2
}
 Vertex component semantics. More...
 
enum  dwRendererFonts {
  DW_RENDER_FONT_VERDANA_8 = 0,
  DW_RENDER_FONT_VERDANA_12 = 1,
  DW_RENDER_FONT_VERDANA_16 = 2,
  DW_RENDER_FONT_VERDANA_20 = 3,
  DW_RENDER_FONT_VERDANA_24 = 4,
  DW_RENDER_FONT_VERDANA_32 = 5,
  DW_RENDER_FONT_VERDANA_48 = 6,
  DW_RENDER_FONT_VERDANA_64 = 7,
  DW_RENDER_FONT_COUNT
}
 Font types and sizes supported by the renderer. More...
 

Functions

DW_VIZ_API_PUBLIC dwStatus dwRenderBuffer_createView (uint32_t *slot, dwRenderBufferHandle_t renderbuffer, const dwRenderBufferVertexLayout newLayout, const dwRenderBufferPrimitiveType newPrimType, dwVisualizationContextHandle_t context)
 Creates an additional view for a render buffer, allowing you to change layout and primitive type, but not vertex stride. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderBuffer_initialize (dwRenderBufferHandle_t *renderbuffer, const dwRenderBufferVertexLayout layout, const dwRenderBufferPrimitiveType primType, const uint32_t primCount, dwVisualizationContextHandle_t context)
 Initializes a RenderBuffer structure for rendering. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderBuffer_map (float32_t **map, uint32_t *maxVertices, uint32_t *vertexStride, dwRenderBufferHandle_t renderbuffer)
 Maps the CPU copy of a RenderBuffer to the application for updating. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderBuffer_mapRange (float32_t **map, uint32_t *maxVertices, uint32_t *vertexStride, const uint32_t startVertex, dwRenderBufferHandle_t renderbuffer)
 Maps a contiguous range of the CPU copy of a RenderBuffer to the application for updating. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderBuffer_release (dwRenderBufferHandle_t renderbuffer)
 Releases the RenderBuffer data structure. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderBuffer_set2DCoordNormalizationFactors (const float32_t width, const float32_t height, dwRenderBufferHandle_t renderbuffer)
 Sets 2D normalization values when 2D coordinates are specified in pixel values and not in 0..1 range. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderBuffer_unmap (uint32_t nVerts, dwRenderBufferHandle_t renderbuffer)
 After a map/mapRange, returns the updated buffer to the RenderBuffer structure and updates the GPU portion. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_get2DTransform (dwMatrix3f *matrix, dwConstRendererHandle_t obj)
 Gets current 2D transformation applied when rendering to the screen. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_getColor (dwVector4f *color, dwConstRendererHandle_t obj)
 Gets current rendering color. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_getColorMapScale (dwVector3f *colorMapScale, dwConstRendererHandle_t obj)
 Gets current rendering color map scale. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_getFont (dwRendererFonts *value, dwConstRendererHandle_t obj)
 Gets current font. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_getLineWidth (float32_t *value, dwConstRendererHandle_t obj)
 Gets current line width, in pixels. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_getModelView (dwMatrix4f *matrix, dwConstRendererHandle_t obj)
 Gets current ModelView matrix. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_getPointSize (float32_t *value, dwConstRendererHandle_t obj)
 Gets current point size. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_getProjection (dwMatrix4f *matrix, dwConstRendererHandle_t obj)
 Gets current projection matrix. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_getRect (dwRect *rect, dwConstRendererHandle_t obj)
 Gets current rendering screen area expressed in pixel values. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_initialize (dwRendererHandle_t *renderer, dwVisualizationContextHandle_t context)
 Initializes a Renderer. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_release (dwRendererHandle_t renderer)
 Released the renderer. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_renderBuffer (dwConstRenderBufferHandle_t buffer, dwRendererHandle_t obj)
 Renders a RenderBuffer. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_renderCircle (dwVector2f center, float32_t radius, dwRendererHandle_t obj)
 Renders a 2D circle. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_renderData2D (const dwVector2f *buffer, size_t count, dwRenderBufferPrimitiveType primitiveType, dwRendererHandle_t obj)
 Renders a set of 2D vertices. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_renderData3D (const dwVector3f *buffer, size_t count, dwRenderBufferPrimitiveType primitiveType, dwRendererHandle_t obj)
 Renders a set of 3D vertices. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_renderSubTexture (const GLuint inputTexture, const GLenum textureTarget, const float32_t minx, const float32_t miny, const float32_t maxx, const float32_t maxy, dwRendererHandle_t obj)
 Renders a subrect of a textured quad on the screen. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_renderText (const int32_t x, const int32_t y, const char *text, dwRendererHandle_t obj)
 Renders a text line on the screen. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_renderTextNorm (const float32_t normX, const float32_t normY, const char *text, dwRendererHandle_t obj)
 Renders a text line on the screen. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_renderTexture (const GLuint inputTexture, const GLenum textureTarget, dwRendererHandle_t obj)
 Renders a textured quad on the screen. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_reset (dwRendererHandle_t renderer)
 Resets renderer state. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_set2DTransform (const dwMatrix3f *matrix, dwRendererHandle_t obj)
 Sets current 2D transformation applied when rendering to the screen. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_setColor (const dwVector4f color, dwRendererHandle_t obj)
 Sets current rendering color. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_setColorMapScale (const dwVector3f colorMapScale, dwRendererHandle_t obj)
 Sets current rendering color mapping scale. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_setFont (const dwRendererFonts value, dwRendererHandle_t obj)
 Sets current font. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_setLineWidth (const float32_t value, dwRendererHandle_t obj)
 Sets current line width, in pixels. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_setModelView (const dwMatrix4f *matrix, dwRendererHandle_t obj)
 Sets current ModelView matrix. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_setPointSize (const float32_t value, dwRendererHandle_t obj)
 Sets current point size. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_setProjection (const dwMatrix4f *matrix, dwRendererHandle_t obj)
 Sets current projection matrix. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_setRect (const dwRect rect, dwRendererHandle_t obj)
 Sets current rendering screen area expressed in pixel values. More...
 
DW_VIZ_API_PUBLIC dwStatus dwRenderer_setViewportAndScissorRects (const dwRect viewport, const dwRect scissor, dwRendererHandle_t obj)
 Sets viewport and scissor rectangles in pixel values. More...
 

Variables

const dwVector3f DW_RENDER_COLORMAPSCALE_100M = {100.0f, 100.0f, 100.0f}
 
const dwVector3f DW_RENDER_COLORMAPSCALE_130M = {130.0f, 130.0f, 130.0f}
 
const dwVector3f DW_RENDER_COLORMAPSCALE_150M = {150.0f, 150.0f, 150.0f}
 
const dwVector3f DW_RENDER_COLORMAPSCALE_75M = {75.0f, 75.0f, 75.0f}
 Color map scales - determine the bandwidth of the color spectrum. More...
 
static const uint32_t DW_RENDERBUFFER_MAX_VIEWS = 10
 The maximal number of views that can be created in with. More...
 
const dwVector4f DW_RENDERER_COLOR_BLACK = {0.0f / 255.0f, 0.0f / 255.0f, 0.0f / 255.0f, 1.0f}
 
const dwVector4f DW_RENDERER_COLOR_BLUE = {32.0f / 255.0f, 72.0f / 255.0f, 230.0f / 255.0f, 1.0f}
 
const dwVector4f DW_RENDERER_COLOR_DARKBLUE = {45.0f / 255.0f, 44.0f / 255.0f, 100.0f / 255.0f, 0.6f}
 
const dwVector4f DW_RENDERER_COLOR_DARKGREEN = {45.0f / 255.0f, 100.0f / 255.0f, 44.0f / 255.0f, 1.0f}
 
const dwVector4f DW_RENDERER_COLOR_DARKGREY = {72.0f / 255.0f, 72.0f / 255.0f, 72.0f / 255.0f, 1.0f}
 
const dwVector4f DW_RENDERER_COLOR_DARKRED = {180.0f / 255.0f, 5.0f / 255.0f, 0.0f / 255.0f, 1.0f}
 
const dwVector4f DW_RENDERER_COLOR_GREEN = {32.0f / 255.0f, 230.0f / 255.0f, 32.0f / 255.0f, 1.0f}
 
const dwVector4f DW_RENDERER_COLOR_LIGHTBLUE = {51.0f / 255.0f, 153.0f / 255.0f, 255.0f / 255.0f, 0.6f}
 
const dwVector4f DW_RENDERER_COLOR_LIGHTGREEN = {118.0f / 255.0f, 185.0f / 255.0f, 0.0f / 255.0f, 1.0f}
 
const dwVector4f DW_RENDERER_COLOR_LIGHTGREY = {185.0f / 255.0f, 185.0f / 255.0f, 185.0f / 255.0f, 1.0f}
 
const dwVector4f DW_RENDERER_COLOR_LIGHTPURPLE = {181.0f / 255.0f, 138.0f / 255.0f, 242.0f / 255.0f, 1.0f}
 
const dwVector4f DW_RENDERER_COLOR_MAGENTA = {230.f / 255.f, 25.f / 255.f, 230.f / 255.f, 1.f}
 
const dwVector4f DW_RENDERER_COLOR_NVIDIA_GREEN = {0.4609375f, 0.72265625f, 0.0f, 1.0f}
 
const dwVector4f DW_RENDERER_COLOR_ORANGE = {230.0f / 255.0f, 100.0f / 255.0f, 10.0f / 255.0f, 1.0f}
 
const dwVector4f DW_RENDERER_COLOR_PURPLE = {255.0f / 255.0f, 0.0f / 255.0f, 240.0f / 255.0f, 1.0f}
 
const dwVector4f DW_RENDERER_COLOR_RED = {230.0f / 255.0f, 72.0f / 255.0f, 32.0f / 255.0f, 1.0f}
 
const dwVector4f DW_RENDERER_COLOR_WHITE = {255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 1.0f}
 
const dwVector4f DW_RENDERER_COLOR_YELLOW = {230.0f / 255.0f, 230.0f / 255.0f, 10.0f / 255.0f, 1.0f}
 
static const uint32_t DW_RENDERER_DEFAULT_BUFFER_SIZE = 10000
 The maximum number of vertices that can be passed to a call dwRenderer_renderData3D() or dwRenderer_renderData2D() More...
 
const dwVector3f DW_RENDERER_HSV_BLUE = {240.0f, 1.0f, 0.75f}
 
const dwVector3f DW_RENDERER_HSV_PURPLE = {270.0f, 1.0f, 0.75f}
 
const dwVector3f DW_RENDERER_HSV_RED = {0.0f, 1.0f, 0.75f}