// **************************************************************************** // Method: RenderTranslucent // // Purpose: Renders translucent geometry within a VisWindow. // Expects that opaque geometry has already been rendered. In the // IceT case, our work is a lot simpler because we don't need to // read the image back from the framebuffer (we'll read it back from // IceT later anyway). // // Programmer: Tom Fogal // Creation: August 4, 2008 // // Modifications: // // **************************************************************************** avtDataObject_p IceTNetworkManager::RenderTranslucent(int windowID, const avtImage_p& input) { VisWindow *viswin = viswinMap.find(windowID)->second.viswin; CallProgressCallback("IceTNetworkManager", "Transparent rendering", 0, 1); { StackTimer second_pass("Second-pass screen capture for SR"); // // We have to disable any gradient background before // rendering, as those will overwrite the first pass // AnnotationAttributes::BackgroundMode bm = viswin->GetBackgroundMode(); viswin->SetBackgroundMode(AnnotationAttributes::Solid); viswin->ScreenRender( this->r_mgmt.viewportedMode, true, // Z buffer false, // opaque geometry true, // translucent geometry input // image to composite with ); // Restore the background mode for next time viswin->SetBackgroundMode(bm); } CallProgressCallback("IceTNetworkManager", "Transparent rendering", 1, 1); // // In this implementation, the user should never use the return value -- // read it back from IceT instead! // return NULL; }
// **************************************************************************** // Method: RenderGeometry // // Purpose: Renders the geometry for a scene; this is always the opaque // objects, and may or may not include translucent objects (depending // on the current multipass rendering settings). // We override this method because we can avoid a readback in the // one-pass case (we'll read it back from IceT later anyway). // // Programmer: Tom Fogal // Creation: July 26, 2008 // // Modifications: // // Tom Fogal, Mon Jul 28 14:57:01 EDT 2008 // Need to return NULL in the single-pass case! // // **************************************************************************** avtImage_p IceTNetworkManager::RenderGeometry() { VisWindow *viswin = viswinMap.find(this->r_mgmt.windowID)->second.viswin; if(this->MemoMultipass(viswin)) { return NetworkManager::RenderGeometry(); } CallProgressCallback("IceTNetworkManager", "Render geometry", 0, 1); viswin->ScreenRender(this->r_mgmt.viewportedMode, true); CallProgressCallback("IceTNetworkManager", "Render geometry", 0, 1); return NULL; }