[ Previous | Next | Contents | Glossary | Home | Search ]
The graPHIGS Programming Interface : Subroutine Reference

GPRMO - Set Reflectance Model

GPRMO (model)

Purpose

Use GPRMO to insert a Set Reflectance Model structure element into the open structure following the element pointer, or to replace the element pointed at by the element pointer with a Set Reflectance Model structure element, depending on the current edit mode.

This element specifies the lighting reflectance model that the graPHIGS API uses when performing lighting calculations on subsequent area primitives. If the face distinguish mode (GPFDMO) is 1=NONE , then the graPHIGS API uses the specified model to calculate the lighting effects on both front and back facing portions of area primitives. If the face distinguish mode is 2=COLOR_SURFACE_PROPERTIES , then the graPHIGS API uses the specified model to calculate the lighting effects on only front facing portions of area primitives.

The defined reflectance models and their effect are as follows:

1=REFLECTANCE_NONE
No reflectance calculation is performed.

2=AMB
Ambient reflectance effects are computed.

3=AMB_DIFF
Ambient and diffuse reflectance effects are computed.

4=AMB_DIFF_SPEC
Ambient, diffuse, and specular reflectance effects are computed.

For compatibility, the Set Reflectance Model traversal state is also set by the Set Lighting Calculation Mode (GPLMO) subroutine. For more information, see The graPHIGS Programming Interface: Understanding Concepts

The traversal default for the reflectance model is 1=REFLECTANCE_NONE If the workstation does not support the specified method, then the graPHIGS API uses 1=REFLECTANCE_NONE

Parameters

model -- specified by user, fullword integer

Reflectance model (1=REFLECTANCE_NONE, 2=AMB, 3=AMB_DIFF, 4=AMB_DIFF_SPEC ).

Error Codes

5
FUNCTION REQUIRES STATE STOP OR NROP (NOT STCL)
110
REFLECTANCE MODEL IS INVALID

Related Subroutines

GPBRMO
Set Back Reflectance Model
GPQAAF
Inquire Advanced Attribute Facilities

RCP code

201343509 (X'0C004215')


[ Previous | Next | Contents | Glossary | Home | Search ]