2012-10-24 06:57:34 +00:00
|
|
|
//
|
|
|
|
|
// KRTextureTGA.h
|
|
|
|
|
// KREngine
|
|
|
|
|
//
|
|
|
|
|
// Created by Kearwood Gilbert on 2012-10-23.
|
|
|
|
|
// Copyright (c) 2012 Kearwood Software. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
#ifndef KRTEXTURETGA_H
|
|
|
|
|
#define KRTEXTURETGA_H
|
|
|
|
|
|
|
|
|
|
#include "KRTexture2D.h"
|
|
|
|
|
|
|
|
|
|
class KRTextureTGA : public KRTexture2D
|
|
|
|
|
{
|
2012-10-25 03:15:28 +00:00
|
|
|
public:
|
2012-12-20 01:23:57 +00:00
|
|
|
KRTextureTGA(KRContext &context, KRDataBlock *data, std::string name);
|
2012-10-25 03:15:28 +00:00
|
|
|
virtual ~KRTextureTGA();
|
2012-12-20 01:23:57 +00:00
|
|
|
virtual std::string getExtension();
|
2012-10-24 06:57:34 +00:00
|
|
|
|
2014-01-23 21:40:29 -08:00
|
|
|
bool uploadTexture(GLenum target, int lod_max_dim, int ¤t_lod_max_dim, int prev_lod_max_dim, bool compress = false, bool premultiply_alpha = false);
|
2014-01-24 02:13:34 -08:00
|
|
|
|
|
|
|
|
#if !TARGET_OS_IPHONE
|
2014-01-23 21:40:29 -08:00
|
|
|
virtual KRTexture *compress(bool premultiply_alpha = false);
|
2014-01-24 02:13:34 -08:00
|
|
|
#endif
|
2012-11-17 00:15:52 +00:00
|
|
|
|
|
|
|
|
virtual long getMemRequiredForSize(int max_dim);
|
2013-11-16 02:34:18 -08:00
|
|
|
private:
|
|
|
|
|
long m_imageSize;
|
2012-10-24 06:57:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|