mirror of https://github.com/axmolengine/axmol.git
Add getGPUHandler for backend::Texture for some purpose use
This commit is contained in:
parent
8ec6df624e
commit
ff3becb49d
|
@ -107,6 +107,8 @@ public:
|
||||||
|
|
||||||
virtual int getCount() const { return 1; };
|
virtual int getCount() const { return 1; };
|
||||||
|
|
||||||
|
virtual uintptr_t getGPUHandler(int index = 0) const { return 0; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
* @param descriptor Specifies the texture descirptor.
|
* @param descriptor Specifies the texture descirptor.
|
||||||
|
|
|
@ -69,6 +69,7 @@ struct TextureInfoGL
|
||||||
/// <param name="index">the index in meta textrues</param>
|
/// <param name="index">the index in meta textrues</param>
|
||||||
/// <param name="target">the target GL_TEXTURE_2D,GL_TEXTURE_CUBE_MAP</param>
|
/// <param name="target">the target GL_TEXTURE_2D,GL_TEXTURE_CUBE_MAP</param>
|
||||||
void apply(int slot, int index, GLenum target) const;
|
void apply(int slot, int index, GLenum target) const;
|
||||||
|
GLuint getName(int index) const { return textures[0]; }
|
||||||
|
|
||||||
GLint magFilterGL = GL_LINEAR;
|
GLint magFilterGL = GL_LINEAR;
|
||||||
GLint minFilterGL = GL_LINEAR;
|
GLint minFilterGL = GL_LINEAR;
|
||||||
|
@ -183,6 +184,8 @@ public:
|
||||||
|
|
||||||
int getCount() const override { return _textureInfo.maxIdx + 1; }
|
int getCount() const override { return _textureInfo.maxIdx + 1; }
|
||||||
|
|
||||||
|
uintptr_t getGPUHandler(int index) const override { return _textureInfo.getName(index); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void initWithZeros();
|
void initWithZeros();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue