00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #if !defined(__INCLUDE_ModelRendererTreeh_INCLUDE__)
00022 #define __INCLUDE_ModelRendererTreeh_INCLUDE__
00023
00024 #include <graph/ModelRenderer.h>
00025 #include <GLEXT/GLTexture.h>
00026 #include <3dsparse/Model.h>
00027 #include <common/ModelID.h>
00028
00029 class ModelRendererTree : public ModelRenderer
00030 {
00031 public:
00032 ModelRendererTree(Model *model, ModelID &id);
00033 virtual ~ModelRendererTree();
00034
00035 virtual void draw(float currentFrame,
00036 float distance, float fade, bool setState);
00037 virtual void drawBottomAligned(float currentFrame,
00038 float distance, float fade, bool setState);
00039
00040 virtual Model *getModel() { return model_; }
00041
00042 static void setSkipPre(bool skip) { skipPre_ = skip; }
00043 static void drawInternalPre(bool setState);
00044 void drawInternal(float distance, float fade, bool setState);
00045
00046 protected:
00047 Model *model_;
00048 int treeType_;
00049
00050 static bool skipPre_;
00051 static GLuint treePineList, treePineSmallList;
00052 static GLuint treePine2List, treePine2SmallList;
00053 static GLuint treePine3List, treePine3SmallList;
00054 static GLuint treePine4List, treePine4SmallList;
00055 static GLuint treePine2SnowList, treePine2SnowSmallList;
00056 static GLuint treePine3SnowList, treePine3SnowSmallList;
00057 static GLuint treePine4SnowList, treePine4SnowSmallList;
00058 static GLuint treePineSnowList, treePineSnowSmallList;
00059 static GLuint treePineBurntList, treePineBurntSmallList;
00060 static GLuint treePineYellowList, treePineYellowSmallList;
00061 static GLuint treePineLightList, treePineLightSmallList;
00062 static GLuint treePalmList, treePalmSmallList;
00063 static GLuint treePalm2List, treePalm2SmallList;
00064 static GLuint treePalm3List, treePalm3SmallList;
00065 static GLuint treePalm4List, treePalm4SmallList;
00066 static GLuint treePalmBList;
00067 static GLuint treePalmB2List;
00068 static GLuint treePalmB3List;
00069 static GLuint treePalmB4List;
00070 static GLuint treePalmB5List;
00071 static GLuint treePalmB6List;
00072 static GLuint treePalmB7List;
00073 static GLuint treePalmBurntList, treePalmBurntSmallList;
00074 static GLuint treeOakList, treeOakSmallList;
00075 static GLuint treeOak2List, treeOak2SmallList;
00076 static GLuint treeOak3List, treeOak3SmallList;
00077 static GLuint treeOak4List, treeOak4SmallList;
00078
00079 static GLTexture pineTextureA_;
00080 static GLTexture pineTextureB_;
00081 static GLTexture palmTextureA_;
00082 static GLTexture palmTextureB_;
00083 static GLTexture oakTextureA_;
00084 };
00085
00086 #endif // __INCLUDE_ModelRendererTreeh_INCLUDE__