pfGeoState(3pf) OpenGL Performer 3.2.2 libpr C Reference Pages
NAME
pfNewGState, pfGetGStateClassType, pfApplyGState, pfLoadGState,
pfGStateMode, pfGetGStateMode, pfGetGStateCurMode,
pfGetGStateCombinedMode, pfGStateMultiMode, pfGetGStateMultiMode,
pfGetGStateCurMultiMode, pfGetGStateCombinedMultiMode, pfGStateVal,
pfGetGStateVal, pfGetGStateCurVal, pfGetGStateCombinedVal,
pfGStateInherit, pfGetGStateInherit, pfGStateAttr, pfGetGStateAttr,
pfGetGStateCurAttr, pfGetGStateCombinedAttr, pfGStateMultiAttr,
pfGetGStateMultiAttr, pfGetGStateCurMultiAttr,
pfGetGStateCombinedMultiAttr, pfGStateFuncs, pfGetGStateFuncs,
pfApplyGStateTable, pfMakeBasicGState, pfGetGStateNumTextures,
pfGetCurGState, pfGetCurGStateTable, pfGetCurIndexedGState - Create,
modify and query geometry state objects
FUNCTION SPECIFICATION
#include <Performer/pr.h>
pfGeoState * pfNewGState(void *arena);
pfType * pfGetGStateClassType(void);
void pfApplyGState(pfGeoState *gstate);
void pfLoadGState(pfGeoState *gstate);
void pfGStateMode(pfGeoState *gstate, uint64_t mode, int val);
int pfGetGStateMode(const pfGeoState *gstate, uint64_t mode);
int pfGetGStateCurMode(const pfGeoState *gstate,
uint64_t mode);
int pfGetGStateCombinedMode(const pfGeoState *gstate,
uint64_t mode, const pfGeoState *combGState);
void pfGStateMultiMode(pfGeoState *gstate, uint64_t mode,
int index, int val);
int pfGetGStateMultiMode(const pfGeoState *gstate,
uint64_t mode, int index);
int pfGetGStateCurMultiMode(const pfGeoState *gstate,
uint64_t mode, int index);
int pfGetGStateCombinedMultiMode(const pfGeoState *gstate,
uint64_t mode, int index,
const pfGeoState *combGState);
void pfGStateVal(pfGeoState *gstate, uint64_t gsval,
float val);
Page 1
pfGeoState(3pf) OpenGL Performer 3.2.2 libpr C Reference Pages
float pfGetGStateVal(const pfGeoState *gstate, uint64_t gsval);
float pfGetGStateCurVal(const pfGeoState *gstate,
uint64_t gsval);
float pfGetGStateCombinedVal(const pfGeoState *gstate,
uint64_t gsval, const pfGeoState *combGState);
void pfGStateInherit(pfGeoState *gstate, uint64_t mask);
uint64_t pfGetGStateInherit(const pfGeoState *gstate);
void pfGStateAttr(pfGeoState *gstate, uint64_t attr,
void *data);
void * pfGetGStateAttr(const pfGeoState *gstate, uint64_t attr);
void * pfGetGStateCurAttr(const pfGeoState *gstate,
uint64_t attr);
void * pfGetGStateCombinedAttr(const pfGeoState *gstate,
uint64_t attr, const pfGeoState *combGState);
void pfGStateMultiAttr(pfGeoState *gstate, uint64_t attr,
int index, void *data);
void * pfGetGStateMultiAttr(const pfGeoState *gstate,
uint64_t attr, int index);
void * pfGetGStateCurMultiAttr(const pfGeoState *gstate,
uint64_t attr, int index);
void * pfGetGStateCombinedMultiAttr(const pfGeoState *gstate,
uint64_t attr, int index,
const pfGeoState *combGState);
void pfGStateFuncs(pfGeoState* gstate,
pfGStateFuncType preFunc, pfGStateFuncType postFunc,
void *data);
void pfGetGStateFuncs(const pfGeoState* gstate,
pfGStateFuncType *preFunc, pfGStateFuncType *postFunc,
void **data);
void pfApplyGStateTable(pfList *gstab);
void pfMakeBasicGState(pfGeoState *gstate);
int pfGetGStateNumTextures(pfGeoState *gstate);
Page 2
pfGeoState(3pf) OpenGL Performer 3.2.2 libpr C Reference Pages
pfGeoState * pfGetCurGState(void);
pfList* pfGetCurGStateTable(void);
pfGeoState* pfGetCurIndexedGState(int index);
typedef int (*pfGStateFuncType)(pfGeoState *gstate, void *userData);
PARENT CLASS FUNCTIONS
The OpenGL Performer class pfGeoState is derived from the parent class
pfObject, so each of these member functions of class pfObject are also
directly usable with objects of class pfGeoState. Casting an object of
class pfGeoState to an object of class pfObject is taken care of
automatically. This is also true for casts to objects of ancestor
classes of class pfObject.
void pfUserDataSlot(pfObject *obj, int slot, void *data);
void pfUserData(pfObject *obj, void *data);
void* pfGetUserDataSlot(pfObject *obj, int slot);
void* pfGetUserData(pfObject *obj);
int pfGetNumUserData(pfObject *obj);
int pfGetNamedUserDataSlot(const char *name);
const char* pfGetUserDataSlotName(int slot);
int pfGetNumNamedUserDataSlots(void);
int pfGetGLHandle(pfObject *obj);
int pfDeleteGLHandle(pfObject *obj);
Since the class pfObject is itself derived from the parent class
pfMemory, objects of class pfGeoState can also be used with these
functions designed for objects of class pfMemory.
pfType * pfGetType(const void *ptr);
int pfIsOfType(const void *ptr, pfType *type);
int pfIsExactType(const void *ptr, pfType *type);
const char * pfGetTypeName(const void *ptr);
int pfRef(void *ptr);
int pfUnref(void *ptr);
int pfUnrefDelete(void *ptr);
int pfUnrefGetRef(void *ptr);
int pfGetRef(const void *ptr);
int pfCopy(void *dst, void *src);
int pfDelete(void *ptr);
int pfIsFluxed(void *ptr);
int pfCompare(const void *ptr1, const void *ptr2);
void pfPrint(const void *ptr, uint which, uint verbose,
FILE *file);
Page 3
pfGeoState(3pf) OpenGL Performer 3.2.2 libpr C Reference Pages
void * pfGetArena(void *ptr);
PARAMETERS
gstate identifies a pfGeoState.
DESCRIPTION
A pfGeoState is an encapsulation of libpr graphics modes and attributes
(see pfState). For example, a pfGeoState can describe a glass surface by
referencing a shiny pfMaterial and enabling transparency. When a
pfGeoState is applied by pfApplyGState it sets up the graphics state
through normal libpr routines such as pfApplyMtl and pfTransparency.
Most pieces of state that may be manipulated through libpr immediate mode
routines may be specified on a per-pfGeoState basis. For customized
state management, pfGeoStates provide function callbacks. In addition,
pfGeoStates can be indexed through a global table so a single database
can have multiple appearances while avoiding database duplication.
The primary use of a pfGeoState is to attach it to a pfGeoSet (-
pfGSetGState) in order to define the appearance of the geometry
encapsulated by the pfGeoSet. As discussed below, pfGeoStates have the
useful property of order-independence so that paired pfGeoSets and
pfGeoStates will be rendered consistently regardless of order.
pfGeoState state may either be locally set or globally inherited. By
default, if a state element is not specified on a pfGeoState, then that
pfGeoState will inherit that state element from the global state. Global
state is set through libpr immediate mode functions, e.g., pfApplyMtl,
pfTransparency, pfDecal, pfApplyFog or through pfLoadGState as described
below. Local state is set on a pfGeoState through pfGStateMode,
pfGStateAttr, or pfGStateVal.
If all state elements are locally set, then a pfGeoState becomes a full
graphics context since all state is defined at the pfGeoState level.
While this is useful, it usually makes sense to inherit most state from
global default values and explicitly set only those state elements which
are expected to change often. Examples of useful global defaults are
lighting model (pfLightModel), lights (pfLight), fog (pfFog), and
transparency (pfTransparency, usually OFF). Highly variable state is
likely to be limited to a small set like textures and materials. By
default all pfGeoState state is inherited.
State is pushed before, and popped after pfGeoStates are applied so that
pfGeoStates do not inherit state from each other. As a result
pfGeoStates are order-independent and you need not consider the problem
of one pfGeoState corrupting another by state inheritance through the
underlying graphics library. The actual pfGeoState pop is a lazy one and
does not happen unless a subsequent pfGeoState needs the default state
restored. This means that the actual state between pfGeoStates is not
necessarily the global state. If a return to global state is required,
call pfFlushState which will restore the global state.
Page 4
pfGeoState(3pf) OpenGL Performer 3.2.2 libpr C Reference Pages
It is a performance advantage to locally set as little local pfGeoState
state as possible. This may be accomplished by setting global defaults
which satisfy the majority of pfGeoStates being drawn. For example, if
most of your database is textured, you should enable texturing at
initialization time (pfEnable(PFEN_TEXTURE)) and configure your
pfGeoStates to inherit the texture enable mode.
pfNewGState creates and returns a handle to a pfGeoState. arena
specifies a malloc arena out of which the pfGeoState is allocated or NULL
for allocation off the process heap. pfGeoStates can be deleted with
pfDelete. All modes and attributes are inherited by default.
pfGetGStateClassType returns the pfType* for the class pfGeoState. The
pfType* returned by pfGetGStateClassType is the same as the pfType*
returned by invoking pfGetType on any instance of class pfGeoState.
Because OpenGL Performer allows subclassing of built-in types, when
decisions are made based on the type of an object, it is usually better
to use pfIsOfType to test if an object is of a type derived from a
Performer type rather than to test for strict equality of the pfType*'s.
pfGStateMode sets mode to val. mode is a symbolic constant specifying
the mode to set. Once set, a mode is no longer inherited but is set to
val. mode is a symbolic token and is one of:
PFSTATE_TRANSPARENCY
PFSTATE_ANTIALIAS
PFSTATE_DECAL
PFSTATE_ALPHAFUNC
PFSTATE_SHADEMODEL
PFSTATE_ENLIGHTING
PFSTATE_ENTEXTURE
PFSTATE_ENFOG
PFSTATE_CULLFACE
PFSTATE_ENWIREFRAME
PFSTATE_ENCOLORTABLE
PFSTATE_ENHIGHLIGHTING
PFSTATE_ENLPOINTSTATE
PFSTATE_ENTEXGEN
PFSTATE_ENTEXLOD
PFSTATE_ENTEXMAT
PFSTATE_ENFRAGPROG
PFSTATE_ENVTXPROG
PFSTATE_ENSHADPROG
val specifies the value of mode and is a symbolic token appropriate to
the type of mode. For example when mode = PFSTATE_TRANSPARENCY then val
might be PFTR_ON. Only modes which differ from the global state should
be set. Mode values are not inherited between pfGeoStates. By default
all modes are inherited. See the pfState manual page for information on
global default settings.
pfGStateVal sets the gsval value to val. gsval is a symbolic constant
Page 5
pfGeoState(3pf) OpenGL Performer 3.2.2 libpr C Reference Pages
specifying the state value to set. Once set, a value is no longer
inherited but is set to val. gsval is a symbolic token and can be chosen
from any of the following list (only one choice at present):
PFSTATE_ALPHAREF
pfGStateAttr sets attr state element to a. attr is a symbolic constant
starting with PFSTATE_ specifying an attribute and is combined with data,
a handle to an attribute structure of the appropriate libpr structure
that is returned from a pfNew<*> routine.
PFSTATE_FRONTMTL pfMaterial*
PFSTATE_BACKMTL pfMaterial*
PFSTATE_TEXTURE pfTexture*
PFSTATE_TEXENV pfTexEnv*
PFSTATE_FOG pfFog*
PFSTATE_LIGHTMODEL pfLightModel*
PFSTATE_LIGHTS pfLight**
PFSTATE_COLORTABLE pfColortable*
PFSTATE_HIGHLIGHT pfHighlight*
PFSTATE_LPOINTSTATE pfLPointState*
PFSTATE_TEXGEN pfTexGen*
PFSTATE_TEXLOD pfTexLOD*
PFSTATE_TEXMAT pfMatrix*
PFSTATE_DECALPLANE pfPlane*
PFSTATE_COMBINER pfCombiner*
PFSTATE_FRAGPROG pfFragmentProgram*
PFSTATE_VTXPROG pfVertexProgram*
PFSTATE_GPROGPARMS pfGProgramParms*
PFSTATE_SHADPROG pfShaderProgram*
If attr is PFSTATE_LIGHTS, a should be an array of pfLight* of length
PF_MAX_LIGHTS which specifies which pfLights should be used by gstate.
Empty entries in the light array should be NULL.
Page 6
pfGeoState(3pf) OpenGL Performer 3.2.2 libpr C Reference Pages
A pfGeoState ignores the PFMTL_FRONT and PFMTL_BACK setting of a
pfMaterial (see pfMtlSide). Instead it uses the attribute value,
PFSTATE_FRONTMTL or PFSTATE_BACKMTL to decide how to apply the material.
Consequently, it is legal to use the same material for both front and
back sides. However, pfGeoStates do not modify the pfMaterial's side
value which is normally set through pfMtlSide.
Once set, an attribute is no longer inherited but set to a. Only
attributes which differ from the global state should be set. Attributes
are not inherited between pfGeoStates. By default, all attributes are
inherited from the global state.
pfGStateAttr increments the reference count of the supplied attribute and
decrements the reference count of the replaced attribute, if there is
one. pfGStateAttr will not delete any pfObject whose reference count
reaches 0.
pfGeoState supports a few multi-valued elements. At present, all these
multi-valued elements are related to the multi-texture OpenGL extension.
The multi-texture extension enables the application of multiple texture
maps on a single polygon in a single drawing pass. This extension uses
multiple texture environments to determine the blending among the texture
units. All pfGeoState functions that set/get attributes and modes have
multi-valued versions. The multi-valued versions take one additional
parameter: index. In the case of the multi-texture extension, this
variable picks the hardware texture unit that an attribute or a value
refer to.
pfGStateMultiAttr is a version of pfGStateAttr used for setting multi-
valued attributes. A multi-values attribute collapses a set of attributes
into a single pfGeoState attribute. index picks the texture unit that
attr will be applied to. The following attribute tokens have multiple
values:
PFSTATE_TEXTURE
PFSTATE_TEXENV
PFSTATE_TEXGEN
PFSTATE_TEXLOD
PFSTATE_TEXMAT
PFSTATE_GPPROGPARMS
Similarly, pfGetGStateMultiAttr, pfGetGStateCurMultiAttr and
pfGetGStateCombinedMultiAttr are multi-valued versions of
pfGetGStateAttr, pfGetGStateCurAttr and pfGetGStateCombinedAttr. All
accept the above multi-value attribute tokens.
pfGStateMultiMode is a multi-value version of pfGStateMode. It sets the
index-th element of mode to val. It accepts the following multi-value
mode tokens:
Page 7
pfGeoState(3pf) OpenGL Performer 3.2.2 libpr C Reference Pages
PFSTATE_ENTEXTURE
PFSTATE_ENTEXGEN
PFSTATE_ENTEXLOD
PFSTATE_ENTEXMAT
Similarly, pfGetGStateMultiMode, pfGetGStateCurMultiMode and
pfGetGStateCombinedMultiMode are multi-value versions of pfGetGStateMode,
pfGetGStateCurMode and pfGetGStateCombinedMode. All accept the above
multi-value mode tokens.
When (mode == PFSTATE_ENTEXTURE) pfGeoState expects a contiguous sequence
of enable values. The first disabled index in this mode determines how
many values pfGeoState recognizes. For example, when calling
pfGStateMultiMode(gstate, PFSTATE_ENTEXTURE, index, 1)
for index=[0, 1, 3], pfGeoState will process two texture units and will
ignore the (index == 3) case. In addition, if the current hardware
doesn't support enough multi-texture units, pfGeoState will issue a
warning and ignore settings for unavailable hardware texture units.
pfGetGStateNumTextures returns the number of texture units that
pfGeoState will process.
Calling a multi-value function with (index == 0) is equivalent to calling
the single-value version of the function.
As discussed above, modes, values and attributes may either be locally
set on a pfGeoState or inherited from the global state. To help resolve
the inheritance characteristics of pfGeoStates, 3 different versions of
"get" routines are provided for modes, values and attributes:
1. pfGetGStateMode, pfGetGStateVal, pfGetGStateAttr - The exact
mode, value, or attribute of the pfGeoState is returned.
2. pfGetGStateCurMode, pfGetGStateCurVal, pfGetGStateCurAttr - The
exact mode, value, or attribute of the pfGeoState is returned
if not inherited. Otherwise the mode, value, or attribute of
the currently active global pfGeoState is returned. Note that
this requires that a pfState be current (see pfSelectState).
3. pfGetGStateCombinedMode, pfGetGStateCombinedVal,
pfGetGStateCombinedAttr - The exact mode, value, or attribute
of the pfGeoState is returned if not inherited. Otherwise the
mode, value, or attribute of the combGState is returned.
pfGetGStateMode returns the mode value corresponding to mode.
pfGetGStateVal returns the pfGeoState value corresponding to gsval.
pfGetGStateAttr returns the attribute handle corresponding to attr. If
attr is PFSTATE_LIGHTS, the returned value is the pfLight* array.
pfGStateInherit specifies which state elements should be inherited from
the global state. mask is a bitwise OR of tokens listed for
Page 8
pfGeoState(3pf) OpenGL Performer 3.2.2 libpr C Reference Pages
pfGStateMode, pfGStateAttr, and pfGStateVal. All of the state elements
specified in mask will become inherited. All modes and attributes are
inherited unless explicitly specified by setting a mode or attribute with
pfGStateAttr, pfGStateMode, or pfGStateVal. pfGetGStateInherit returns
the bitwise OR of the tokens for state which is currently inherited from
the global state.
pfApplyGState makes gstate the current graphics state. All modes and
attributes of gstate that are not inherited are applied using libpr
immediate mode commands, for example, the PFSTATE_TEXTURE attribute is
applied with pfApplyTex. Inherited modes and attributes that were
modified by previous pfGeoStates are reset to their global values. State
elements that are overridden (See pfOverride) are not changed by
pfApplyGState.
Another way to apply a pfGeoState is with pfDrawGSet. If a pfGeoSet has
an attached pfGeoState (see pfGSetGState), then pfDrawGSet will call
pfApplyGState with the attached pfGeoState so that graphics state is
properly established before the pfGeoSet geometry is rendered.
The following is an example of pfGeoState behavior.
Example 1:
/* Configure global default that pfGeoStates can inherit */
pfEnable(PFEN_LIGHTING);
pfApplyLModel(pfNewLModel(NULL));
pfLightOn(pfNewLight(NULL));
pfTransparency(PFTR_OFF);
/* New pfGeoState inherits everything */
gstate = pfNewGState(NULL);
/* Attach 'gstate' to 'gset' */
pfGSetGState(gset, gstate);
/* Configure 'gstate' with a transparent material */
pfGStateAttr(gstate, PFSTATE_FRONTMTL, mtl);
pfGStateMode(gstate, PFSTATE_TRANSPARENCY, PFTR_ON);
Method A:
/* Draw transparent 'gset' */
pfDrawGSet(gset);
Method B:
Page 9
pfGeoState(3pf) OpenGL Performer 3.2.2 libpr C Reference Pages
/* Remove 'gstate' from 'gset' */
pfGSetGState(gset, NULL);
/* Apply 'gstate' */
pfApplyGState(gstate);
/* Draw transparent 'gset' */
pfDrawGSet(gset);
Method C:
/* Remove 'gstate' from 'gset' */
pfGSetGState(gset, NULL);
pfApplyMtl(mtl);
pfTransparency(PFTR_ON);
/* Draw transparent 'gset' */
pfDrawGSet(gset);
In the above example, methods A, B, and C are all produce the same visual
result. Method A is recommended, however, since the pfGeoState and
pfGeoSet pair may be configured at database initialization time and the
use of a pfGeoState provides order-independence when rendering.
The following is an example of pfGeoState inheritance:
/* Configure global default that pfGeoStates can inherit */
pfEnable(PFEN_LIGHTING);
pfApplyLModel(pfNewLModel(NULL));
pfLightOn(pfNewLight(NULL));
/* Assume 'redMtl' is PFMTL_FRONT */
pfApplyMtl(redMtl);
/* New pfGeoStates inherit everything */
gstateA = pfNewGState(NULL);
gstateB = pfNewGState(NULL);
/* Attach pfGeoStates to pfGeoSets */
pfGSetGState(gsetA, gstateA);
pfGSetGState(gsetB, gstateB);
/* Configure 'gstateA' with a green material */
pfGStateAttr(gstateA, PFSTATE_FRONTMTL, greenMtl);
/* Draw green 'gset' */
pfDrawGSet(gsetA);
Page 10
pfGeoState(3pf) OpenGL Performer 3.2.2 libpr C Reference Pages
/*
* The FRONTMTL property of gstateB is not set so it inherits
* the global default of 'redMtl' which will be restored
* as the current pfMaterial when gstateB is applied.
*/
/* Draw red 'gset' */
pfDrawGSet(gsetB);
/*
* Note that gsetA and gsetB could be drawn in the opposite
* order with the same results. This is a very important
* pfGeoState property.
*/
pfGetCurGState returns the current pfGeoState that was previously applied
directly by pfApplyGState or indirectly by pfDrawGSet.
pfGStateFuncs sets the callbacks and callback data pointer of gstate. The
reference count of data is incremented and the reference count of the
previous data is decremented but no deletion takes place if the reference
count reaches 0. Callbacks are invoked by pfApplyGState (or indirectly by
pfDrawGSet as described above) in the following order:
postFunc() of previously-applied pfGeoState
setup state according to current pfGeoState
preFunc() of current pfGeoState
Notice that the post-callback invocation is delayed until a subsequent
pfGeoState is applied. However, pfPushState, pfPopState, and pfFlushState
will invoke any "leftover" post-callback. It is legal to call
pfPushState and pfPopState in the pre and post callbacks respectively but
is not usually necessary because any libpr state set inside pfGeoState
callbacks is considered to have been set by the pfGeoState. Consequently,
the global state is not modified and the normal pfGeoState inheritance
rules apply to state set inside the callbacks.
Callbacks are passed a pointer to the parent pfGeoState and the data
pointer that was previously supplied by pfGStateFuncs. The return value
from pfGeoState callbacks is currently ignored. pfGetGStateFuncs gets
back the pre and post pfGeoState callbacks and callback data for gstate
in preFunc, postFunc, and data, respectively.
A pfGeoSet may either directly reference or indirectly index a pfGeoState
with pfGSetGState and pfGSetGStateIndex respectively. Indexed
pfGeoStates use a global table of pfGeoState pointers that is set by
pfApplyGStateTable. If the global table is NULL or the pfGeoState index
Page 11
pfGeoState(3pf) OpenGL Performer 3.2.2 libpr C Reference Pages
is out of the range of the global table, no pfGeoState is applied,
otherwise the indexed pfGeoState is applied when pfDrawGSet is called.
Non-indexed pfGeoState references ignore the current pfGeoState table.
pfGetCurGStateTable returns the current pfGeoState table and
pfGetCurIndexedGState returns the indexth pfGeoState* in the current
pfGeoState table or NULL if the index cannot be properly resolved.
pfLoadGState is similar to pfApplyGState except the modes and attributes
of gstate can be inherited by subsequent pfGeoStates. In other words,
gstate loads the global state. Overridden state elements are not
modified by pfLoadGState. If set, the pre-callback of gstate is invoked
after the graphics state is loaded. As described above, the post-callback
is not invoked until a subsequent pfGeoState is applied or pfPushState,
pfPopState, or pfFlushState is called.
pfApplyGState, pfApplyGStateTable, and pfLoadGState are display-listable
commands. If a pfDispList has been opened by pfOpenDList, these commands
will not have immediate effect but will be captured by the pfDispList and
will only have effect when that pfDispList is later executed with
pfDrawDList. Indexed pfGeoStates are resolved at display list creation
time, not at display list execution time. In addition, pfGeoStates are
"unwound" into their constituent parts at display list creation time,
e.g., a pfGeoState may decompose into pfApplyMtl and pfTransparency
calls. As a result, changes to a pfGeoState which have been captured by a
pfDispList will *not* be evident when that pfDispList is executed (-
pfDrawDList). pfGeoState indexing and unwinding at display list creation
time is done strictly to improve pfDispList rendering performance.
pfMakeBasicGState configures every state element (value, mode, and
attribute) of gstate to be identical to the state set with pfBasicState.
The "basic" state is the initial state of a graphics library window -
everything is "off". For example, the PFSTATE_ENLIGHTING mode will be set
to PF_OFF, and the PFSTATE_CULLFACE mode will be set to PFCF_OFF. The
following code fragment is equivalent to pfBasicState:
pfGeoState *gstate = pfNewGState(NULL);
pfMakeBasicGState(gstate);
pfLoadGState(gstate);
NOTES
In some situations it may appear that pfGeoStates do inherit from each
other. This is because OpenGL Performer currently does not provide any
defaults for the state attributes listed above such as PFSTATE_TEXTURE
and PFSTATE_FRONTMTL. Consequently, if the application does not
explicitly set these attributes, it is possible for pfGeoStates which
inherit these attributes to inherit them from previous pfGeoStates.
Page 12
pfGeoState(3pf) OpenGL Performer 3.2.2 libpr C Reference Pages
SEE ALSO
pfAlphaFunc, pfAntialias, pfBasicState, pfCullFace, pfDecal, pfDelete,
pfDispList, pfDrawGSet, pfEnable, pfFog, pfGeoSet, pfLight, pfList,
pfLPointState, pfOverride, pfShadeModel, pfState, pfTexture, pfTexGen,
pfTransparency
Page 13