Ignore:
Timestamp:
06/20/08 02:26:30 (16 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp

    r2784 r2786  
    4949int assumedVisibleFrames = 10; 
    5050int maxBatchSize = 50; 
    51 bool useMultiQueries = true; 
    5251 
    5352const float keyForwardMotion = 1.0f; 
    5453const float keyRotation = 0.2f; 
    55  
    56 bool useRenderQueue = false; 
    5754 
    5855int winWidth = 1024; 
     
    8481 
    8582bool useOptimization = false; 
     83bool useTightBounds = true; 
     84bool useRenderQueue = false; 
     85bool useMultiQueries = true; 
    8686 
    8787 
     
    9595void DisplayStats(); 
    9696void Output(int x, int y, const char *string); 
     97void DrawHelpMessage(); 
    9798 
    9899void begin2D(); 
    99100void end2D(); 
    100101void keyboard(unsigned char c, int x, int y); 
    101 void drawHelpMessage(); 
    102102void drawStatistics(); 
    103103void display(void); 
     
    233233 
    234234 
    235 void drawHelpMessage(void)  
     235void DrawHelpMessage(void)  
    236236{ 
    237237        const char *message[] =  
     
    257257                "'9'            - downward motion", 
    258258                "", 
    259                 "'G'            - enables/disables optimization to take geometry as occluder", 
     259                "'R'            - use render queue", 
    260260                "", 
    261261                "'S'            - shows/hides statistics", 
     
    269269         
    270270         
    271         int x = 40, y = 42; 
     271        int x = 40, y = 60; 
    272272 
    273273        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 
     
    286286                if(message[i][0] == '\0')  
    287287                { 
    288                         y += 7; 
     288                        y += 15; 
    289289                }  
    290290                else  
    291291                { 
    292292                        Output(x, y, message[i]); 
    293                         y += 14; 
     293                        y += 20; 
    294294                } 
    295295        } 
     
    332332        traverser->SetMaxBatchSize(maxBatchSize); 
    333333        traverser->SetUseMultiQueries(useMultiQueries); 
     334        traverser->SetUseTightBounds(useTightBounds); 
    334335} 
    335336 
     
    546547                        traverser->SetUseRenderQueue(useRenderQueue); 
    547548                } 
     549        case 'b': 
     550        case 'B': 
     551                { 
     552                        useTightBounds = !useTightBounds; 
     553                        traverser->SetUseTightBounds(useTightBounds); 
     554                } 
    548555        default: 
    549556                return; 
     
    718725        // the 90 degree rotated view vector  
    719726        // y zero so we don't move in the vertical 
    720         //Vector3 rVec(viewDir[0], 0, viewDir[2]); 
    721727        Vector3 rVec(viewDir[0], viewDir[1], 0); 
    722728         
    723         //Matrix4x4 rot = RotationYMatrix(M_PI * 0.5f); 
    724729        Matrix4x4 rot = RotationZMatrix(M_PI * 0.5f); 
    725730        rVec = rot * rVec; 
    726731         
    727732        pos -= rVec * (x - horizontalMotionBegin) * 0.1f; 
    728         //pos[1] += (verticalMotionBegin - y) * 0.1f; 
    729733        pos[2] += (verticalMotionBegin - y) * 0.1f; 
    730734 
     
    914918        } 
    915919 
    916         sprintf_s(msg2, "assumed visible frames: %4d, max batch size: %4d, using multiqueries: %d, using render queue: %d", assumedVisibleFrames, maxBatchSize, useMultiQueries, useRenderQueue); 
     920        sprintf_s(msg2, "assumed visible frames: %4d, max batch size: %4d, using render queue: %d",  
     921                      assumedVisibleFrames, maxBatchSize, useRenderQueue); 
    917922 
    918923        string str; 
     
    935940        if(showHelp) 
    936941        {        
    937                 drawHelpMessage(); 
     942                DrawHelpMessage(); 
    938943        } 
    939944        else 
     
    942947                Output(850, 30, msg[renderMode]); 
    943948 
    944                 if(showStatistics) 
     949                if (showStatistics) 
    945950                { 
    946951                        Output(20, 30, msg2); 
Note: See TracChangeset for help on using the changeset viewer.