Changeset 19939
- Timestamp:
- 04/10/07 10:28:57 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
juggler/branches/2.0/modules/vrjuggler/vrj/Draw/Pf/PfDrawManager.cpp
r19032 r19939 926 926 // auxiliary buffers that meets or exceeds the requested count. 927 927 int num_aux_bufs(0); 928 bool want_fsaa(false); 928 bool enable_multisamp(false); 929 int num_sample_bufs(1); 930 int num_samples(2); 929 931 930 932 jccl::ConfigElementPtr fb_element = disp->getGlFrameBufferConfig(); … … 932 934 if ( fb_element.get() != NULL ) 933 935 { 934 if ( fb_element->getVersion() < 2)936 if ( fb_element->getVersion() < 3 ) 935 937 { 936 938 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 937 << clrOutBOLD(clrYELLOW, "WARNING :") << "Display window '"939 << clrOutBOLD(clrYELLOW, "WARNING") << ": Display window '" 938 940 << disp->getName() << "'" << std::endl; 939 941 vprDEBUG_NEXTnl(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) … … 959 961 accum_blue_size = fb_element->getProperty<int>("accum_blue_size"); 960 962 accum_alpha_size = fb_element->getProperty<int>("accum_alpha_size"); 961 want_fsaa = fb_element->getProperty<bool>("fsaa_enable"); 963 num_sample_bufs = fb_element->getProperty<int>("num_sample_buffers"); 964 num_samples = fb_element->getProperty<int>("num_samples"); 965 966 enable_multisamp = num_sample_bufs > 0; 962 967 963 968 if ( red_size < 0 ) … … 1058 1063 << accum_alpha_size << "). Setting to 1.\n" << vprDEBUG_FLUSH; 1059 1064 accum_alpha_size = 1; 1065 } 1066 1067 if ( num_sample_bufs < 0 ) 1068 { 1069 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 1070 << clrOutBOLD(clrYELLOW, "WARNING") 1071 << ": Number of multisampling buffers was negative (" 1072 << num_sample_bufs << "). Setting to 1.\n" << vprDEBUG_FLUSH; 1073 num_sample_bufs = 1; 1074 } 1075 1076 if ( num_samples < 0 ) 1077 { 1078 vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_WARNING_LVL) 1079 << clrOutBOLD(clrYELLOW, "WARNING") 1080 << ": Number of samples for multisampling was negative (" 1081 << num_samples << "). Setting to 2.\n" << vprDEBUG_FLUSH; 1082 num_samples = 2; 1060 1083 } 1061 1084 } … … 1118 1141 << std::setiosflags(std::ios::left) << std::setfill('.') 1119 1142 << indent_text << std::setw(pad_width_dot) 1120 << "Full-screen anti-aliasing " << " " << std::boolalpha << want_fsaa 1143 << "Number of multisample buffers " << " " << num_sample_bufs 1144 << std::endl; 1145 vprDEBUG_NEXTnl(vrjDBG_DRAW_MGR, vprDBG_CONFIG_LVL) 1146 << std::setiosflags(std::ios::left) << std::setfill('.') 1147 << indent_text << std::setw(pad_width_dot) 1148 << "Number of samples per buffer " << " " << num_samples 1121 1149 << std::endl; 1122 1150 vprDEBUG_CONTnl(vrjDBG_DRAW_MGR, vprDBG_CONFIG_LVL) … … 1134 1162 attrs.push_back(PFFB_ACCUM_BLUE_SIZE); attrs.push_back(accum_blue_size); 1135 1163 attrs.push_back(PFFB_ACCUM_ALPHA_SIZE); attrs.push_back(accum_alpha_size); 1136 if (want_fsaa) 1137 { 1138 attrs.push_back(PFFB_SAMPLE_BUFFER); attrs.push_back(1); 1139 attrs.push_back(PFFB_SAMPLES); attrs.push_back(1); 1164 1165 if ( enable_multisamp ) 1166 { 1167 attrs.push_back(PFFB_SAMPLE_BUFFER); attrs.push_back(num_sample_bufs); 1168 attrs.push_back(PFFB_SAMPLES); attrs.push_back(num_samples); 1140 1169 } 1141 1170 }
