Skip to content

Instantly share code, notes, and snippets.

@sabotage3d
sabotage3d / Geometry.cpp
Created November 28, 2015 00:36
CPP code for StaticModelGroup to include static batching, methods for Geometry to create concatenated lists
Geometry* Geometry::CreatePretransformedList(PODVector<Matrix3x4> transforms, bool applyTransforms) const
{
// Perform easy early-out tests
if (transforms.Size() == 0)
return 0;
if (vertexBuffers_.Size() == 0)
{
URHO3D_LOGERROR("Unable to create pretransformed geometry for empty geometry");
return 0;
}
@sabotage3d
sabotage3d / Description
Created October 31, 2015 15:43 — forked from CarloMaker/Description
Managing game states in Urho3d
/*
This is a simple game state inspired from a good article about managing game states
at http://gamedevgeek.com/tutorials/managing-game-states-in-c/ , i tried to adapt it in Urho3d
using events rather than loops update on virtual methods that kill performance.
*/
gamestateshandler expect a scene already create , you can simply modified as you like,
main.cpp{