Models (C++): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(hopefully we'll make sense of this one day)
 
m (→‎top: clean up, added orphan tag)
 
Line 1: Line 1:
{{Orphan|date=January 2024}}
{{confirm-box}}
{{confirm-box}}



Latest revision as of 22:48, 21 January 2024

Help.png
This article contains speculation that needs to be confirmed.

There are several representations of a model in Source:

Model index
An integer unique to each model. Same on all clients as the server. Acquired from the return value of PrecacheModel() on the server and after that CBaseEntity::GetModelIndex() on both client and server.
model_t
A handle to an internal engine representation of a model. Can be passed to engine functions, but does nothing on its own. Shared between all instances of a model.
CStudioHdr
A MDL file mapped to memory...but each entity has a different one? Can be queried for all sorts of data, but not modified. Despite being an engine class all source code is in the mod SDK.
ModelInstanceHandle_t
Client-side handle to a model instance. Used by the model rendering system.