当前位置: 首页>>代码示例>>C++>>正文


C++ CrtRender::Destroy方法代码示例

本文整理汇总了C++中CrtRender::Destroy方法的典型用法代码示例。如果您正苦于以下问题:C++ CrtRender::Destroy方法的具体用法?C++ CrtRender::Destroy怎么用?C++ CrtRender::Destroy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CrtRender的用法示例。


在下文中一共展示了CrtRender::Destroy方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: DestroyCrt

static void DestroyCrt(void)
{

    _CrtRender.Destroy();
    DestroyGLWindow();

}
开发者ID:sbarthelemy,项目名称:collada-dom,代码行数:7,代码来源:main.cpp

示例2: onShutdown

void COLLADA_Viewer::onShutdown()
{
	FWGLApplication::onShutdown();
	_CrtRender.Destroy();

	cellDbgFontConsoleClose(mDbgFontID);
	cellDbgFontExit();
}
开发者ID:,项目名称:,代码行数:8,代码来源:

示例3: WinMain


//.........这里部分代码省略.........
				int   nvalues;
				CGannotation thisCGAnnotation = cgGetFirstParameterAnnotation(thisCGParameter);
				// Iterate over all the annotations
				while(thisCGAnnotation != NULL)
				{
					// Get the name of this annotation
					const char *annotationName = cgGetAnnotationName(thisCGAnnotation);
					// Do case-blind compares to see if the annotation is one of the ones used to make UI
					// and save the value if it is.
					if(CrtICmp("UIWidget",annotationName))
					{
						// This is the widget type
						UIWidget = cgGetStringAnnotationValue(thisCGAnnotation);
					}
					if(CrtICmp("UIName",annotationName))
					{
						// This is the name to attach to the widget
						UIName = cgGetStringAnnotationValue(thisCGAnnotation);
					}
					if(CrtICmp("UIMin",annotationName))
					{
						// This is the minimum value for a slider widget
						const float *value = cgGetFloatAnnotationValues(thisCGAnnotation, &nvalues);
						if(nvalues == 1)
							UIMin = *value;
					}
					if(CrtICmp("UIMax",annotationName))
					{
						// This is the maximum value for a slider widget
						const float *value = cgGetFloatAnnotationValues(thisCGAnnotation, &nvalues);
						if(nvalues == 1)
							UIMax = *value;
					}
					if(CrtICmp("UIStep",annotationName))
					{
						// This is the step (minimum change) for a slider widget
						const float *value = cgGetFloatAnnotationValues(thisCGAnnotation, &nvalues);
						if(nvalues == 1)
							UIStep = *value;
					}
					// Get the next annotation
					thisCGAnnotation = cgGetNextAnnotation(thisCGAnnotation);
				}
				// Is the UIWidget a type that we recognize? (just slider and color picker for now)
				// Replace the CrtPrint with the code that generates the UI, remember the UI needs to
				// store thisCGParameter someplace so it can use it to change the parameter later. 
				if(CrtICmp("slider", UIWidget))
				{
					CrtPrint("Parameter %s needs a slider named %s going from %f to %f with step %f\n",parameterName,UIName,UIMin,UIMax, UIStep );
				}
				if(CrtICmp("color", UIWidget))
				{
					CrtPrint("Parameter %s needs a color picker named %s\n",parameterName,UIName);
				}
				// Move on to the next parameter
				thisCGParameter = cgGetNextParameter(thisCGParameter);
			}
			// Move on to the next effect
			effectIterator++;
		}
	}
#endif
	while(!done)									
	{
		if (PeekMessage(&msg,NULL,0,0,PM_REMOVE))	
		{
			if (msg.message==WM_QUIT)				
			{
				done=TRUE;							
			}
			else									
			{
				TranslateMessage(&msg);				
				DispatchMessage(&msg);				
			}
		}
		else										
		{
			// Draw The Scene.  Watch For ESC Key And Quit Messages From DrawGLScene()
			if ((active && !DrawGLScene()) || keys[VK_ESCAPE])	// Active?  Was There A Quit Received?
			{
				done=TRUE;							
			}
			else									
			{
				SwapBuffers(hDC);					
				ProcessInput( keys ); 				
			}
		}
	}

	_CrtRender.Destroy();

	// Shutdown
#ifndef NO_DEVIL
	ilShutDown();
#endif
	DestroyGLWindow();								
	return (int)(msg.wParam);						
}
开发者ID:mDibyo,项目名称:docker-files,代码行数:101,代码来源:mainPC.cpp

示例4: ProcessInput

// Call ProcessInput once per frame to process input keys
void ProcessInput( bool	keys[] )
{
	// These keys we don't want to auto-repeat, so we clear them in "keys" after handling them once
	if (keys['E'] && amplitudeGlobalParameter)
	{
		float value;
		cgGetParameterValuefc(amplitudeGlobalParameter, 1, &value);
		value += 0.1f;
		cgSetParameter1f(amplitudeGlobalParameter, value);
		keys['E'] = false;
	}
	if (keys['R'] && amplitudeGlobalParameter)
	{
		float value;
		cgGetParameterValuefc(amplitudeGlobalParameter,1, &value);
		value -= 0.1f;
		cgSetParameter1f(amplitudeGlobalParameter, value);
		keys['R'] = false;
	}
	if (keys[VK_TAB] )
	{
		// When 'C' is pressed, change cameras
		_CrtRender.SetNextCamera();
		keys[VK_TAB] = false;
	}

	if ( keys['M'] )
	{
		// Speed up UI by 25%
		AdjustUISpeed(1.25f);  
		keys['M'] = false;
	}
	if ( keys['N'] )
	{
		// Slow down UI by 25%
		AdjustUISpeed(0.75f);  // Go 25% slower
		keys['N'] = false;
	}
	if (keys['Q'])
	{
		if (togglewireframe) {
			glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
			togglewireframe = FALSE;
		} else {
			glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
			togglewireframe = TRUE;
		}
		keys['Q'] = false;
	}

	if (keys['K'])
	{
		if (togglehiearchy) {
			_CrtRender.SetShowHiearchy(CrtTrue);	
			togglehiearchy = FALSE;
		} else {
			_CrtRender.SetShowHiearchy(CrtFalse);
			togglehiearchy = TRUE;
		}
		keys['K'] = false;
	}
	if (keys['L'])
	{
		if (togglelighting) {
			glDisable(GL_LIGHTING);
			togglelighting = FALSE;
		} else {
			glEnable(GL_LIGHTING);
			togglelighting = TRUE;
		}
		keys['L'] = false;
	}

	if (keys['P'] )
	{
		if (sAnimationEnable) {
			_CrtRender.SetAnimationPaused( CrtTrue );
			sAnimationEnable = false;
		}
		else { 
			_CrtRender.SetAnimationPaused( CrtFalse ); 
			sAnimationEnable = true;
		}
		keys['P'] = false;
	}
	if (keys[VK_F1])		
	{
		keys[VK_F1]=FALSE;		
		_CrtRender.Destroy();
		DestroyGLWindow();			
		fullscreen=!fullscreen;		
		// Recreate Our OpenGL Window
		if (!CreateGLWindow("Collada Viewer for PC", _CrtRender.GetScreenWidth(), _CrtRender.GetScreenHeight(),32,fullscreen))
		{
			exit(1);
		}
		if ( !_CrtRender.Load( cleaned_file_name ))
		{
			exit(0);
//.........这里部分代码省略.........
开发者ID:mDibyo,项目名称:docker-files,代码行数:101,代码来源:mainPC.cpp


注:本文中的CrtRender::Destroy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。