31#ifndef __SO3WINDOW_H__
32#define __SO3WINDOW_H__
42class SWindow :
public Ogre::RenderTargetListener,
43 public Ogre::FrameListener,
57 Ogre::RenderWindow* O3Window;
58 ScolWindowHandle hwnd;
61 std::vector<SViewPort*> mViewportsToDel;
64 LONG_PTR hwndFullscreenOgre;
65 LONG_PTR styleFullscreenOgre;
66 LONG_PTR exstyleFullscreenOgre;
67 HRGN mLastWindowRegion;
68 WINDOWPLACEMENT mLastPos;
75 Ogre::Vector2 screenPos;
81 SWindow(
SRoot* parent,
const ScolWindowHandle& windowHandle,
const std::string& windowName,
const int& width,
const int& height,
const std::string& fsaa);
179 int Size(
const int& x,
const int& y,
const int&
w,
const int& h,
const int& ext);
216 bool SetFullScreen(
const bool& fullscreen,
const int& width = 0,
const int& height = 0);
313 void SetStereoTimeWarpMatrix(
const Ogre::Matrix4 &leftStartMatrix,
const Ogre::Matrix4 &leftEndMatrix,
const Ogre::Matrix4 &rightStartMatrix,
const Ogre::Matrix4 &rightEndMatrix);
315 void SetStereoMeshUVConfig(Ogre::Vector2 leftuvscale, Ogre::Vector2 leftuvoffset, Ogre::Vector2 rightuvscale, Ogre::Vector2 rightuvoffset);
317 void SetStereoMeshLeft(std::vector<Ogre::Vector3> vertices, std::vector<std::vector<Ogre::Vector2> > uvs, std::vector<Ogre::Real> vignetteColor, std::vector<Ogre::Real> warp, std::vector<int> indexs);
318 void SetStereoMeshRight(std::vector<Ogre::Vector3> vertices, std::vector<std::vector<Ogre::Vector2> > uvs, std::vector<Ogre::Real> vignetteColor, std::vector<Ogre::Real> warp, std::vector<int> indexs);
SCOL_EXPORT int cbmachine w
void windowFocusChange(Ogre::RenderWindow *rw)
void SetStereoTimeWarpMatrix(const Ogre::Matrix4 &leftStartMatrix, const Ogre::Matrix4 &leftEndMatrix, const Ogre::Matrix4 &rightStartMatrix, const Ogre::Matrix4 &rightEndMatrix)
void SetStereoAspectRatio(const float &ratio)
void ToPixelPos(int &px, int &py)
void RegisterStereoViewport(SViewPort *viewport)
bool UpdateStereoCompositorState(SViewPort *viewport, const Ogre::String compname, bool state)
Ogre::Vector2 GetScreenPos()
void SetStereoProjectionOffset(const float &offset)
void UpdateStereoCameraMatrix(SViewPort *viewport, Ogre::Camera *camera)
void SetStereoMeshRight(std::vector< Ogre::Vector3 > vertices, std::vector< std::vector< Ogre::Vector2 > > uvs, std::vector< Ogre::Real > vignetteColor, std::vector< Ogre::Real > warp, std::vector< int > indexs)
void UpdateStereoCamera(SViewPort *viewport, Ogre::Camera *camera)
void SetStereoChromaticAbCorrection(bool enable, Ogre::Vector4 chromAbC)
float GetBestFrameTime() const
ScolWindowHandle GetWindowHandle() const
virtual void postRenderTargetUpdate(const Ogre::RenderTargetEvent &evt)
std::array< SCOL_PTR_TYPE, 2 > GetStereoTextures()
Ogre::RenderWindow * GetOgreRenderWindowPointer()
void WindowMovedOrResized()
void RemoveViewport(SViewPort *existingViewport)
float GetAverageFPS() const
float GetStereoEyesSpacing()
void SetStereoCustomProjectonMatrix(bool enable, const Ogre::Matrix4 &leftMatrix, const Ogre::Matrix4 &rightMatrix)
void RestoreStereoCamera(SViewPort *viewport)
void SynchStereoViewportSetup(SViewPort *viewport, bool overlay=false, bool shadow=false)
void DeleteViewport(SViewPort *existingViewport)
void SetWindowHandle(ScolWindowHandle win)
void SetStereoMeshLeft(std::vector< Ogre::Vector3 > vertices, std::vector< std::vector< Ogre::Vector2 > > uvs, std::vector< Ogre::Real > vignetteColor, std::vector< Ogre::Real > warp, std::vector< int > indexs)
void SetStereoWindow(SO3::SPoint< int > pos, SO3::SPoint< int > size, int index, bool state)
unsigned int GetFSAA() const
void WriteContentsToFile(const std::string &path)
SelectorMode GetSelectorMode()
void SetStereoDistortion(bool enable, Ogre::Vector4 dist)
void UnregisterStereoViewport(SViewPort *viewport)
bool IsStereoViewportRegistered(SViewPort *viewport)
const SViewPortList & GetViewportList() const
void SetStereoFOVy(const float &fov)
bool CheckVideoMode(const int width, const int height)
unsigned int GetTriangleCount()
int Size(const int &x, const int &y, const int &w, const int &h, const int &ext)
void windowResized(Ogre::RenderWindow *rw)
unsigned int GetHeight() const
void SetSelectorEnable(const bool &state)
unsigned int GetBatchCount()
void SetStereoEyesSpacing(const float &eyesSpacing)
float GetWorstFPS() const
void SetStereoMeshRttSize(SO3::SPoint< int > leftsize, SO3::SPoint< int > rightsize)
StereoManager::StereoMode GetStereoMode()
void SetStereoRotateView(const bool state)
SRaycastResult RayCast(const int &pixelsX, const int &pixelsY)
SViewPort * GetViewport(const int &priority) const
virtual void preRenderTargetUpdate(const Ogre::RenderTargetEvent &evt)
void AddViewport(SViewPort *existingViewport)
unsigned int GetWidth() const
void windowMoved(Ogre::RenderWindow *rw)
std::array< SO3::SPoint< int >, 2 > GetStereoViewportSize()
void RefreshSelector(const bool &forceRefresh=false)
float GetWorstFrameTime() const
void windowClosed(Ogre::RenderWindow *rw)
void SetStereoMode(const StereoManager::StereoMode &stereoMode)
SRaycastResult IndRayCast(const int &pixelsX, const int &pixelsY)
SViewPort * CreateViewport(SCamera *camera, int priority, const float &x, const float &y, const float &w, const float &h)
void SetStereoMeshUVConfig(Ogre::Vector2 leftuvscale, Ogre::Vector2 leftuvoffset, Ogre::Vector2 rightuvscale, Ogre::Vector2 rightuvoffset)
void SetSelectorMode(SelectorMode mode)
bool GetStereoRotateView()
void GetStereoCustomProjectonMatrix(bool &enabled, Ogre::Matrix4 &leftMatrix, Ogre::Matrix4 &rightMatrix) const
bool SetFullScreen(const bool &fullscreen, const int &width=0, const int &height=0)
SRaycastResult & GetLastRayCast()
std::unordered_map< int, SViewPort * > SViewPortList