123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
-
-
- #ifndef _RENDER_H_
- #define _RENDER_H_
-
- #include <vector>
-
- #include "Room.h"
- #include "ViewVolume.h"
-
-
- class Render {
- public:
-
- typedef enum {
- modeDisabled,
- modeLoadScreen,
- modeVertexLight,
- modeSolid,
- modeWireframe,
- modeTexture
- } RenderMode;
-
- typedef enum {
- fRoomAlpha = (1 << 0),
- fEntityModels = (1 << 1),
- fFog = (1 << 2),
- fGL_Lights = (1 << 3),
- fRenderPonytail = (1 << 4),
- fAnimateAllModels = (1 << 5),
-
- } RenderFlags;
-
-
-
- Render();
-
-
-
- ~Render();
-
-
-
- void screenShot(char *filenameBase);
-
-
-
- int getMode();
-
-
-
- void ClearWorld();
-
-
-
- void clearFlags(unsigned int flags);
-
-
-
- void setFlags(unsigned int flags);
-
- void setMode(int n);
-
-
-
- void display();
-
- void setSkyMesh(int index, bool rot);
-
- unsigned int getFlags();
-
-
-
- bool isVisible(float x, float y, float z);
-
-
-
- bool isVisible(float x, float y, float z, float radius);
-
- bool isVisible(BoundingBox &box);
-
-
- ViewVolume mViewVolume;
-
- private:
-
- static void lightRoom(Room &room);
-
- void drawLoadScreen();
-
-
-
- void newRoomRenderList(int index);
-
-
-
- void buildRoomRenderList(Room &room);
-
-
-
- void drawSkyMesh(float scale);
-
-
-
- void updateViewVolume();
-
- std::vector<Room *> mRoomRenderList;
-
- unsigned int mFlags;
- unsigned int mMode;
- int mLock;
- int mSkyMesh;
- bool mSkyMeshRotation;
- };
-
- Render &getRender();
-
- #endif
|