|
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
i have an opengl scene and single light with the following attributes:The following works for me:
lightAmbient2[] = { 0.5f, 0.5f, 0.5f, 1.0f };
lightDiffuseColor2[] = {1.0, 1.0, 1.0, 1.0};
lightPosition2[] = {1.0, 1.0, 1.0, 1.0};
here is the pseudo code:
lighting is enabled.
pushmatrix().
transformation of object.
i draw a series of triangles into the scene.
popmatrix().
here's my problem:
region A on the group of triangles is illuminated and region B is in shadow.
i rotate the entire group of triangles about the y-axis by 90 degrees.
BUT region A is still the region that is illuminated and region B is in shadow. i'd like the light to be 'stationary' and while the object is transformed lighting on it's surfaces(triangles) changes accordingly.
Thanks,
Aaron.
| References: | |
| >Basic OpenGL Transformation 'n Lighting question. (From: Aaron Boothello <email@hidden>) |
| Home | Archives | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.