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


C++ Renderer函数代码示例

本文整理汇总了C++中Renderer函数的典型用法代码示例。如果您正苦于以下问题:C++ Renderer函数的具体用法?C++ Renderer怎么用?C++ Renderer使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: ASSERT

	//
	// 渲染接收阴影
	//
	VOID CRenderQuene::RenderReceiveShadow(const CEntityCamera *pCamera, const CEntityShadow *pShadow, DWORD dwSolution, DWORD dwPassGroup, DWORD dwBeginRenderID, DWORD dwEndRenderID)
	{
		ASSERT(pCamera);
		ASSERT(pShadow);

		//
		// 1. 查找场景渲染队列
		//
		SceneRenderQueneMap::iterator itSceneRenderQuene = m_sceneRenderQuenes.find(pCamera);
		if (itSceneRenderQuene == m_sceneRenderQuenes.end()) return;

		//
		// 2. 查找阴影渲染队列
		//
		ShadowRenderQueneMap::iterator itShadowRenderQuene = m_shadowRenderQuenes.find(pShadow);
		if (itShadowRenderQuene == m_shadowRenderQuenes.end()) return;

		//
		// 3. 设置相机
		//
		Renderer()->SetPerspective(pCamera->GetFovy(), pCamera->GetAspect(), pCamera->GetZNear(), pCamera->GetZFar());
		Renderer()->SetLookAt(*pCamera->GetPosition(), *pCamera->GetForwardDirection(), *pCamera->GetUpDirection());

		//
		// 4. 渲染
		//
		BOOL bOccludeQuery = itSceneRenderQuene->second.bRenderQuery;
		BOOL bCastShadow = FALSE;
		BOOL bReceiveShadow = TRUE;
		BOOL bTransparence = FALSE;
		const MATRIX4 *mtxShadowProjection = &itShadowRenderQuene->second.mtxShadowProjection;

		Render(itShadowRenderQuene->second.receives, dwSolution, dwPassGroup, dwBeginRenderID, dwEndRenderID, 
			bOccludeQuery, bCastShadow, bReceiveShadow, bTransparence, mtxShadowProjection);
	}
开发者ID:LiangYue1981816,项目名称:CrossEngine,代码行数:38,代码来源:CrossRenderQuene.cpp

示例2: GState

StageState::StageState(int type) : GState()
{
	this->genreType = type;

	this->bgImage = new GImage(Renderer(), "./Resource/LogoState.bmp");
	int x, y;
	char temp[256] = { 0, };

	for (int i = 0; i < 15; i++) {
		if (i >= 0 && i <= 7) {
			Blocks[i] = NILL;
			if (i >= 0 && i <= 3) {
				y = 100;
				x = 200 + ((i % 4) * 200);
			}
			if( i>=4 && i<=7) {
				y = 250;
				x = 200 + ((i % 4) * 200);
			}
		}
		if (i >= 8 && i <= 11) {
			y = 500;
			x = 200 + ((i%4) * 240);
		}
		sprintf(temp, "./Resource/StageImg/stageX.bmp");
		this->NButtons[i] = new GButton(new GImage(Renderer(), temp), x, y);
	}
}
开发者ID:sentendro,项目名称:MP3,代码行数:28,代码来源:StageState.cpp

示例3: Renderer

void GStateManager::Draw() {
	Renderer()->Clear();
	Renderer()->Begin();
	//TODO: Scene Draw 처리
	if (currentState != NOT_SET_STATE)
		m_states[currentState]->OnDraw();

	Renderer()->End();
	Renderer()->Present();
}
开发者ID:sentendro,项目名称:MP3,代码行数:10,代码来源:GStateManager.cpp

示例4: DrawSelectionbox

	void DrawSelectionbox(const glm::vec4& posDim, const GFXColor& color)
	{
		
		glm::vec4 cspos = glm::vec4(
			posDim.x / float(Renderer().GetWindowWidth() / 2) - 1.0f,
			1.0f - posDim.y / float(Renderer().GetWindowHeight() / 2),
			posDim.z / float(Renderer().GetWindowWidth())*2,
			posDim.w / float(Renderer().GetWindowHeight())*2);

		Renderer().DrawSelectionbox(cspos, color);
	}
开发者ID:autious,项目名称:kravall,代码行数:11,代码来源:GFXInterface.cpp

示例5: float

	void Debug::DrawPoint(GFXVec2 point, GFXColor color, float size)
	{
		DebugPoint p;
		p.position = glm::vec3(
			point.x / float(Renderer().GetWindowWidth()/2) - 1.0f,
			1.0f - point.y / float(Renderer().GetWindowHeight()/2),
			0.0);
		p.size = size;
		p.color = color;
		DebugDrawing().AddPoint(p);
	}
开发者ID:autious,项目名称:kravall,代码行数:11,代码来源:GFXInterface.cpp

示例6: Renderer

	//
	// 渲染遮挡
	//
	VOID CRenderQuene::RenderOcclude(const RenderQuene &occludes)
	{
		Renderer()->BeginOcclude();
		{
			for (RenderQuene::const_iterator itEntity = occludes.begin(); itEntity != occludes.end(); ++itEntity) {
				const CEntityRenderable *pEntity = *itEntity;
				ASSERT(pEntity);

				pEntity->RenderOcclude();
			}
		}
		Renderer()->EndOcclude();
	}
开发者ID:LiangYue1981816,项目名称:CrossEngine,代码行数:16,代码来源:CrossRenderQuene.cpp

示例7: DrawFilledRect

	void DrawFilledRect(GFXVec2 position, GFXVec2 dimensions, GFXColor color)
	{
		FilledRect r;
		r.color = color;
		r.position = glm::vec3(
			position.x / float(Renderer().GetWindowWidth() / 2) - 1.0f,
			1.0f - position.y / float(Renderer().GetWindowHeight() / 2), 0.0f);
		r.dimensions = glm::vec3(
			dimensions.x / float(Renderer().GetWindowWidth()) * 2,
			dimensions.y / float(Renderer().GetWindowHeight()) * 2, 0.0f);

		Renderer().AddFilledRect(r);
	}
开发者ID:autious,项目名称:kravall,代码行数:13,代码来源:GFXInterface.cpp

示例8: Renderer

Panzerfaust::Panzerfaust()
{
	
	m_renderer = Renderer();
	//debugUnitTest(m_elements);
	m_internalTime = 0.f;
	m_isQuitting = m_renderer.m_fatalError;
	m_console.m_log = ConsoleLog();
	//m_world = World();
	m_worldCamera = Camera();

	m_displayConsole = false;

	//HACK test values
	m_console.m_log.appendLine("This is a test of the emergency broadcast system");
	m_console.m_log.appendLine("Do not be alarmed or concerned");
	m_console.m_log.appendLine("This is only a test");

	UnitTestXMLParser(".\\Data\\UnitTest.xml");
	unitTestEventSystem();
	//g_serverConnection = new Connection("129.119.246.221", "5000");
	g_serverConnection = new Connection("127.0.0.1", "8080");
	g_localUser = User();
	g_localUser.m_unit = Entity();
	g_localUser.m_unit.m_color = Color4f(0.2f, 1.0f, 0.2f, 1.f);
	g_localUser.m_userType = USER_LOCAL;
	g_localUser.m_unit.m_position = Vector2f(0,0);
	g_flag.m_color = Color4f(1.f, 1.f, 1.f, 1.f);
	CommandParser::RegisterCommand("connect", ChangeServer);
	CommandParser::RegisterCommand("color", ChangeColor);
}
开发者ID:Grindl,项目名称:SD6A3,代码行数:31,代码来源:Panzerfaust.cpp

示例9: Renderer

 bool Game::InitGraphics( const uint16Vec2& windowSize, const uint8 rendererType )
 {
     if( !m_pWindow )
         return false;
     m_pRenderer = shared_ptr< Renderer >( ZN_NEW Renderer() );
     return m_pRenderer->Init( rendererType, windowSize, m_pWindow->IsFullscreen(), m_pWindow->GetWindowImpl() );
 }
开发者ID:maseek,项目名称:gp2cw,代码行数:7,代码来源:Game.cpp

示例10: SDL_CreateRenderer

    Renderer Window::makeRenderer(RendererState state) {
        auto renderer = SDL_CreateRenderer(ptr, -1, underlying_value(state));
        if (renderer == nullptr) {
            throw CreateRendererFailure();
        }

        return Renderer(renderer);
    }
开发者ID:snowhawk04,项目名称:ManagedSDL,代码行数:8,代码来源:SDL2_Window.cpp

示例11: GImage

Flag::Flag()
{

	//이미지 초기화
	this->img = new GImage(Renderer(), "./Resource/Action_img/Action_FLAG_Body.png");

	//좌표 초기화
	x = 800;
	y = 158;
}
开发者ID:fsaas,项目名称:MP3,代码行数:10,代码来源:Flag.cpp

示例12: Renderer

void Sandbox::View::Initialize( _In_ Sandbox::AppViewPtr view )
{
	m_bActivated = false;
	m_bClosed = false;
	m_bVisible = false;

	m_renderer = alloc_ref_new Renderer();
	m_renderer->Driver(D3D_DRIVER_TYPE_HARDWARE);
	//m_renderer->Driver(D3D_DRIVER_TYPE_HARDWARE);
	//m_renderer->Driver(D3D_DRIVER_TYPE_REFERENCE);
}
开发者ID:VladSerhiienko,项目名称:Nena.v.1,代码行数:11,代码来源:Application.cpp

示例13: Renderer

	//
	// 设置粒子总量
	//
	VOID CGfxBillboard::SetParticleQuota(INT quota)
	{
		Renderer()->DestroyVAO(&m_vao);
		Renderer()->DestroyVBO(&m_vbo);
		Renderer()->DestroyVBO(&m_ibo);

		if (quota > 0) {
			INDEX *indices = (INDEX *)SAFE_MALLOC(6 * quota * sizeof(*indices), MEMTYPE_STACK);
			{
				for (INT index = 0; index < quota; index++) {
					indices[6 * index + 0] = 4 * index + 0;
					indices[6 * index + 1] = 4 * index + 1;
					indices[6 * index + 2] = 4 * index + 2;
					indices[6 * index + 3] = 4 * index + 2;
					indices[6 * index + 4] = 4 * index + 3;
					indices[6 * index + 5] = 4 * index + 0;
				}

				m_vao = Renderer()->CreateVAO();
				m_vbo = Renderer()->CreateVBO(GL_ARRAY_BUFFER, 4 * quota * sizeof(VERTEX), NULL, GL_DYNAMIC_DRAW);
				m_ibo = Renderer()->CreateVBO(GL_ELEMENT_ARRAY_BUFFER, 6 * quota * sizeof(INDEX), indices, GL_STATIC_DRAW);
			}
			SAFE_FREE(indices);
		}
	}
开发者ID:LiangYue1981816,项目名称:CrossEngine,代码行数:28,代码来源:CrossParticleGfxBillboard.cpp

示例14: operator

 void operator () (const Array& array) const
 {
   out << "[";
   std::list<Value>::const_iterator iterator;
   iterator = array.values.begin();
   while (iterator != array.values.end()) {
     boost::apply_visitor(Renderer(out), *iterator);
     if (++iterator != array.values.end()) {
       out << ",";
     }
   }
   out << "]";
 }
开发者ID:adegtiar,项目名称:mesos,代码行数:13,代码来源:json.hpp

示例15: while

/// <summary>
/// Stop the render timer and abort the rendering process.
/// Optionally block until stopping is complete.
/// </summary>
/// <param name="wait">True to block, else false.</param>
void FractoriumEmberControllerBase::StopRenderTimer(bool wait)
{
	if (m_RenderTimer)
		m_RenderTimer->stop();

	if (m_Renderer.get())
		m_Renderer->Abort();

	if (wait)
	{
		while (m_Rendering || RenderTimerRunning() || (Renderer() && (!m_Renderer->Aborted() || m_Renderer->InRender())))
			QApplication::processEvents();
	}
}
开发者ID:axesider,项目名称:fractorium,代码行数:19,代码来源:FractoriumRender.cpp


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