KRTexture::createGLTexture renamed to createGPUTexture. Updated all child classes.

This commit is contained in:
2022-07-16 00:17:25 -07:00
parent 41a1f3bd89
commit 559df3766e
8 changed files with 8 additions and 8 deletions

View File

@@ -110,7 +110,7 @@ void KRTexture::resize(int max_dim)
getContext().getTextureManager()->memoryChanged(m_newTextureMemUsed);
getContext().getTextureManager()->addMemoryTransferredThisFrame(m_newTextureMemUsed);
if(!createGLTexture(target_dim)) {
if(!createGPUTexture(target_dim)) {
getContext().getTextureManager()->memoryChanged(-m_newTextureMemUsed);
m_newTextureMemUsed = 0;
assert(false); // Failed to create the texture

View File

@@ -88,7 +88,7 @@ public:
void _swapHandles();
protected:
virtual bool createGLTexture(int lod_max_dim) = 0;
virtual bool createGPUTexture(int lod_max_dim) = 0;
GLuint getHandle();
struct TextureHandle {

View File

@@ -41,7 +41,7 @@ KRTexture2D::~KRTexture2D() {
delete m_pData;
}
bool KRTexture2D::createGLTexture(int lod_max_dim) {
bool KRTexture2D::createGPUTexture(int lod_max_dim) {
if (m_haveNewHandles) {
return true;
}

View File

@@ -52,5 +52,5 @@ public:
protected:
KRDataBlock *m_pData;
virtual bool createGLTexture(int lod_max_dim);
bool createGPUTexture(int lod_max_dim) override;
};

View File

@@ -80,7 +80,7 @@ KRTextureAnimated::~KRTextureAnimated()
}
bool KRTextureAnimated::createGLTexture(int lod_max_dim)
bool KRTextureAnimated::createGPUTexture(int lod_max_dim)
{
return true;
}

View File

@@ -52,7 +52,7 @@ public:
virtual void resize(int max_dim);
private:
virtual bool createGLTexture(int lod_max_dim);
bool createGPUTexture(int lod_max_dim) override;
float m_frame_rate;
int m_frame_count;

View File

@@ -56,7 +56,7 @@ KRTextureCube::~KRTextureCube()
{
}
bool KRTextureCube::createGLTexture(int lod_max_dim)
bool KRTextureCube::createGPUTexture(int lod_max_dim)
{
assert(m_iNewHandle == m_iHandle); // Only allow one resize per frame

View File

@@ -48,7 +48,7 @@ public:
// virtual void resetPoolExpiry(float lodCoverage, texture_usage_t textureUsage);
private:
virtual bool createGLTexture(int lod_max_dim);
bool createGPUTexture(int lod_max_dim) override;
const GLenum TARGETS[6] = {
GL_TEXTURE_CUBE_MAP_POSITIVE_X,