void MultiDrawIndirect::shutdownRendering(void) { // If we still have a bound context, then it makes sense to delete GL resources if (getPlatformContext()->isContextBound()) { CleanRendering(); } }
void MultiDrawIndirect::initRendering(void) { NV_APP_BASE_SHARED_INIT(); bool MultidrawAvailable; m_GPUTimer.init(); m_CPUTimer.init(); MultidrawAvailable = requireExtension("GL_ARB_multi_draw_indirect", false); if (MultidrawAvailable == false) { errorExit("The current system does not appear to support the extension GL_ARB_multi_draw_indirect, which is required by the sample.\n\nThis is likely because the systems GPU or driver does not support the extension. Please see the samples source code for details"); return; } if (isMobilePlatform()) { m_GridSize = DEFAULT_MOBILE_GRID_SIZE; m_MaxGridSize = MAX_MOBILE_GRID_SIZE; m_MaxModelInstances = MAX_MODEL_INSTANCES; } else { m_GridSize = DEFAULT_GRID_SIZE; m_MaxGridSize = MAX_GRID_SIZE; m_MaxModelInstances = MAX_MODEL_INSTANCES; } glClearColor(0.0f, 0.0f, 0.0f, 1.0f); NvAssetLoaderAddSearchPath("gl4-kepler/MultiDrawIndirect"); CleanRendering(); Startup(); }
void MultiDrawIndirect::Shutdown() { CleanRendering(); }