Revolution Graphics Library (GX)

Revolution Graphics Library (GX)

Revolution Graphics Library (GX) Version 1.00 © 2006 Nintendo © 2006 Nintendo RVL-06-0037-001-A CONFIDENTIAL Released: February 27, 2006 Graphics Library (GX) "Confidential" These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are pro- tected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nin- tendo. © 2006 Nintendo TM and ® are trademarks of Nintendo. Dolby, Pro Logic and the Double-D symbol are trademarks of Dolby Laboratories. IBM is a trademark of International Business Machines Corporation. Roland GS Sound Set is a trademark of Roland Corporation U.S. All other trademarks and copyrights are property of their respective owners. RVL-06-0037-001-A © 2006 Nintendo Released: February 27, 2006 CONFIDENTIAL i Graphics Library (GX) Version 1.00 Contents Revision History ...............................................................................................................................I-xii 1 Introduction................................................................................................................................. I-1 1.1 Document organization..................................................................................................... I-1 1.2 Syntax notes ..................................................................................................................... I-1 1.3 A note on pointers............................................................................................................. I-2 1.4 Useful books ..................................................................................................................... I-2 2 Code example: onetri.c............................................................................................................... I-3 3 Initialization................................................................................................................................. I-9 3.1 Video initialization ............................................................................................................. I-9 3.2 Graphics initialization........................................................................................................ I-9 3.3 Graphics Processor (GP)................................................................................................ I-10 4 Vertex and primitive data.......................................................................................................... I-11 4.1 Describing the vertex data .............................................................................................. I-12 4.2 Describing arrays............................................................................................................I-14 4.3 Describing attribute data formats.................................................................................... I-15 4.4 Drawing graphics primitives............................................................................................ I-17 4.4.1 Primitive types....................................................................................................... I-17 4.4.2 Points and lines..................................................................................................... I-18 4.4.3 Rasterization rules ................................................................................................ I-19 4.4.4 Using vertex functions........................................................................................... I-20 4.5 Vertex data organization................................................................................................. I-22 4.5.1 Indexed vertex data .............................................................................................. I-25 4.5.2 Direct vertex data.................................................................................................. I-26 4.5.3 Mixture of direct and indexed data........................................................................ I-27 4.6 Display lists..................................................................................................................... I-28 4.6.1 Creating display lists ............................................................................................. I-28 4.6.2 Drawing primitives using display lists.................................................................... I-30 4.6.3 Effect on machine state ........................................................................................ I-31 4.7 GXDraw functions........................................................................................................... I-31 5 Viewing..................................................................................................................................... I-33 5.1 Loading a modelview matrix ........................................................................................... I-34 5.2 Setting a projection matrix .............................................................................................. I-35 5.3 Culling, clipping, and scissoring...................................................................................... I-36 5.4 Viewport and scissoring.................................................................................................. I-37 5.5 Coordinate systems ........................................................................................................ I-38 5.6 How to override the default matrix memory configuration .............................................. I-39 6 Vertex lighting........................................................................................................................... I-41 6.1 Lighting pipeline.............................................................................................................. I-41 6.1.1 Diffuse lights, diffuse attenuation and vertex normals........................................... I-41 6.1.2 Local lights and range attenuation ........................................................................ I-41 6.1.3 Spotlights, directional lights and angle attenuation............................................... I-41 6.2 Diffuse lighting equations................................................................................................ I-43 6.3 Matrix memory ................................................................................................................I-44 6.4 Light parameters.............................................................................................................I-44 6.4.1 Angle attenuation .................................................................................................. I-44 6.4.2 Distance attenuation ............................................................................................. I-45 © 2006 Nintendo RVL-06-0037-001-A CONFIDENTIAL Released: February 27, 2006 ii Graphics Library (GX) 6.5 Channel parameters ....................................................................................................... I-47 6.5.1 Channel colors ...................................................................................................... I-47 6.5.2 Channel control..................................................................................................... I-47 6.5.3 Pre-lighting............................................................................................................ I-48 6.6 Specular lighting ............................................................................................................. I-49 6.7 Vertex performance ........................................................................................................ I-50 6.8 Lighting performance ...................................................................................................... I-51 7 Texture coordinate generation..................................................................................................I-53 7.1 Specifying texgens.......................................................................................................... I-53 7.2 Other texture coordinate generation issues.................................................................... I-55 7.3 Texture coordinate generation performance................................................................... I-55 8 Texture mapping....................................................................................................................... I-57 8.1 Example: Drawing a textured triangle............................................................................. I-58 8.2 Loading a texture into main memory .............................................................................. I-60 8.3 Code describing a texture object .................................................................................... I-60 8.3.1 Texel formats ........................................................................................................ I-61 8.3.2 Texture Lookup Table (TLUT) formats.................................................................. I-63 8.3.3 Texture image formats .......................................................................................... I-63 8.3.4 Texture coordinate space ..................................................................................... I-64 8.3.5 Filter modes and LOD controls ............................................................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    232 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us