Panda3D
Functions
geomMunger.I File Reference

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University. More...

Go to the source code of this file.

Functions

 CPT (GeomVertexFormat) GeomMunger
 Given a source GeomVertexFormat, converts it if necessary to the appropriate format for rendering. More...
 
 PT (GeomMunger) GeomMunger
 Adds the indicated munger to the registry, if there is not an equivalent munger already there; in either case, returns the pointer to the equivalent munger now in the registry. More...
 

Detailed Description

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.

All rights reserved.

All use of this software is subject to the terms of the revised BSD license. You should have received a copy of this license along with this source code in a file named "LICENSE."

Author
drose
Date
2005-03-10

Definition in file geomMunger.I.

Function Documentation

◆ CPT()

CPT ( GeomVertexFormat  )
inline

Given a source GeomVertexFormat, converts it if necessary to the appropriate format for rendering.

If the GeomVertexAnimationSpec so indicates, then the format will be chosen to convert CPU-based animation tables to HW-based animation tables, reserving space for the specified number of transforms per vertex. Given a source GeomVertexData, converts it if necessary to the appropriate data for rendering. This is similar to munge_format(), but it is done at load time, to optimize a model for eventual rendering on a particular GSG. At this point, we do not necessarily know the final render state that will be applied, so we cannot make any destructive changes to the geom, its data, or its format. This is similar to munge_data(), but it is done at load time, to optimize a model for eventual rendering on a particular GSG. At this point, we do not necessarily know the final render state that will be applied, so we cannot make any destructive changes to the geom, its data, or its format. This is similar to munge_geom(), but it is done at load time, to optimize a model for eventual rendering on a particular GSG. At this point, we do not necessarily know the final render state that will be applied, so we cannot make any destructive changes to the geom, its data, or its format.

Unlike munge_geom(), this result is not cached, since the assumption is that this operation is performed at load time once for each model. Provides an arbitrary ordering among all unique GeomMungers, so we can store the essentially different ones in a big set and throw away the rest. Compares two GeomMungers, considering only whether they would produce a different answer to munge_format(), munge_data(), or munge_geom(). (They still might be different in other ways, but if they would produce the same answer, this function consider them to be the same.) Unregisters the GeomMunger, for instance when it is being destructed, or whenever it has become invalid for some reason. This removes it from the registry so that it will no longer be available to be returned by register_munger().

It is not an error to call this if the munger has already been unregistered.

Definition at line 64 of file geomMunger.I.

◆ PT()

PT ( GeomMunger  )
inline

Adds the indicated munger to the registry, if there is not an equivalent munger already there; in either case, returns the pointer to the equivalent munger now in the registry.

This must be called before a munger may be used in a Geom. After this call, you should discard the original pointer you passed in (which may or may not now be invalid) and let its reference count decrement normally; you should use only the returned value from this point on.

Definition at line 42 of file geomMunger.I.