diff --git a/wrap/gl/trimesh.h b/wrap/gl/trimesh.h index 5821cf27..965b4451 100644 --- a/wrap/gl/trimesh.h +++ b/wrap/gl/trimesh.h @@ -118,8 +118,6 @@ public: int len; int start; }; - - }; template > @@ -137,9 +135,10 @@ public: FACE_POINTER_CONTAINER face_pointers; + MeshType *m; + unsigned int array_buffers[3]; std::vector TMId; - unsigned int array_buffers[3]; int curr_hints; // the current hints @@ -147,7 +146,28 @@ public: int HNParami[8]; float HNParamf[8]; - MeshType *m; + DrawMode cdm; // Current DrawMode + NormalMode cnm; // Current NormalMode + ColorMode ccm; // Current ColorMode + + static NormalMode convertDrawModeToNormalMode(DrawMode dm) + { + switch(dm) + { + case(DMFlat): + case(DMFlatWire): + case(DMRadar): + return NMPerFace; + case(DMPoints): + case(DMWire): + case(DMSmooth): + return NMPerVert; + default: + return NMNone; + } + return NMNone; + } + GlTrimesh() { m=0; @@ -175,6 +195,9 @@ public: } } + unsigned int dl; + std::vector indices; + void SetHintParami(const HintParami hip, const int value) { HNParami[hip]=value; @@ -200,13 +223,6 @@ public: curr_hints&=(~hn); } - unsigned int dl; - std::vector indices; - - DrawMode cdm; // Current DrawMode - NormalMode cnm; // Current NormalMode - ColorMode ccm; // Current ColorMode - void Update(/*Change c=CHAll*/) { if(m==0) return; @@ -309,8 +325,6 @@ void Draw(TextureMode tm) } } - - template< DrawMode dm, ColorMode cm, TextureMode tm> void Draw() {