void Renderer::RenderScene() { //SDL_BlitSurface(background, NULL, screen, NULL); apply_surface(0, 0, background, screen); apply_surface(225, 50, level, screen); RenderBlocks(); if(SDL_Flip(screen) == -1) return; SDL_Delay(2000); }
void MyPS2Application::RenderGame() { SPS2Manager.BeginScene(); _background_texture.Upload(TEXBUF496); _background_texture.Select(); _background_sprite.Render(); RenderBlocks(); player->Render(); ball->Render(); RenderUI(); SPS2Manager.EndScene(); }
void CNFORenderer::RenderStripeBlocks(size_t a_stripe, bool a_opaqueBg, bool a_gaussStep, cairo_t* a_context) const { cairo_t* l_context = (a_context ? a_context : cairo_create(GetStripeSurface(a_stripe))); RenderBlocks(a_opaqueBg, a_gaussStep, l_context, (m_numStripes > 1 ? a_stripe * m_linesPerStripe - GetStripeExtraLinesTop(a_stripe) : (size_t)-1), a_stripe * m_linesPerStripe + m_linesPerStripe + GetStripeExtraLinesBottom(a_stripe), // see comment in RenderStripe(): 0, (a_stripe == 0 ? 0 : -GetPadding() - (double)a_stripe * m_stripeHeight) + GetStripeHeightExtraTop(a_stripe)); if(!a_context) { cairo_destroy(l_context); } }