MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / allocVertexDecl

Method allocVertexDecl

Engine/source/gfx/gl/gfxGLDevice.cpp:624–636  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

622}
623
624GFXVertexDecl* GFXGLDevice::allocVertexDecl( const GFXVertexFormat *vertexFormat )
625{
626 PROFILE_SCOPE(GFXGLDevice_allocVertexDecl);
627 typedef Map<void*, GFXGLVertexDecl> GFXGLVertexDeclMap;
628 static GFXGLVertexDeclMap declMap;
629 GFXGLVertexDeclMap::Iterator itr = declMap.find( (void*)vertexFormat->getDescription().c_str() ); // description string are interned, safe to use c_str()
630 if(itr != declMap.end())
631 return &itr->value;
632
633 GFXGLVertexDecl &decl = declMap[(void*)vertexFormat->getDescription().c_str()];
634 decl.init(vertexFormat);
635 return &decl;
636}
637
638void GFXGLDevice::setVertexDecl( const GFXVertexDecl *decl )
639{

Callers 1

_updateDeclMethod · 0.45

Calls 5

findMethod · 0.45
c_strMethod · 0.45
getDescriptionMethod · 0.45
endMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected