void CLcd::Init() { _nextdrawtime = Splash() + millis(); _splash = true; DrawRequest(CLcd::DrawForceAll); //first draw doesnt return fast! call at init time }
void GraphicsHandler::draw(SDL_Texture* texture, SDL_Rect src_rect, SDL_Rect dest_rect, GraphicPriority priority, bool cleanup, double angle_clockwise, SDL_Point* rotation_point) { draw_queue_.at(priority).push_back(DrawRequest(texture, src_rect, dest_rect, cleanup, angle_clockwise, rotation_point)); }
void CU8GLcd::ButtonPress() { ButtonFunction fnc = GetButtonPress(&_pagedef[GetPage()].buttonpress); if (fnc) { (*this.*fnc)(); DrawRequest(DrawForceAll); } }
//============================================================================ //処理 //============================================================================ void CSprite::Exec() { /*アニメーションの設定*/ SetAnimation(); /*描画先*/ m_DstRect.Set( m_vPos.x, m_vPos.y, m_fSize.x * m_fScale.x, m_fSize.y * m_fScale.y ); /*描画元*/ m_SrcRect.Set( m_Anim.x * m_fSize.x, m_Anim.y * m_fSize.y, m_fSize.x, m_fSize.y ); //描画リクエスト DrawRequest(); map< string, sp<CGameObject> > mapDraw; mapDraw.clear(); mapDraw = CCommonObject::GetResMgr()->GetDrawMap(); map< string, sp<CGameObject> >::iterator it = mapDraw.begin(); #if defined( DEBUG ) | ( _DEBUG ) Peripheral::IKeyboard *pKey = CCommonObject::GetAppli()->GetCore()->GetKeyboard(); static bool IsHit = true; if( pKey->GetKeyData( SELENE_VK_Q ) ) { IsHit = !IsHit; } #endif #if defined( DEBUG ) | ( _DEBUG ) if( IsHit ) #endif { while( it != mapDraw.end() ) { sp<CGameObject> spObj( it->second ); bool IsThis = ( this->GetPos().x > 0 && this->GetPos().x < SCREEN_WIDTH - this->GetSize().x && this->GetPos().y > 0 && this->GetPos().y < SCREEN_HEIGHT - this->GetSize().y ); if( this->HitCheck( spObj ) ) { this->HitExec( spObj ); } it++; } } }
void CLcd::Poll() { DrawRequest(CLcd::DrawAll); }
//Draw request entry point - void Renderer::add_draw_request(U32 render_pass_id, U32 mesh_handle, U32 material_handle, Mat4x4& transform) { Renderer::get_instance().add_draw_request(DrawRequest(render_pass_id,mesh_handle,material_handle,transform)); }