void ShowPage() { HookTimer(); TimedProcessSprites(); RenderSprites(); Flip(); }
void CLightingEditor::OnRender() { if ( !IsEditorActive() ) return; const EDITOR_DBG_MODES dbg = GetDebugMode(); if ( dbg != EDITOR_DBG_OFF && g_ShaderEditorSystem->IsReady() ) { const char *pszDebugList[] = { "dbg_editor_ppe_lighting", "dbg_editor_ppe_depth", "dbg_editor_ppe_normals", }; Assert( dbg >= 1 && dbg <= 3 ); const char *pszDebugName = pszDebugList[ dbg - 1 ]; int iDbgIndex = shaderEdit->GetPPEIndex( pszDebugName ); if ( iDbgIndex != -1 ) shaderEdit->DrawPPEOnDemand( iDbgIndex ); } RenderSprites(); RenderSelection(); RenderHelpers(); }
void MriDemo1::Render() { this->GlutApplication::Render(); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glEnable(GL_TEXTURE_2D); glMatrixMode(GL_PROJECTION); glPushMatrix(); glTranslatef(0, 0, GetCameraVector().Z); glRotatef(GetCameraVector().Y, 1, 0, 0); glRotatef(GetCameraVector().X, 0, 1, 0); glMatrixMode(GL_MODELVIEW); glPushMatrix(); // Make all sprites transparent. glColor4f(1, 1, 1, .7); RenderSprites(); glMatrixMode(GL_PROJECTION); glPopMatrix(); glMatrixMode(GL_MODELVIEW); glPopMatrix(); FinishRender(); }
void Scene::Render() const { Renderer::Instance().Clear(backr, backg, backb); Renderer::Instance().SetOrigin(GetCamera().GetX(), GetCamera().GetY()); if ( backgroundImg ) Renderer::Instance().DrawImage(backgroundImg, 0, 0); Renderer::Instance().SetOrigin(0, 0); RenderBackground(); Renderer::Instance().SetOrigin(GetCamera().GetX(), GetCamera().GetY()); RenderAfterBackground(); for ( int i = 0; i < LAYER_COUNT; i++ ) { RenderSprites((Layer)i); RenderEmitters((Layer)i); } }
void gfx::GraphicsEngine::Render( RenderQueue* drawQueue ){ m_Camera.CalculateViewProjection(); glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT ); TextureHandle target = drawQueue->GetTargetTexture(); m_FrameBuffer.SetTexture(target); RenderToTexture(drawQueue); RenderActiveTarget(); RenderGeometry(drawQueue); RenderGizmos(drawQueue); RenderSprites(drawQueue); RenderLines(drawQueue); glUseProgram(0); }
void VimridViewer::RenderDelegate() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glTranslatef(0, 0, GetCameraVector().Z); glRotatef(GetCameraVector().Y, 1, 0, 0); glRotatef(GetCameraVector().X, 0, 1, 0); // Make sprites transparent if neccecary. VFloat alpha = mAlphaEnabled ? 0.6 : 1.0; glColor4f(1, 1, 1, alpha); RenderSprites(); RenderStatusText(); }
void CViewport::Render() { CGraphicsContext *graphics=mProgram->CheckGraphicsMode(); if (graphics->GetType()==CGraphicsContext::kBlastGraphicsContext) { CCanvas *fromCanvas=graphics->mCanvasManager.GetCanvas(mCanvas); if ((mUpdateAll) || (((CBLCanvas*)fromCanvas)->GetDrawBuffer()->GetUsedBlitRects())) { CCanvas *toCanvas=graphics->mCanvasManager.GetCanvas(0); toCanvas->Copy(fromCanvas,GetViewportRect(),mBounds.left,mBounds.top); ((CBLCanvas*)fromCanvas)->GetDrawBuffer()->ClearBlitList(); mUpdateAll=false; } } else { CGraphicsContextGL *glGraphics=(CGraphicsContextGL*)graphics; CGLCanvas *fromCanvas=(CGLCanvas*)graphics->mCanvasManager.GetCanvas(mCanvas); float screenWidth=glGraphics->GetWidth()/2.0f; float screenHeight=glGraphics->GetHeight()/2.0f; float across=(mBounds.left/screenWidth)-1.0f; float down=-((mBounds.bottom/screenHeight)-1.0f); glPixelStorei(GL_UNPACK_ROW_LENGTH,fromCanvas->GetWidth()); glPixelStorei(GL_UNPACK_SKIP_ROWS,fromCanvas->GetHeight()-GetHeight()-GetYOffset()); glPixelStorei(GL_UNPACK_SKIP_PIXELS,GetXOffset()); glRasterPos2f(across,down); glDrawPixels(GetWidth(),GetHeight(),GL_RGB,GL_UNSIGNED_BYTE,fromCanvas->GetPixels()); glRasterPos2f(0,0); glPixelStorei(GL_UNPACK_SKIP_PIXELS,0); glPixelStorei(GL_UNPACK_SKIP_ROWS,0); glPixelStorei(GL_UNPACK_ROW_LENGTH,0); RenderSprites(); } }