// Couldn’t find a matching pipe type; choose the first one on the list.
for (ti = _pipe_types.begin(); ti != _pipe_types.end(); ++ti) {
const PipeType &ptype = (*ti);
PT(GraphicsPipe) pipe = (*ptype._constructor)(); //stop here,wait for something
if (pipe != (GraphicsPipe *)NULL) {
return pipe;
}
}
if (dwVidMemTotal == 0) { // unreliable driver
dwVidMemTotal = UNKNOWN_VIDMEM_SIZE;
} else {
if (!ISPOW2(dwVidMemTotal)) {
// assume they wont return a proper max value, so round up to next pow
// of 2
UINT count = 0;
while ((dwVidMemTotal >> count) != 0x0) {
count++; // *********************************************** dwVidMemTotal is very large,anything error?
}
dwVidMemTotal = (1 << count);
}
}