本文整理汇总了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);
}
示例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);
}
}
示例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();
}
示例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);
}
示例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);
}
示例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();
}
示例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);
}
示例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);
}
示例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() );
}
示例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);
}
示例11: GImage
Flag::Flag()
{
//이미지 초기화
this->img = new GImage(Renderer(), "./Resource/Action_img/Action_FLAG_Body.png");
//좌표 초기화
x = 800;
y = 158;
}
示例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);
}
示例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);
}
}
示例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 << "]";
}
示例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();
}
}