RenderObjectGuide.txt 784 B

12345678910111213141516171819202122232425
  1. HY 2/14/01 Created.
  2. Polygons are rendered via:
  3. A. The Mesh packet renderer
  4. B. Render object's render method
  5. C. Alpha sorting pipeline
  6. NB. Shaders and Vertex Mateirals have presets that you can use to set state
  7. Guidelines for B type polygons:
  8. 1. Always set the World matrix
  9. 2. Always use a Shader (Shader.Apply())
  10. 3. Always use a VertexMaterial (VertexMaterial.Apply())
  11. 4. If there is a Texture, use Texture.Apply()
  12. For any other render state, save the initial state, set your state, render then
  13. restore the original state.
  14. e.g. save the VIEW matrix if you're nuking it, then restore it after you're done.
  15. Guidelines for C type polygons:
  16. 1. All vertices submitted must be in View Coordinates
  17. 2. All states submitted must be entirely contained in Shader,VertexMaterial & Texture