hopefully working implementation of mpfNoSelect from this discussion: http://glest.org/glest_board/index.php?topic=8165.msg82932#msg82932

This commit is contained in:
Titus Tscharntke
2012-07-14 21:29:15 +00:00
parent 62bc601cc6
commit d10d5fc770
8 changed files with 33 additions and 9 deletions

View File

@@ -34,7 +34,7 @@ public:
ModelRendererGl();
virtual void begin(bool renderNormals, bool renderTextures, bool renderColors, MeshCallback *meshCallback);
virtual void end();
virtual void render(Model *model);
virtual void render(Model *model,int renderMode=rmNormal);
virtual void renderNormalsOnly(Model *model);
void setDuplicateTexCoords(bool duplicateTexCoords) {this->duplicateTexCoords= duplicateTexCoords;}
@@ -42,7 +42,7 @@ public:
private:
void renderMesh(Mesh *mesh);
void renderMesh(Mesh *mesh,int renderMode=rmNormal);
void renderMeshNormals(Mesh *mesh);
};

View File

@@ -70,6 +70,7 @@ private:
//properties
bool twoSided;
bool customColor;
bool noSelect;
uint32 textureFlags;
@@ -123,6 +124,7 @@ public:
//properties
bool getTwoSided() const {return twoSided;}
bool getCustomTexture() const {return customColor;}
bool getNoSelect() const {return noSelect;}
//external data
const InterpolationData *getInterpolationData() const {return interpolationData;}

View File

@@ -42,7 +42,8 @@ enum ModelType{
enum MeshPropertyFlag{
mpfCustomColor= 1,
mpfTwoSided= 2
mpfTwoSided= 2,
mpfNoSelect= 4
};
enum MeshTexture{

View File

@@ -18,6 +18,14 @@
namespace Shared{ namespace Graphics{
enum RenderMode{
rmNormal,
rmSelection,
renderModeCount
};
class Texture;
// =====================================================
@@ -50,7 +58,7 @@ public:
virtual void begin(bool renderNormals, bool renderTextures, bool renderColors, MeshCallback *meshCallback= NULL)=0;
virtual void end()=0;
virtual void render(Model *model)=0;
virtual void render(Model *model,int renderMode=rmNormal)=0;
virtual void renderNormalsOnly(Model *model)=0;
};