home *** CD-ROM | disk | FTP | other *** search
- //--------------------------------------------------------------------------------------------
- // 3D Drawing Code
- //
- // by Philip McBride
- // parts freely taken from Apple DTS sample code
- //
- //--------------------------------------------------------------------------------------------
-
-
- #include "GameControls.h"
- #include "extern.h"
- #include "draw.h"
-
- //--------------------------------------------------------------------------------------------
- // Update the Screen (by re-rendering the scene)
- //
- void MyUpdateScreen(DocumentPtr theDocument)
- {
- TQ3SubdivisionStyleData subData = {kQ3SubdivisionMethodConstant, 20, 20};
-
- if (theDocument == NULL)
- return;
-
- if( theDocument->documentGroup ) {
- Q3View_StartRendering(theDocument->theView );
- do {
-
- Q3Shader_Submit(theDocument->illuminationShader, theDocument->theView);
- Q3InterpolationStyle_Submit(theDocument->currentInterpolation,theDocument->theView);
- Q3SubdivisionStyle_Submit( &subData,theDocument->theView);
- Q3DisplayGroup_Submit(theDocument->documentGroup, theDocument->theView);
-
- } while (Q3View_EndRendering(theDocument->theView) == kQ3ViewStatusRetraverse );
- }
-
- return;
- }