Changeset 2792 for GTP/trunk/App
- Timestamp:
- 06/20/08 19:33:41 (17 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling
- Files:
-
- 14 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/chc_revisited.vcproj
r2785 r2792 468 468 </File> 469 469 <File 470 RelativePath=".\Material.h"471 >472 </File>473 <File474 470 RelativePath=".\src\OcclusionQuery.h" 475 471 > -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/BinaryLoader.cpp
r2786 r2792 207 207 { 208 208 SceneEntity *ent = LoadSceneEntity(str); 209 ent->id = i;210 209 entities[i] = ent; 211 210 } -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Bvh.cpp
r2790 r2792 79 79 mTestNodesIdx(-1), 80 80 mIndicesPtr(-1), 81 mIndices(NULL),82 81 mId(0), 83 82 mIsMaxDepthForVirtualLeaf(false), … … 95 94 { 96 95 mVisibility.Reset(); 97 98 96 mLastRenderedFrame = -999; 99 97 } … … 111 109 112 110 111 BvhInterior::~BvhInterior() 112 { 113 DEL_PTR(mBack); 114 DEL_PTR(mFront); 115 } 116 117 113 118 BvhLeaf::~BvhLeaf() 114 119 { … … 151 156 Bvh::~Bvh() 152 157 { 153 if (mVertices) delete [] mVertices;158 if (mVertices) delete [] mVertices; 154 159 if (mIndices) delete [] mIndices; 155 160 if (mTestIndices) delete [] mTestIndices; … … 157 162 158 163 if (mRoot) delete mRoot; 164 165 // delete vbo 166 glDeleteBuffersARB(1, &mVboId); 159 167 } 160 168 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Bvh.h
r2790 r2792 190 190 int mLast; 191 191 192 /// the se nodes can be testedinstead of the current node192 /// the bounding boxes of these nodes are queries instead of the current node 193 193 int mTestNodesIdx; 194 194 /// the number of tighter bounding volumes used for this node 195 195 int mNumTestNodes; 196 196 /// used for efficient element array rendering 197 197 int mIndicesPtr; 198 198 … … 203 203 /// the index of this node 204 204 unsigned int mId; 205 /// indices used for draw array rendering206 unsigned int *mIndices;207 205 /// the bounding box 208 206 AxisAlignedBox3 mBox; … … 342 340 */ 343 341 inline BvhNode *GetFront() { return mFront; } 344 /** recursivly delete tree. 345 */ 346 virtual ~BvhInterior() { if (mBack) delete mBack; if (mFront) delete mFront;} 347 342 /** Recursivly delete hierarchy. 343 */ 344 virtual ~BvhInterior(); 348 345 349 346 protected: -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/CHCPlusPlusTraverser.cpp
r2790 r2792 27 27 { 28 28 BvhNode *node = query->GetNodes()[i]; 29 OcclusionQuery *q = IssueOcclusionQuery(node , false);29 OcclusionQuery *q = IssueOcclusionQuery(node); 30 30 mQueryQueue.push(q); 31 31 } … … 91 91 mVQueue.pop(); 92 92 93 OcclusionQuery *query = IssueOcclusionQuery(node , true);93 OcclusionQuery *query = IssueOcclusionQuery(node); 94 94 95 95 mQueryQueue.push(query); … … 128 128 129 129 // identify nodes that we cannot skip queries for 130 const bool testFeasible = (!wasVisible || (node->IsVirtualLeaf() &&130 const bool queryFeasible = (!wasVisible || (node->IsVirtualLeaf() && 131 131 (node->GetAssumedVisibleFrameId() <= mFrameId))); 132 132 … … 139 139 140 140 // skip testing previously visible interior nodes 141 if ( testFeasible)141 if (queryFeasible) 142 142 { 143 143 if (!wasVisible) … … 202 202 mVQueue.pop(); 203 203 204 OcclusionQuery *query = IssueOcclusionQuery(node , true);204 OcclusionQuery *query = IssueOcclusionQuery(node); 205 205 mQueryQueue.push(query); 206 206 } … … 264 264 265 265 //cout <<"size: " << query->GetSize() << endl; 266 IssueOcclusionQuery(*query , false);266 IssueOcclusionQuery(*query); 267 267 268 268 return query; … … 284 284 BvhNode *node = mIQueue.front(); 285 285 mIQueue.pop(); 286 query = IssueOcclusionQuery(node , false);286 query = IssueOcclusionQuery(node); 287 287 } 288 288 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/CHCTraverser.cpp
r2782 r2792 8 8 CHCTraverser::CHCTraverser() 9 9 {} 10 11 12 OcclusionQuery *CHCTraverser::IssueOcclusionQueryWithGeometry(BvhNode *node) 13 { 14 OcclusionQuery *query = mQueryHandler.RequestQuery(); 15 query->AddNode(node); 16 17 ++ mStats.mNumIssuedQueries; 18 19 query->BeginQuery(); 20 21 RenderNode(node); 22 23 if (mUseRenderQueue) 24 { 25 mRenderQueue.Render(); 26 mRenderQueue.Clear(); 27 } 28 29 query->EndQuery(); 30 31 return query; 32 } 10 33 11 34 … … 65 88 66 89 // identify nodes that we cannot skip queries for 67 const bool testFeasible = (!wasVisible ||90 const bool queryFeasible = (!wasVisible || 68 91 (node->IsVirtualLeaf() && (node->GetAssumedVisibleFrameId() <= mFrameId))); 69 92 … … 72 95 73 96 // skip testing previously visible interior nodes 74 if ( testFeasible)97 if (queryFeasible) 75 98 { 76 OcclusionQuery *query = IssueOcclusionQuery(node, wasVisible); 99 OcclusionQuery *query; 100 101 // if this node is a previous visible leaf: 102 // leaves will be rendered anyway => we can directly query the real geometry 103 if (wasVisible && mUseOptimization) 104 query = IssueOcclusionQueryWithGeometry(node); 105 else 106 query = IssueOcclusionQuery(node); 107 77 108 mQueryQueue.push(query); 78 109 } … … 103 134 } 104 135 } 136 137 /// Empty render queue. 138 if (mUseRenderQueue) 139 { 140 mRenderQueue.Render(); 141 mRenderQueue.Clear(); 142 } 105 143 } 106 144 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/CHCTraverser.h
r2782 r2792 18 18 19 19 protected: 20 /** Optimized query querying the node geometry instead 21 of the bounding box 22 */ 23 OcclusionQuery *IssueOcclusionQueryWithGeometry(BvhNode *node); 24 20 25 /** Traverses and renders the scene with the specified method 21 26 */ -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/FrustumCullingTraverser.cpp
r2782 r2792 37 37 } 38 38 39 // render the rest of the objects39 // render the contents of the render queue 40 40 if (mUseRenderQueue) 41 41 { -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderTraverser.cpp
r2790 r2792 25 25 mNumRenderedNodes = 0; 26 26 27 mNumPreviouslyVisibleNodeQueries = 0;28 27 mNumIssuedQueries = 0; 29 28 mNumStateChanges = 0; … … 166 165 { 167 166 mUseRenderQueue = useRenderQueue; 168 std::cout << "using render queue: " << mUseRenderQueue << std::endl;167 //std::cout << "using render queue: " << mUseRenderQueue << std::endl; 169 168 } 170 169 … … 179 178 { 180 179 mUseOptimization = useOptimization; 180 //cout << "using optimization: " << mUseOptimization << endl; 181 181 } 182 182 … … 214 214 215 215 216 OcclusionQuery *RenderTraverser::IssueOcclusionQuery(BvhNode *node , bool wasVisible)216 OcclusionQuery *RenderTraverser::IssueOcclusionQuery(BvhNode *node) 217 217 { 218 218 OcclusionQuery *query = mQueryHandler.RequestQuery(); 219 219 query->AddNode(node); 220 220 221 IssueOcclusionQuery(*query , wasVisible);221 IssueOcclusionQuery(*query); 222 222 223 223 return query; … … 225 225 226 226 227 void RenderTraverser::IssueOcclusionQuery(const OcclusionQuery &query , bool wasVisible)227 void RenderTraverser::IssueOcclusionQuery(const OcclusionQuery &query) 228 228 { 229 229 ++ mStats.mNumIssuedQueries; … … 238 238 query.BeginQuery(); 239 239 240 if (wasVisible) 241 ++ mStats.mNumPreviouslyVisibleNodeQueries; 242 243 // if this node is a previous visible leaf: 244 // leaves will be rendered anyway => we can also test with the real geometry 245 if (wasVisible && mUseOptimization) 246 { 247 for (size_t i = 0; i < query.GetSize(); ++ i) 248 RenderNode(query.GetNodes()[i]); 249 } 250 else 251 { 252 // change to query mode and render box 253 if (mRenderState->SetState(RenderState::QUERY)) 254 ++ mStats.mNumStateChanges; 255 256 mBvh->RenderBounds(query.GetNodes(), mRenderState, mUseTightBounds); 257 } 258 240 // change to query mode and render box 241 if (mRenderState->SetState(RenderState::QUERY)) 242 ++ mStats.mNumStateChanges; 243 244 mBvh->RenderBounds(query.GetNodes(), mRenderState, mUseTightBounds); 245 259 246 query.EndQuery(); 260 247 } -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderTraverser.h
r2790 r2792 37 37 int mNumIssuedQueries; 38 38 int mNumStateChanges; 39 int mNumPreviouslyVisibleNodeQueries;40 39 41 40 double mRenderTime; … … 130 129 /** Issues occlusion query for a single node 131 130 */ 132 OcclusionQuery *IssueOcclusionQuery(BvhNode *node , bool wasVisible);131 OcclusionQuery *IssueOcclusionQuery(BvhNode *node); 133 132 /** Issue multiquery. 134 133 */ 135 void IssueOcclusionQuery(const OcclusionQuery &query , bool wasVisible);134 void IssueOcclusionQuery(const OcclusionQuery &query); 136 135 /** Retunrs true if the current bvh node intersects the near plane. 137 136 */ -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SceneEntity.cpp
r2782 r2792 15 15 mGeometry(geometry), mMaterial(mat), mTransform(trafo) 16 16 { 17 } 18 19 20 SceneEntity::~SceneEntity() 21 { 22 // delete only trafo here, the other members could be shared 23 // among several entities and are therefore handled separately 24 DEL_PTR(mTransform); 17 25 } 18 26 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SceneEntity.h
r2782 r2792 21 21 { 22 22 public: 23 int id;24 23 /** Creates a scene entity. 25 24 */ 26 25 SceneEntity(Geometry *geometry, Material *mat, Matrix4x4 *trafo); 26 27 ~SceneEntity(); 27 28 /** Renders this node. 28 29 */ -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/StopAndWaitTraverser.cpp
r2782 r2792 35 35 else 36 36 { 37 OcclusionQuery *query = IssueOcclusionQuery(node , false);37 OcclusionQuery *query = IssueOcclusionQuery(node); 38 38 39 39 int visiblePixels = query->GetQueryResult(); … … 60 60 } 61 61 } 62 63 /// Empty render queue. 64 if (mUseRenderQueue) 65 { 66 mRenderQueue.Render(); 67 mRenderQueue.Clear(); 68 } 62 69 } 63 70 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r2790 r2792 51 51 52 52 const float keyForwardMotion = 1.0f; 53 const float keyRotation = 0. 2f;53 const float keyRotation = 0.05f; 54 54 55 55 int winWidth = 1024; … … 76 76 bool visMode = false; 77 77 78 //mouse navigation state 79 int xEyeBegin, yEyeBegin, yMotionBegin, verticalMotionBegin, horizontalMotionBegin = 0; 78 // mouse navigation state 79 int xEyeBegin, yEyeBegin, yMotionBegin = 0; 80 int verticalMotionBegin, horizontalMotionBegin = 0; 80 81 81 82 bool useOptimization = false; … … 88 89 Matrix4x4 visView = IdentityMatrix(); 89 90 91 bool leftKeyPressed = false; 92 bool rightKeyPressed = false; 93 bool upKeyPressed = false; 94 bool downKeyPressed = false; 90 95 91 96 void InitExtensions(); … … 100 105 void DrawHelpMessage(); 101 106 102 void begin2D(); 103 void end2D(); 104 void keyboard(unsigned char c, int x, int y); 105 void drawStatistics(); 106 void display(void); 107 void special(int c, int x, int y); 108 void reshape(int w, int h); 109 void mouse(int button, int state, int x, int y); 110 void leftMotion(int x, int y); 111 void rightMotion(int x, int y); 112 void middleMotion(int x, int y); 113 void drawEyeView(); 114 void setupVisView(); 115 void CalcDecimalPoint(std::string &str, int d); 107 void Begin2D(); 108 void End2D(); 109 void KeyBoard(unsigned char c, int x, int y); 110 void DrawStatistics(); 111 void Display(); 112 void Special(int c, int x, int y); 113 void KeyUp(unsigned char c, int x, int y); 114 void SpecialKeyUp(int c, int x, int y); 115 void Reshape(int w, int h); 116 void Mouse(int button, int state, int x, int y); 117 void LeftMotion(int x, int y); 118 void RightMotion(int x, int y); 119 void MiddleMotion(int x, int y); 120 void SetupVisView(); 121 void CalcDecimalPoint(string &str, int d); 116 122 void ResetTraverser(); 117 123 124 void KeyHorizontalMotion(float shift); 125 void KeyRotate(float angle); 126 118 127 119 128 … … 122 131 int returnCode = 0; 123 132 124 #ifdef _CRT_SET133 //#ifdef _CRT_SET 125 134 126 135 //Now just call this function at the start of your program and if you're … … 133 142 _CrtSetReportMode(_CRT_ASSERT,_CRTDBG_MODE_FILE); 134 143 _CrtSetReportFile(_CRT_ASSERT,_CRTDBG_FILE_STDERR); 135 #endif144 //#endif 136 145 137 146 … … 145 154 glutCreateWindow("Coherent Hierarchical Culling"); 146 155 147 glutDisplayFunc(display); 148 glutKeyboardFunc(keyboard); 149 glutSpecialFunc(special); 150 glutReshapeFunc(reshape); 151 glutMouseFunc(mouse); 152 glutIdleFunc(display); 153 156 glutDisplayFunc(Display); 157 glutKeyboardFunc(KeyBoard); 158 glutSpecialFunc(Special); 159 glutReshapeFunc(Reshape); 160 glutMouseFunc(Mouse); 161 glutIdleFunc(Display); 162 glutKeyboardUpFunc(KeyUp); 163 glutSpecialUpFunc(SpecialKeyUp); 164 glutIgnoreKeyRepeat(true); 165 154 166 InitExtensions(); 155 167 InitGLstate(); 156 168 157 leftMotion(0, 0);158 middleMotion(0, 0);169 LeftMotion(0, 0); 170 MiddleMotion(0, 0); 159 171 160 172 BinaryLoader loader; … … 168 180 { 169 181 cerr << "loading scene " << filename << " failed" << endl; 182 CleanUp(); 170 183 exit(0); 171 184 } 185 CleanUp(); 186 exit(0); 172 187 173 188 const string bvh_filename = string(model_path + "city.bvh"); … … 179 194 { 180 195 cerr << "loading bvh " << bvh_filename << " failed" << endl; 196 CleanUp(); 181 197 exit(0); 182 198 } … … 268 284 "'B' - use tight bounds", 269 285 "'M' - use multiqueries", 286 "'O' - use CHC optimization (geometry queries for leaves)", 270 287 0, 271 288 }; … … 297 314 } 298 315 } 299 300 316 } 301 317 … … 345 361 glEnable(GL_LIGHT1); 346 362 347 //glDisable(GL_LIGHT1);348 //glDisable(GL_LIGHTING);349 350 363 //GLfloat ambient[] = {0.5, 0.5, 0.5, 1.0}; 351 364 GLfloat ambient[] = {0.2, 0.2, 0.2, 1.0}; … … 405 418 406 419 407 void display(void) 408 { 420 void KeyRotate(float angle) 421 { 422 Vector3 viewDir = camera->GetDirection(); 423 // rotate view vector 424 Matrix4x4 rot = RotationZMatrix(angle); 425 viewDir = rot * viewDir; 426 camera->SetDirection(viewDir); 427 } 428 429 430 void KeyHorizontalMotion(float shift) 431 { 432 Vector3 hvec = camera->GetDirection(); 433 hvec.z = 0; 434 435 Vector3 pos = camera->GetPosition(); 436 pos += hvec * shift; 437 438 camera->SetPosition(pos); 439 } 440 441 442 void Display() 443 { 444 if (leftKeyPressed) 445 KeyRotate(keyRotation); 446 if (rightKeyPressed) 447 KeyRotate(-keyRotation); 448 if (upKeyPressed) 449 KeyHorizontalMotion(keyForwardMotion); 450 if (downKeyPressed) 451 KeyHorizontalMotion(-keyForwardMotion); 452 409 453 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 410 454 … … 424 468 425 469 #pragma warning( disable : 4100 ) 426 void keyboard(const unsigned char c, const int x, constint y)470 void KeyBoard(unsigned char c, int x, int y) 427 471 { 428 472 // used to avoid vertical motion with the keys … … 433 477 { 434 478 case 27: 479 CleanUp(); 435 480 exit(0); 436 481 break; … … 480 525 break; 481 526 } 482 case ' g':483 case ' G':527 case 'o': 528 case 'O': 484 529 useOptimization = !useOptimization; 485 530 traverser->SetUseOptimization(useOptimization); … … 488 533 case 'A': 489 534 { 490 Vector3 viewDir = camera->GetDirection(); 491 // rotate view vector 492 Matrix4x4 rot = RotationZMatrix(keyRotation); 493 viewDir = rot * viewDir; 494 camera->SetDirection(viewDir); 535 leftKeyPressed = true; 536 KeyRotate(keyRotation); 495 537 } 496 538 break; … … 498 540 case 'D': 499 541 { 500 Vector3 viewDir = camera->GetDirection(); 501 // rotate view vector 502 Matrix4x4 rot = RotationZMatrix(-keyRotation); 503 viewDir = rot * viewDir; 504 camera->SetDirection(viewDir); 542 rightKeyPressed = true; 543 KeyRotate(-keyRotation); 505 544 } 506 545 break; … … 508 547 case 'W': 509 548 { 510 Vector3 pos = camera->GetPosition(); 511 pos += hvec * keyForwardMotion; 512 camera->SetPosition(pos); 549 upKeyPressed = true; 550 KeyHorizontalMotion(keyForwardMotion); 513 551 } 514 552 break; … … 516 554 case 'X': 517 555 { 518 Vector3 pos = camera->GetPosition(); 519 pos -= hvec * keyForwardMotion; 520 camera->SetPosition(pos); 556 downKeyPressed = true; 557 KeyHorizontalMotion(-keyForwardMotion); 521 558 } 522 559 break; … … 535 572 } 536 573 break; 574 575 576 537 577 default: 538 578 return; … … 543 583 544 584 545 void special(int c, int x, int y) 585 void SpecialKeyUp(int c, int x, int y) 586 { 587 switch (c) 588 { 589 case GLUT_KEY_LEFT: 590 leftKeyPressed = false; 591 break; 592 case GLUT_KEY_RIGHT: 593 rightKeyPressed = false; 594 break; 595 case GLUT_KEY_UP: 596 upKeyPressed = false; 597 break; 598 case GLUT_KEY_DOWN: 599 downKeyPressed = false; 600 break; 601 default: 602 return; 603 } 604 //glutPostRedisplay(); 605 } 606 607 608 void KeyUp(unsigned char c, int x, int y) 609 { 610 switch (c) 611 { 612 case 'A': 613 case 'a': 614 leftKeyPressed = false; 615 break; 616 case 'D': 617 case 'd': 618 rightKeyPressed = false; 619 break; 620 case 'W': 621 case 'w': 622 upKeyPressed = false; 623 break; 624 case 'X': 625 case 'x': 626 downKeyPressed = false; 627 break; 628 default: 629 return; 630 } 631 //glutPostRedisplay(); 632 } 633 634 635 void Special(int c, int x, int y) 546 636 { 547 637 // used to avoid vertical motion with the keys … … 568 658 case GLUT_KEY_LEFT: 569 659 { 570 Vector3 viewDir = camera->GetDirection(); 571 // rotate view vector 572 Matrix4x4 rot = RotationZMatrix(keyRotation); 573 viewDir = rot * viewDir; 574 camera->SetDirection(viewDir); 660 leftKeyPressed = true; 661 KeyRotate(keyRotation); 575 662 } 576 663 break; 577 664 case GLUT_KEY_RIGHT: 578 665 { 579 Vector3 viewDir = camera->GetDirection(); 580 // rotate view vector 581 Matrix4x4 rot = RotationZMatrix(-keyRotation); 582 viewDir = rot * viewDir; 583 camera->SetDirection(viewDir); 666 rightKeyPressed = true; 667 KeyRotate(-keyRotation); 584 668 } 585 669 break; 586 670 case GLUT_KEY_UP: 587 671 { 588 Vector3 pos = camera->GetPosition(); 589 pos += hvec * 0.6f; 590 camera->SetPosition(pos); 672 upKeyPressed = true; 673 KeyHorizontalMotion(keyForwardMotion); 591 674 } 592 675 break; 593 676 case GLUT_KEY_DOWN: 594 677 { 595 Vector3 pos = camera->GetPosition(); 596 pos -= hvec * 0.6f; 597 camera->SetPosition(pos); 678 downKeyPressed = true; 679 KeyHorizontalMotion(-keyForwardMotion); 598 680 } 599 681 break; … … 609 691 610 692 611 void reshape(const int w, constint h)693 void Reshape(int w, int h) 612 694 { 613 695 winAspectRatio = 1.0f; … … 631 713 632 714 633 void mouse(int button, int state, int x, int y)715 void Mouse(int button, int state, int x, int y) 634 716 { 635 717 if ((button == GLUT_LEFT_BUTTON) && (state == GLUT_DOWN)) … … 638 720 yMotionBegin = y; 639 721 640 glutMotionFunc( leftMotion);722 glutMotionFunc(LeftMotion); 641 723 } 642 724 else if ((button == GLUT_RIGHT_BUTTON) && (state == GLUT_DOWN)) … … 645 727 yMotionBegin = y; 646 728 647 glutMotionFunc( rightMotion);729 glutMotionFunc(RightMotion); 648 730 } 649 731 else if ((button == GLUT_MIDDLE_BUTTON) && (state == GLUT_DOWN)) … … 651 733 horizontalMotionBegin = x; 652 734 verticalMotionBegin = y; 653 glutMotionFunc( middleMotion);735 glutMotionFunc(MiddleMotion); 654 736 } 655 737 … … 661 743 motion for up/down mouse drag 662 744 */ 663 void leftMotion(int x, int y)745 void LeftMotion(int x, int y) 664 746 { 665 747 static float eyeXAngle = 0.0f; … … 694 776 motion for up / down mouse drag 695 777 */ 696 void rightMotion(int x, int y)778 void RightMotion(int x, int y) 697 779 { 698 780 static float eyeYAngle = 0.0f; … … 716 798 717 799 // strafe 718 void middleMotion(int x, int y)800 void MiddleMotion(int x, int y) 719 801 { 720 802 Vector3 viewDir = camera->GetDirection(); … … 758 840 759 841 760 void begin2D(void)842 void Begin2D(void) 761 843 { 762 844 glDisable(GL_LIGHTING); … … 773 855 774 856 775 void end2D(void)857 void End2D(void) 776 858 { 777 859 glPopMatrix(); … … 803 885 void DisplayVisualization() 804 886 { 805 setupVisView();887 SetupVisView(); 806 888 807 889 visualization->SetFrameId(traverser->GetCurrentFrameId()); 808 890 809 begin2D();891 Begin2D(); 810 892 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 811 893 glEnable(GL_BLEND); … … 814 896 glRecti(winWidth, 0, winWidth - winWidth / 4, winHeight / 3); 815 897 glDisable(GL_BLEND); 816 end2D();898 End2D(); 817 899 818 900 glViewport(winWidth - winWidth / 4, winHeight - winHeight / 3, winWidth, winHeight); … … 859 941 /** Sets up view matrix for bird eye view 860 942 */ 861 void setupVisView()943 void SetupVisView() 862 944 { 863 945 Vector3 pos(-bvh->GetBox().Center()); … … 978 1060 979 1061 sprintf_s(msg7, "fps: %6.1f", fps); 980 //cout << "previously visible node queries: " << traverser->GetStats().mNumPreviouslyVisibleNodeQueries << endl; 981 982 begin2D();1062 1063 1064 Begin2D(); 983 1065 984 1066 if(showHelp) … … 1007 1089 } 1008 1090 1009 end2D();1091 End2D(); 1010 1092 }
Note: See TracChangeset
for help on using the changeset viewer.