Updates for bazel on windows.
This commit is contained in:
172
image.h
172
image.h
@@ -17,162 +17,54 @@
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef OpenArena__image_h__
|
||||
#define OpenArena__image_h__
|
||||
|
||||
#include <cstdint>
|
||||
#if defined HAVE_CONFIG_H
|
||||
// clang-format off
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include "texture.h"
|
||||
|
||||
// clang-format on
|
||||
|
||||
namespace OpenArena {
|
||||
/*!
|
||||
* \brief
|
||||
* Write brief comment for Image here.
|
||||
*
|
||||
* Write detailed description for Image here.
|
||||
*
|
||||
* \remarks
|
||||
* Write remarks for Image here.
|
||||
*
|
||||
* \see
|
||||
* Separate items with the '|' character.
|
||||
*/
|
||||
|
||||
class ImageBase {
|
||||
public:
|
||||
enum Type { Unknown, RGB, RGBA };
|
||||
|
||||
ImageBase();
|
||||
virtual ~ImageBase();
|
||||
virtual std::shared_ptr<uint8_t[]> GetImageData() const;
|
||||
virtual uint32_t GetBitsPerPixel() const;
|
||||
virtual uint32_t GetBytesPerPixel() const;
|
||||
virtual uint32_t GetWidth() const;
|
||||
virtual uint32_t GetHeight() const;
|
||||
virtual ImageBase::Type GetType() const;
|
||||
virtual TextureImage* ToTextureImage() const;
|
||||
|
||||
std::shared_ptr<uint8_t[]> data_;
|
||||
uint32_t bpp_;
|
||||
uint32_t size_x_;
|
||||
uint32_t size_y_;
|
||||
Type type_;
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
class Image {
|
||||
public:
|
||||
// RGB should equal GL_RGB;
|
||||
enum Type { Type_RGB };
|
||||
enum Type { Type_RGB, Type_RGBA };
|
||||
|
||||
/*!
|
||||
* \brief
|
||||
* Write brief comment for GetImageData here.
|
||||
*
|
||||
* \returns
|
||||
* Write description of return value here.
|
||||
*
|
||||
* \throws <exception class>
|
||||
* Description of criteria for throwing this exception.
|
||||
*
|
||||
* Write detailed description for GetImageData here.
|
||||
*
|
||||
* \remarks
|
||||
* Write remarks for GetImageData here.
|
||||
*
|
||||
* \see
|
||||
* Separate items with the '|' character.
|
||||
*/
|
||||
virtual uint8_t* GetImageData() const = 0;
|
||||
/*!
|
||||
* \brief
|
||||
* Write brief comment for GetBitsPerPixel here.
|
||||
*
|
||||
* \returns
|
||||
* Write description of return value here.
|
||||
*
|
||||
* \throws <exception class>
|
||||
* Description of criteria for throwing this exception.
|
||||
*
|
||||
* Write detailed description for GetBitsPerPixel here.
|
||||
*
|
||||
* \remarks
|
||||
* Write remarks for GetBitsPerPixel here.
|
||||
*
|
||||
* \see
|
||||
* Separate items with the '|' character.
|
||||
*/
|
||||
virtual uint32_t GetBitsPerPixel() const = 0;
|
||||
/*!
|
||||
* \brief
|
||||
* Write brief comment for GetBytesPerPixel here.
|
||||
*
|
||||
* \returns
|
||||
* Write description of return value here.
|
||||
*
|
||||
* \throws <exception class>
|
||||
* Description of criteria for throwing this exception.
|
||||
*
|
||||
* Write detailed description for GetBytesPerPixel here.
|
||||
*
|
||||
* \remarks
|
||||
* Write remarks for GetBytesPerPixel here.
|
||||
*
|
||||
* \see
|
||||
* Separate items with the '|' character.
|
||||
*/
|
||||
virtual uint32_t GetBytesPerPixel() const = 0;
|
||||
/*!
|
||||
* \brief
|
||||
* Write brief comment for GetWidth here.
|
||||
*
|
||||
* \returns
|
||||
* Write description of return value here.
|
||||
*
|
||||
* \throws <exception class>
|
||||
* Description of criteria for throwing this exception.
|
||||
*
|
||||
* Write detailed description for GetWidth here.
|
||||
*
|
||||
* \remarks
|
||||
* Write remarks for GetWidth here.
|
||||
*
|
||||
* \see
|
||||
* Separate items with the '|' character.
|
||||
*/
|
||||
virtual uint32_t GetWidth() const = 0;
|
||||
/*!
|
||||
* \brief
|
||||
* Write brief comment for GetHeight here.
|
||||
*
|
||||
* \returns
|
||||
* Write description of return value here.
|
||||
*
|
||||
* \throws <exception class>
|
||||
* Description of criteria for throwing this exception.
|
||||
*
|
||||
* Write detailed description for GetHeight here.
|
||||
*
|
||||
* \remarks
|
||||
* Write remarks for GetHeight here.
|
||||
*
|
||||
* \see
|
||||
* Separate items with the '|' character.
|
||||
*/
|
||||
virtual uint32_t GetHeight() const = 0;
|
||||
/*!
|
||||
* \brief
|
||||
* Write brief comment for GetType here.
|
||||
*
|
||||
* \returns
|
||||
* Write description of return value here.
|
||||
*
|
||||
* \throws <exception class>
|
||||
* Description of criteria for throwing this exception.
|
||||
*
|
||||
* Write detailed description for GetType here.
|
||||
*
|
||||
* \remarks
|
||||
* Write remarks for GetType here.
|
||||
*
|
||||
* \see
|
||||
* Separate items with the '|' character.
|
||||
*/
|
||||
virtual Image::Type GetType() const = 0;
|
||||
|
||||
/*!
|
||||
* \brief
|
||||
* Write brief comment for ~Image here.
|
||||
*
|
||||
* \throws <exception class>
|
||||
* Description of criteria for throwing this exception.
|
||||
*
|
||||
* Write detailed description for ~Image here.
|
||||
*
|
||||
* \remarks
|
||||
* Write remarks for ~Image here.
|
||||
*
|
||||
* \see
|
||||
* Separate items with the '|' character.
|
||||
*/
|
||||
virtual ~Image(void) {}
|
||||
};
|
||||
} // End namespace OpenArena
|
||||
|
||||
Reference in New Issue
Block a user