1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00

47 lines
952 B
C++
Raw Normal View History

2012-01-14 18:34:14 -05:00
#ifndef GAME_MWRENDER_WATER_H
#define GAME_MWRENDER_WATER_H
#include <Ogre.h>
namespace MWRender {
/// Water rendering
class Water : Ogre::RenderTargetListener, Ogre::Camera::Listener {
Ogre::Camera *mCamera;
Ogre::SceneManager *mSceneManager;
Ogre::Viewport *mViewport;
Ogre::RenderTarget *mRefractionTarget;
Ogre::RenderTarget *mReflectionTarget;
Ogre::Plane mWaterPlane;
Ogre::SceneNode *mWaterNode;
Ogre::Entity *mWater;
Ogre::Vector3 mOldCameraPos;
bool mIsUnderwater;
2012-01-20 17:59:56 -05:00
int mTop;
2012-01-14 18:34:14 -05:00
void preRenderTargetUpdate(const Ogre::RenderTargetEvent&);
void postRenderTargetUpdate(const Ogre::RenderTargetEvent&);
void cameraPreRenderScene(Ogre::Camera *cam);
void cameraPostRenderScene(Ogre::Camera *cam);
void cameraDestroyed(Ogre::Camera *cam);
public:
2012-01-19 23:29:07 -05:00
Water (Ogre::Camera *camera, int top);
2012-01-14 18:34:14 -05:00
~Water();
2012-01-20 17:59:56 -05:00
void checkUnderwater(float y);
2012-01-14 18:34:14 -05:00
};
}
#endif