Unravel Engine C++ Reference
Loading...
Searching...
No Matches
debugdraw.cpp File Reference
#include "debugdraw.h"
#include "../bgfx_utils.h"
#include "../packrect.h"
#include <bgfx/bgfx.h>
#include <bgfx/embedded_shader.h>
#include <bx/debug.h>
#include <bx/handlealloc.h>
#include <bx/math.h>
#include <bx/mutex.h>
#include <bx/sort.h>
#include <bx/uint32_t.h>
#include "fs_debugdraw_fill.bin.h"
#include "fs_debugdraw_fill_lit.bin.h"
#include "fs_debugdraw_fill_texture.bin.h"
#include "fs_debugdraw_lines.bin.h"
#include "fs_debugdraw_lines_stipple.bin.h"
#include "vs_debugdraw_fill.bin.h"
#include "vs_debugdraw_fill_lit.bin.h"
#include "vs_debugdraw_fill_lit_mesh.bin.h"
#include "vs_debugdraw_fill_mesh.bin.h"
#include "vs_debugdraw_fill_texture.bin.h"
#include "vs_debugdraw_lines.bin.h"
#include "vs_debugdraw_lines_stipple.bin.h"

Go to the source code of this file.

Classes

struct  DebugVertex
 
struct  DebugUvVertex
 
struct  DebugShapeVertex
 
struct  DebugMeshVertex
 
struct  SpriteT< MaxHandlesT, TextureSizeT >
 
struct  GeometryT< MaxHandlesT >
 
struct  GeometryT< MaxHandlesT >::Geometry
 
struct  Attrib
 
struct  Program
 
struct  DebugMesh
 
struct  DebugDrawShared
 
struct  DebugDrawEncoderImpl
 
struct  DebugDrawEncoderImpl::State
 
struct  DebugDrawEncoderImpl::MatrixStack
 

Macros

#define DEBUG_DRAW_CONFIG_MAX_GEOMETRY   256
 
#define SPRITE_TEXTURE_SIZE   1024
 
#define DEBUG_DRAW_ENCODER(_func)
 

Typedefs

typedef SpriteT< 256, SPRITE_TEXTURE_SIZESprite
 
typedef GeometryT< DEBUG_DRAW_CONFIG_MAX_GEOMETRYGeometry
 

Functions

uint32_t genSphere (uint8_t _subdiv0, void *_pos0=NULL, uint16_t _posStride0=0, void *_normals0=NULL, uint16_t _normalStride0=0)
 
bx::Vec3 getPoint (Axis::Enum _axis, float _x, float _y)
 
void ddInit (bx::AllocatorI *_allocator)
 
void ddShutdown ()
 
SpriteHandle ddCreateSprite (uint16_t _width, uint16_t _height, const void *_data)
 
void ddDestroy (SpriteHandle _handle)
 
GeometryHandle ddCreateGeometry (uint32_t _numVertices, const DdVertex *_vertices, uint32_t _numIndices, const void *_indices, bool _index32)
 
void ddDestroy (GeometryHandle _handle)
 

Macro Definition Documentation

◆ DEBUG_DRAW_CONFIG_MAX_GEOMETRY

#define DEBUG_DRAW_CONFIG_MAX_GEOMETRY   256

Definition at line 20 of file debugdraw.cpp.

◆ DEBUG_DRAW_ENCODER

#define DEBUG_DRAW_ENCODER ( _func)
Value:
reinterpret_cast<DebugDrawEncoderImpl*>(this)->_func

Definition at line 2322 of file debugdraw.cpp.

◆ SPRITE_TEXTURE_SIZE

#define SPRITE_TEXTURE_SIZE   1024

Definition at line 331 of file debugdraw.cpp.

Typedef Documentation

◆ Geometry

Definition at line 542 of file debugdraw.cpp.

◆ Sprite

Definition at line 541 of file debugdraw.cpp.

Function Documentation

◆ ddCreateGeometry()

GeometryHandle ddCreateGeometry ( uint32_t _numVertices,
const DdVertex * _vertices,
uint32_t _numIndices,
const void * _indices,
bool _index32 )

Definition at line 2308 of file debugdraw.cpp.

◆ ddCreateSprite()

SpriteHandle ddCreateSprite ( uint16_t _width,
uint16_t _height,
const void * _data )

Definition at line 2298 of file debugdraw.cpp.

◆ ddDestroy() [1/2]

void ddDestroy ( GeometryHandle _handle)

Definition at line 2317 of file debugdraw.cpp.

◆ ddDestroy() [2/2]

void ddDestroy ( SpriteHandle _handle)

Definition at line 2303 of file debugdraw.cpp.

◆ ddInit()

void ddInit ( bx::AllocatorI * _allocator)

Definition at line 2282 of file debugdraw.cpp.

◆ ddShutdown()

void ddShutdown ( )

Definition at line 2289 of file debugdraw.cpp.

◆ genSphere()

uint32_t genSphere ( uint8_t _subdiv0,
void * _pos0 = NULL,
uint16_t _posStride0 = 0,
void * _normals0 = NULL,
uint16_t _normalStride0 = 0 )

Definition at line 172 of file debugdraw.cpp.

◆ getPoint()

bx::Vec3 getPoint ( Axis::Enum _axis,
float _x,
float _y )

Definition at line 288 of file debugdraw.cpp.