A GPU mesh utility class that works with G3D::UniversalSurface.
More...
Inherits G3D::ReferenceCountedObject.
|
template<class T , class ... ArgTypes> |
static shared_ptr< T > | createShared (ArgTypes &&... args) |
| Like std::make_shared, but works for protected constructors. More...
|
|
A GPU mesh utility class that works with G3D::UniversalSurface.
A set of lines, points, quads, or triangles that have a single UniversalMaterial and can be rendered as a single OpenGL primitive using RenderDevice::sendIndices inside a RenderDevice::beginIndexedPrimitives() block.
- See also
- G3D::MeshAlg, G3D::ArticulatedModel, G3D::Surface, G3D::CPUVertexArray
◆ GPUGeom() [1/2]
G3D::UniversalSurface::GPUGeom::GPUGeom |
( |
const shared_ptr< GPUGeom > & |
other | ) |
|
|
protected |
◆ GPUGeom() [2/2]
G3D::UniversalSurface::GPUGeom::GPUGeom |
( |
PrimitiveType |
p, |
|
|
bool |
t |
|
) |
| |
|
inlineprotected |
◆ ~GPUGeom()
G3D::UniversalSurface::GPUGeom::~GPUGeom |
( |
| ) |
|
◆ allocateBoneTexture()
static shared_ptr<Texture> G3D::UniversalSurface::GPUGeom::allocateBoneTexture |
( |
int |
width, |
|
|
int |
height |
|
) |
| |
|
static |
Bone textures are reused between frames to minimize allocation costs.
◆ create() [1/2]
static shared_ptr<GPUGeom> G3D::UniversalSurface::GPUGeom::create |
( |
const shared_ptr< GPUGeom > & |
other | ) |
|
|
inlinestatic |
◆ create() [2/2]
◆ createShared()
template<class T , class ... ArgTypes>
static shared_ptr<T> G3D::ReferenceCountedObject::createShared |
( |
ArgTypes &&... |
args | ) |
|
|
inlinestaticprotectedinherited |
Like std::make_shared, but works for protected constructors.
Call as createShared<myclass>.
◆ hasBones()
bool G3D::UniversalSurface::GPUGeom::hasBones |
( |
| ) |
const |
|
inline |
◆ hasGeometry()
bool G3D::UniversalSurface::GPUGeom::hasGeometry |
( |
| ) |
const |
|
inline |
True if this part has some geometry.
◆ operator delete()
static void G3D::UniversalSurface::GPUGeom::operator delete |
( |
void * |
p | ) |
|
|
inlinestatic |
◆ operator new()
static void* G3D::UniversalSurface::GPUGeom::operator new |
( |
size_t |
size | ) |
|
|
inlinestatic |
◆ setShaderArgs()
void G3D::UniversalSurface::GPUGeom::setShaderArgs |
( |
Args & |
args | ) |
const |
Sets.
- Parameters
-
args | index array, and the following vertex attributes: vec4 g3d_Vertex; vec3 g3d_Normal; [vec2 g3d_TexCoord0;] [vec2 g3d_TexCoord1;] [vec4 g3d_PackedTangent;] [vec4 g3d_VertexColor;] [ivec4 g3d_BoneIndices;] [vec4 g3d_BoneWeights;] |
and uniform: [sampler2D boneMatrixTexture]
and macros: [HAS_BONES]
where square brackets denotes optional attributes, dependent on whether the geom contains valid values for them.
This binds attribute arrays, so it cannot accept a UniformTable argument.
◆ boneIndices
◆ boneTexture
shared_ptr<Texture> G3D::UniversalSurface::GPUGeom::boneTexture |
◆ boneWeights
◆ boxBounds
AABox G3D::UniversalSurface::GPUGeom::boxBounds |
◆ index
◆ normal
◆ packedTangent
◆ prevBoneTexture
shared_ptr<Texture> G3D::UniversalSurface::GPUGeom::prevBoneTexture |
◆ primitive
◆ s_boneTextureBufferPool
Array<shared_ptr<Texture> > G3D::UniversalSurface::GPUGeom::s_boneTextureBufferPool |
|
staticprotected |
◆ sphereBounds
Sphere G3D::UniversalSurface::GPUGeom::sphereBounds |
◆ texCoord0
◆ texCoord1
◆ twoSided
bool G3D::UniversalSurface::GPUGeom::twoSided |
When true, this primitive should be rendered with two-sided lighting and texturing and not cull back faces.
◆ vertex
◆ vertexColor