Changeset 19918
- Timestamp:
- 04/09/07 09:28:20 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
juggler/branches/2.0/modules/vrjuggler/vrj/Draw/OGL/GlWindowWin32.cpp
r19032 r19918 391 391 { 392 392 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 393 << clrOutBOLD(clrYELLOW, "WARNING :") << "Display window '"393 << clrOutBOLD(clrYELLOW, "WARNING") << ": Display window '" 394 394 << mVrjDisplay->getName() << "'" << std::endl; 395 395 vprDEBUG_NEXTnl(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 396 << " has an out of date OpenGL frame buffer configuration."397 << std::endl;396 << " has an out of date OpenGL frame buffer " 397 << "configuration.\n"; 398 398 vprDEBUG_NEXTnl(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 399 << " Expected version 2but found version "400 << gl_fb_elt->getVersion() << ". \n";399 << " Expected version 3 but found version " 400 << gl_fb_elt->getVersion() << ". Default values\n"; 401 401 vprDEBUG_NEXTnl(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 402 << " Default valueswill be used for some frame buffer settings.\n"402 << " will be used for some frame buffer settings.\n" 403 403 << vprDEBUG_FLUSH; 404 404 } … … 448 448 { 449 449 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 450 << clrOutBOLD(clrYELLOW, "WARNING :")451 << " Color buffer red channel size was negative ("450 << clrOutBOLD(clrYELLOW, "WARNING") 451 << ": Color buffer red channel size was negative (" 452 452 << red_size << "). Setting to 1.\n" << vprDEBUG_FLUSH; 453 453 red_size = 1; … … 457 457 { 458 458 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 459 << clrOutBOLD(clrYELLOW, "WARNING :")460 << " Color buffer green channel size was negative ("459 << clrOutBOLD(clrYELLOW, "WARNING") 460 << ": Color buffer green channel size was negative (" 461 461 << green_size << "). Setting to 1.\n" << vprDEBUG_FLUSH; 462 462 green_size = 1; … … 466 466 { 467 467 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 468 << clrOutBOLD(clrYELLOW, "WARNING :")469 << " Color buffer blue channel size was negative ("468 << clrOutBOLD(clrYELLOW, "WARNING") 469 << ": Color buffer blue channel size was negative (" 470 470 << blue_size << "). Setting to 1.\n" << vprDEBUG_FLUSH; 471 471 blue_size = 1; … … 475 475 { 476 476 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 477 << clrOutBOLD(clrYELLOW, "WARNING :")478 << " Color buffer alpha channel size was negative ("477 << clrOutBOLD(clrYELLOW, "WARNING") 478 << ": Color buffer alpha channel size was negative (" 479 479 << alpha_size << "). Setting to 1.\n" << vprDEBUG_FLUSH; 480 480 alpha_size = 1; … … 484 484 { 485 485 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 486 << clrOutBOLD(clrYELLOW, "WARNING :")487 << " Auxiliary buffer count was negative (" << num_aux_bufs486 << clrOutBOLD(clrYELLOW, "WARNING") 487 << ": Auxiliary buffer count was negative (" << num_aux_bufs 488 488 << "). Setting to 0.\n" << vprDEBUG_FLUSH; 489 489 num_aux_bufs = 0; … … 493 493 { 494 494 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 495 << clrOutBOLD(clrYELLOW, "WARNING :")496 << " Depth buffer size was negative (" << db_size495 << clrOutBOLD(clrYELLOW, "WARNING") 496 << ": Depth buffer size was negative (" << db_size 497 497 << "). Setting to 1.\n" << vprDEBUG_FLUSH; 498 498 db_size = 1; … … 502 502 { 503 503 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 504 << clrOutBOLD(clrYELLOW, "WARNING :")505 << " Stencil buffer size was negative (" << stencil_size504 << clrOutBOLD(clrYELLOW, "WARNING") 505 << ": Stencil buffer size was negative (" << stencil_size 506 506 << "). Setting to 1.\n" << vprDEBUG_FLUSH; 507 507 stencil_size = 1; … … 511 511 { 512 512 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 513 << clrOutBOLD(clrYELLOW, "WARNING :")514 << " Accumulation buffer red channel size was negative ("513 << clrOutBOLD(clrYELLOW, "WARNING") 514 << ": Accumulation buffer red channel size was negative (" 515 515 << accum_red_size << "). Setting to 1.\n" << vprDEBUG_FLUSH; 516 516 accum_red_size = 1; … … 520 520 { 521 521 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 522 << clrOutBOLD(clrYELLOW, "WARNING :")523 << " Accumulation buffer green channel size was negative ("522 << clrOutBOLD(clrYELLOW, "WARNING") 523 << ": Accumulation buffer green channel size was negative (" 524 524 << accum_green_size << "). Setting to 1.\n" << vprDEBUG_FLUSH; 525 525 accum_green_size = 1; … … 529 529 { 530 530 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 531 << clrOutBOLD(clrYELLOW, "WARNING :")532 << " Accumulation buffer blue channel size was negative ("531 << clrOutBOLD(clrYELLOW, "WARNING") 532 << ": Accumulation buffer blue channel size was negative (" 533 533 << accum_blue_size << "). Setting to 1.\n" << vprDEBUG_FLUSH; 534 534 accum_blue_size = 1; … … 538 538 { 539 539 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 540 << clrOutBOLD(clrYELLOW, "WARNING :")541 << " Accumulation buffer alpha channel size was negative ("540 << clrOutBOLD(clrYELLOW, "WARNING") 541 << ": Accumulation buffer alpha channel size was negative (" 542 542 << accum_alpha_size << "). Setting to 1.\n" << vprDEBUG_FLUSH; 543 543 accum_alpha_size = 1; juggler/branches/2.0/modules/vrjuggler/vrj/Draw/OGL/GlWindowXWin.cpp
r19916 r19918 119 119 { 120 120 vprDEBUG(vprDBG_ERROR, vprDBG_CRITICAL_LVL) 121 << clrOutNORM(clrRED, "ERROR:")122 << " [vrj::GlWindowXWin::open()] Window has not been configured\n"121 << clrOutNORM(clrRED, "ERROR") 122 << ": [vrj::GlWindowXWin::open()] Window has not been configured\n" 123 123 << vprDEBUG_FLUSH; 124 124 return false; … … 128 128 { 129 129 vprDEBUG(vprDBG_ERROR, vprDBG_CRITICAL_LVL) 130 << clrOutNORM(clrRED, "ERROR:")131 << " [vrj::GlWindowXWin::open()] Unable to open display '"130 << clrOutNORM(clrRED, "ERROR") 131 << ": [vrj::GlWindowXWin::open()] Unable to open display '" 132 132 << mXDisplayName << "'.\n" << vprDEBUG_FLUSH; 133 133 return false; … … 142 142 { 143 143 vprDEBUG(vprDBG_ERROR, vprDBG_CRITICAL_LVL) 144 << clrOutNORM(clrRED, "ERROR:") << " Failed to get a GLX visual\n"145 << vprDEBUG_FLUSH;144 << clrOutNORM(clrRED, "ERROR") 145 << ": Failed to get a GLX visual!\n" << vprDEBUG_FLUSH; 146 146 throw glwinx_OpenFailureException(); 147 147 } … … 160 160 { 161 161 vprDEBUG(vprDBG_ERROR, vprDBG_CRITICAL_LVL) 162 << clrOutNORM(clrRED, "ERROR:")163 << " vrj::GlWindowXWin:XCreateColorMap failed on '"162 << clrOutNORM(clrRED, "ERROR") 163 << ": [vrj::GlWindowXWin::open()] XCreateColorMap failed on '" 164 164 << mXDisplayName << "'.\n" << vprDEBUG_FLUSH; 165 165 throw glwinx_OpenFailureException(); … … 191 191 { 192 192 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_CRITICAL_LVL) 193 << clrOutNORM(clrRED, "ERROR:")194 << " vrj::GlWindowXWin: Couldn't create window for " << mXDisplayName195 << std::endl << vprDEBUG_FLUSH;193 << clrOutNORM(clrRED, "ERROR") 194 << ": [vrj::GlWindowXWin::open()] Couldn't create window for " 195 << mXDisplayName << std::endl << vprDEBUG_FLUSH; 196 196 throw glwinx_OpenFailureException(); 197 197 } … … 200 200 /***************** Set Window Name/Class/Size/Pos *********************/ 201 201 202 /* Before we map the window, we need a name for it (this is also useful for203 * the resource cruft that'll get rid of the borders).202 /* Before we map the window, we need a name for it (this is also useful 203 * for the resource cruft that'll get rid of the borders). 204 204 */ 205 205 classhint = ::XAllocClassHint(); … … 227 227 228 228 /* Get rid of window border, if configured to do so. 229 * This technique doesn't require any modifications to the .XDefaults file230 * or anything, but it will only work with window managers based on MWM231 * (the Motif window manager). That covers most cases.229 * This technique doesn't require any modifications to the .XDefaults 230 * file or anything, but it will only work with window managers based on 231 * MWM (the Motif window manager). That covers most cases. 232 232 * Unfortunately, the generic X resources for communicating with a window 233 233 * manager don't support this feature. … … 236 236 { 237 237 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_HVERB_LVL) 238 << "[vrj::GlWindowXWin::open()] Attempting to make window borderless" 239 << std::endl << vprDEBUG_FLUSH; 238 << "[vrj::GlWindowXWin::open()] Attempting to make window " 239 << "borderless." << std::endl << vprDEBUG_FLUSH; 240 240 241 Atom MotifHints = XInternAtom(mXDisplay, "_MOTIF_WM_HINTS", 0); 241 242 if ( MotifHints == None ) 242 243 { 243 244 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_CRITICAL_LVL) 244 << clrOutNORM(clrRED, "ERROR:")245 << " vrj::GlWindowXWin: Could not get X atom for _MOTIF_WM_HINTS."246 << std::endl << vprDEBUG_FLUSH;245 << clrOutNORM(clrRED, "ERROR") 246 << ": [vrj::GlWindowXWin::open()] Could not get X atom for " 247 << "_MOTIF_WM_HINTS." << std::endl << vprDEBUG_FLUSH; 247 248 } 248 249 else … … 264 265 ::XSync(mXDisplay, 0); 265 266 266 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_VERB_LVL) << "vrj::GlWindowXWin: done mapping window\n" 267 << vprDEBUG_FLUSH; 267 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_VERB_LVL) 268 << "[vrj::GlWindowXWin::open()] Done mapping window.\n" 269 << vprDEBUG_FLUSH; 268 270 269 271 /********************* OpenGL Context Stuff *********************/ … … 273 275 { 274 276 vprDEBUG(vprDBG_ERROR, vprDBG_CRITICAL_LVL) 275 << clrOutNORM(clrRED,"ERROR:") << "Couldn't create GlxContext for '" 277 << clrOutNORM(clrRED, "ERROR") 278 << ": Couldn't create GlxContext for '" 276 279 << mXDisplayName << "'\n" << vprDEBUG_FLUSH; 277 280 throw glwinx_OpenFailureException(); … … 532 535 { 533 536 vprDEBUG(vprDBG_ERROR, vprDBG_CRITICAL_LVL) 534 << clrOutNORM(clrRED, "ERROR :") << "X Display '" << mXDisplayName537 << clrOutNORM(clrRED, "ERROR") << ": X Display '" << mXDisplayName 535 538 << "' doesn't support GLX.\n" << vprDEBUG_FLUSH; 536 539 return NULL; … … 557 560 { 558 561 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 559 << clrOutBOLD(clrYELLOW, "WARNING :") << "Display window '"562 << clrOutBOLD(clrYELLOW, "WARNING") << ": Display window '" 560 563 << mVrjDisplay->getName() << "'" << std::endl; 561 564 vprDEBUG_NEXTnl(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 562 << "has an out of date OpenGL frame buffer configuration.\n"; 565 << " has an out of date OpenGL frame buffer " 566 << "configuration.\n"; 563 567 vprDEBUG_NEXTnl(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 564 << " Expected version 3 but found version "568 << " Expected version 3 but found version " 565 569 << gl_fb_elt->getVersion() << ". Default values\n"; 566 570 vprDEBUG_NEXTnl(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 567 << " will be used for some frame buffer settings.\n"571 << " will be used for some frame buffer settings.\n" 568 572 << vprDEBUG_FLUSH; 569 573 } … … 619 623 { 620 624 vprDEBUG(vprDBG_ERROR, vprDBG_CRITICAL_LVL) 621 << clrOutBOLD(clrRED, "ERROR :")622 << " Failed to get X11 visual info for visual ID 0x"625 << clrOutBOLD(clrRED, "ERROR") 626 << ": Failed to get X11 visual info for visual ID " 623 627 << std::hex << visual_id << std::dec << std::endl 624 628 << vprDEBUG_FLUSH; 625 629 vprDEBUG_NEXT(vprDBG_ERROR, vprDBG_CRITICAL_LVL) 626 << " Window '" << mVrjDisplay->getName() << "' cannot be opened"627 << std::endl << vprDEBUG_FLUSH;630 << " Window '" << mVrjDisplay->getName() 631 << "' cannot be opened" << std::endl << vprDEBUG_FLUSH; 628 632 } 629 633 … … 635 639 { 636 640 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 637 << clrOutBOLD(clrYELLOW, "WARNING :")638 << " Color buffer red channel size was negative ("641 << clrOutBOLD(clrYELLOW, "WARNING") 642 << ": Color buffer red channel size was negative (" 639 643 << red_size << "). Setting to 1.\n" << vprDEBUG_FLUSH; 640 644 red_size = 1; … … 644 648 { 645 649 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 646 << clrOutBOLD(clrYELLOW, "WARNING :")647 << " Color buffer green channel size was negative ("650 << clrOutBOLD(clrYELLOW, "WARNING") 651 << ": Color buffer green channel size was negative (" 648 652 << green_size << "). Setting to 1.\n" << vprDEBUG_FLUSH; 649 653 green_size = 1; … … 653 657 { 654 658 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 655 << clrOutBOLD(clrYELLOW, "WARNING :")656 << " Color buffer blue channel size was negative ("659 << clrOutBOLD(clrYELLOW, "WARNING") 660 << ": Color buffer blue channel size was negative (" 657 661 << blue_size << "). Setting to 1.\n" << vprDEBUG_FLUSH; 658 662 blue_size = 1; … … 662 666 { 663 667 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 664 << clrOutBOLD(clrYELLOW, "WARNING :")665 << " Color buffer alpha channel size was negative ("668 << clrOutBOLD(clrYELLOW, "WARNING") 669 << ": Color buffer alpha channel size was negative (" 666 670 << alpha_size << "). Setting to 1.\n" << vprDEBUG_FLUSH; 667 671 alpha_size = 1; … … 671 675 { 672 676 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 673 << clrOutBOLD(clrYELLOW, "WARNING :")674 << " Auxiliary buffer count was negative (" << num_aux_bufs677 << clrOutBOLD(clrYELLOW, "WARNING") 678 << ": Auxiliary buffer count was negative (" << num_aux_bufs 675 679 << "). Setting to 0.\n" << vprDEBUG_FLUSH; 676 680 num_aux_bufs = 0; … … 680 684 { 681 685 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 682 << clrOutBOLD(clrYELLOW, "WARNING :")683 << " Depth buffer size was negative (" << db_size686 << clrOutBOLD(clrYELLOW, "WARNING") 687 << ": Depth buffer size was negative (" << db_size 684 688 << "). Setting to 1.\n" << vprDEBUG_FLUSH; 685 689 db_size = 1; … … 689 693 { 690 694 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 691 << clrOutBOLD(clrYELLOW, "WARNING :")692 << " Stencil buffer size was negative (" << stencil_size695 << clrOutBOLD(clrYELLOW, "WARNING") 696 << ": Stencil buffer size was negative (" << stencil_size 693 697 << "). Setting to 1.\n" << vprDEBUG_FLUSH; 694 698 stencil_size = 1; … … 698 702 { 699 703 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 700 << clrOutBOLD(clrYELLOW, "WARNING :")701 << " Accumulation buffer red channel size was negative ("704 << clrOutBOLD(clrYELLOW, "WARNING") 705 << ": Accumulation buffer red channel size was negative (" 702 706 << accum_red_size << "). Setting to 1.\n" << vprDEBUG_FLUSH; 703 707 accum_red_size = 1; … … 707 711 { 708 712 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 709 << clrOutBOLD(clrYELLOW, "WARNING :")710 << " Accumulation buffer green channel size was negative ("713 << clrOutBOLD(clrYELLOW, "WARNING") 714 << ": Accumulation buffer green channel size was negative (" 711 715 << accum_green_size << "). Setting to 1.\n" << vprDEBUG_FLUSH; 712 716 accum_green_size = 1; … … 716 720 { 717 721 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 718 << clrOutBOLD(clrYELLOW, "WARNING :")719 << " Accumulation buffer blue channel size was negative ("722 << clrOutBOLD(clrYELLOW, "WARNING") 723 << ": Accumulation buffer blue channel size was negative (" 720 724 << accum_blue_size << "). Setting to 1.\n" << vprDEBUG_FLUSH; 721 725 accum_blue_size = 1; … … 725 729 { 726 730 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 727 << clrOutBOLD(clrYELLOW, "WARNING :")728 << " Accumulation buffer alpha channel size was negative ("731 << clrOutBOLD(clrYELLOW, "WARNING") 732 << ": Accumulation buffer alpha channel size was negative (" 729 733 << accum_alpha_size << "). Setting to 1.\n" << vprDEBUG_FLUSH; 730 734 accum_alpha_size = 1; … … 1021 1025 { 1022 1026 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_CRITICAL_LVL) 1023 << "WARNING: Could not get an OpenGL visual for '" << mXDisplayName1024 << " '\n";1027 << clrOutBOLD(clrYELLOW, "WARNING") << ": Could not get an " 1028 << "OpenGL visual for '" << mXDisplayName << "'\n"; 1025 1029 vprDEBUG_NEXTnl(vrjDBG_DRAW_MGR, vprDBG_CRITICAL_LVL) 1026 << " with stereo rendering enabled; trying without.\n"1030 << " with stereo rendering enabled; trying without.\n" 1027 1031 << vprDEBUG_FLUSH; 1028 1032 mInStereo = false; … … 1047 1051 { 1048 1052 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_CRITICAL_LVL) 1049 << "WARNING: Could not get an OpenGL visual for '" << mXDisplayName1050 << " '\n";1053 << clrOutBOLD(clrYELLOW, "WARNING") << ": Could not get an " 1054 << "OpenGL visual for '" << mXDisplayName << "'\n"; 1051 1055 vprDEBUG_NEXTnl(vrjDBG_DRAW_MGR, vprDBG_CRITICAL_LVL) 1052 << " with accumulation buffer settings; trying without.\n"1056 << " with accumulation buffer settings; trying without.\n" 1053 1057 << vprDEBUG_FLUSH; 1054 1058 … … 1069 1073 // Disabling the alpha channel may give us something usable. 1070 1074 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_CRITICAL_LVL) 1071 << "WARNING: Could not get an OpenGL visual for '" << mXDisplayName1072 << " '\n";1075 << clrOutBOLD(clrYELLOW, "WARNING") << ": Could not get an OpenGL " 1076 << "visual for '" << mXDisplayName << "'\n"; 1073 1077 vprDEBUG_NEXTnl(vrjDBG_DRAW_MGR, vprDBG_CRITICAL_LVL) 1074 1078 << "with a color buffer alpha channel; trying without.\n" … … 1124 1128 } 1125 1129 1126 1127 1130 } // namespace vrj
