Changeset View
Changeset View
Standalone View
Standalone View
source/graphics/GameView.h
Show All 12 Lines | |||||
* | * | ||||
* You should have received a copy of the GNU General Public License | * You should have received a copy of the GNU General Public License | ||||
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | ||||
*/ | */ | ||||
#ifndef INCLUDED_GAMEVIEW | #ifndef INCLUDED_GAMEVIEW | ||||
#define INCLUDED_GAMEVIEW | #define INCLUDED_GAMEVIEW | ||||
#include "renderer/backend/IDeviceCommandContext.h" | |||||
#include "renderer/Scene.h" | #include "renderer/Scene.h" | ||||
#include "simulation2/system/Entity.h" | #include "simulation2/system/Entity.h" | ||||
#include "lib/input.h" // InReaction - can't forward-declare enum | #include "lib/input.h" // InReaction - can't forward-declare enum | ||||
class CCamera; | class CCamera; | ||||
class CCinemaManager; | class CCinemaManager; | ||||
class CGame; | class CGame; | ||||
class CObjectManager; | class CObjectManager; | ||||
class CVector3D; | class CVector3D; | ||||
struct SViewPort; | struct SViewPort; | ||||
class CGameViewImpl; | class CGameViewImpl; | ||||
class CGameView : private Scene | class CGameView : private Scene | ||||
{ | { | ||||
NONCOPYABLE(CGameView); | NONCOPYABLE(CGameView); | ||||
public: | public: | ||||
CGameView(CGame *pGame); | CGameView(CGame *pGame); | ||||
~CGameView(); | ~CGameView() override; | ||||
void SetViewport(const SViewPort& vp); | void SetViewport(const SViewPort& vp); | ||||
void RegisterInit(); | void RegisterInit(); | ||||
int Initialize(); | int Initialize(); | ||||
/** | /** | ||||
* Updates all the view information (i.e. rotate camera, scroll, whatever). This will *not* change any | * Updates all the view information (i.e. rotate camera, scroll, whatever). This will *not* change any | ||||
* World information - only the *presentation*. | * World information - only the *presentation*. | ||||
* | * | ||||
* @param deltaRealTime Elapsed real time since the last frame. | * @param deltaRealTime Elapsed real time since the last frame. | ||||
*/ | */ | ||||
void Update(const float deltaRealTime); | void Update(const float deltaRealTime); | ||||
void BeginFrame(); | void BeginFrame(); | ||||
void Render(); | void Prepare(Renderer::Backend::IDeviceCommandContext* deviceCommandContext); | ||||
void Render(Renderer::Backend::IDeviceCommandContext* deviceCommandContext); | |||||
void RenderOverlays(Renderer::Backend::IDeviceCommandContext* deviceCommandContext); | |||||
InReaction HandleEvent(const SDL_Event_* ev); | InReaction HandleEvent(const SDL_Event_* ev); | ||||
CVector3D GetCameraPivot() const; | CVector3D GetCameraPivot() const; | ||||
CVector3D GetCameraPosition() const; | CVector3D GetCameraPosition() const; | ||||
CVector3D GetCameraRotation() const; | CVector3D GetCameraRotation() const; | ||||
float GetCameraZoom() const; | float GetCameraZoom() const; | ||||
Show All 36 Lines |
Wildfire Games · Phabricator