mirror of
https://github.com/glest/glest-source.git
synced 2025-08-11 10:54:01 +02:00
Implemented the new g3d spec
This commit is contained in:
@@ -12,10 +12,14 @@
|
||||
#ifndef _SHARED_GRAPHICS_GL_MODELRENDERERGL_H_
|
||||
#define _SHARED_GRAPHICS_GL_MODELRENDERERGL_H_
|
||||
|
||||
#include <array>
|
||||
#include "model_renderer.h"
|
||||
#include "model.h"
|
||||
#include "opengl.h"
|
||||
#include "leak_dumper.h"
|
||||
#include "texture_gl.h"
|
||||
|
||||
using ::Shared::Graphics::Gl::Texture2DGl;
|
||||
|
||||
namespace Shared {
|
||||
namespace Graphics {
|
||||
@@ -52,6 +56,23 @@ namespace Shared {
|
||||
void renderMeshNormals(Mesh *mesh);
|
||||
};
|
||||
|
||||
class MeshCallbackTeamColor : public MeshCallback {
|
||||
private:
|
||||
const Texture *teamTexture;
|
||||
|
||||
public:
|
||||
MeshCallbackTeamColor() : MeshCallback() {
|
||||
teamTexture = NULL;
|
||||
}
|
||||
|
||||
void setTeamTexture(const Texture *teamTexture) {
|
||||
this->teamTexture = teamTexture;
|
||||
}
|
||||
|
||||
virtual void execute(const Mesh *mesh);
|
||||
|
||||
static bool noTeamColors;
|
||||
};
|
||||
}
|
||||
}
|
||||
}//end namespace
|
||||
|
@@ -46,7 +46,7 @@ namespace Shared {
|
||||
class Mesh {
|
||||
private:
|
||||
//mesh data
|
||||
Texture2D *textures[meshTextureCount];
|
||||
Texture2D * textures[meshTextureCount];
|
||||
bool texturesOwned[meshTextureCount];
|
||||
string texturePaths[meshTextureCount];
|
||||
|
||||
@@ -75,6 +75,7 @@ namespace Shared {
|
||||
bool customColor;
|
||||
bool noSelect;
|
||||
bool glow;
|
||||
uint8 factionColorOpacity;
|
||||
|
||||
uint32 textureFlags;
|
||||
|
||||
@@ -175,6 +176,9 @@ namespace Shared {
|
||||
bool getCustomTexture() const {
|
||||
return customColor;
|
||||
}
|
||||
uint8 getFactionColorOpacity() const {
|
||||
return factionColorOpacity;
|
||||
}
|
||||
bool getNoSelect() const {
|
||||
return noSelect;
|
||||
}
|
||||
@@ -235,7 +239,7 @@ namespace Shared {
|
||||
|
||||
class Model {
|
||||
private:
|
||||
TextureManager *textureManager;
|
||||
TextureManager * textureManager;
|
||||
|
||||
private:
|
||||
uint8 fileVersion;
|
||||
|
@@ -72,7 +72,6 @@ namespace Shared {
|
||||
virtual void render(Model *model, int renderMode = rmNormal, float alpha = 1.0f) = 0;
|
||||
virtual void renderNormalsOnly(Model *model) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
}//end namespace
|
||||
|
||||
|
Reference in New Issue
Block a user