[12632] Revert previous commit (see Notes)

This commit is contained in:
billy1arm 2013-05-31 13:50:57 +01:00 committed by Antz
parent 1cd806c02e
commit ef445ea523
1462 changed files with 9689 additions and 7080 deletions

View file

@ -1,10 +1,10 @@
/**
/*
@file ImageFormat.h
@maintainer Morgan McGuire, http://graphics.cs.williams.edu
@created 2003-05-23
@edited 2010-01-01
@edited 2010-05-01
*/
#ifndef GLG3D_ImageFormat_H
@ -13,6 +13,7 @@
#include "G3D/platform.h"
#include "G3D/Table.h"
#include "G3D/enumclass.h"
#include "G3D/Any.h"
namespace G3D {
@ -57,13 +58,19 @@ public:
CODE_RGB8I,
CODE_RGB8UI,
CODE_RGBA8UI,
CODE_ARGB8,
CODE_BGR8,
CODE_R8,
CODE_RG8,
CODE_RG8I,
CODE_RG8UI,
CODE_RG16F,
CODE_RGBA8,
CODE_RGBA16,
CODE_RGBA16F,
@ -179,7 +186,7 @@ public:
@deprecated Use cpuBitsPerPixel*/
int packedBitsPerTexel;
/**
/*
Amount of GPU memory per pixel on most graphics cards, for formats supported by OpenGL. This is
only an estimate--the actual amount of memory may be different on your actual card.
@ -260,10 +267,14 @@ public:
static const ImageFormat* BGR8();
static const ImageFormat* R8();
static const ImageFormat* RG8();
static const ImageFormat* RG8I();
static const ImageFormat* RG8UI();
static const ImageFormat* RG16F();
static const ImageFormat* RGB5();
static const ImageFormat* RGB5A1();
@ -297,6 +308,8 @@ public:
static const ImageFormat* RGB8I();
static const ImageFormat* RGB8UI();
static const ImageFormat* RGBA8UI();
static const ImageFormat* RGB_DXT1();
@ -346,7 +359,7 @@ public:
static const ImageFormat* YUV444();
/**
/*
NULL pointer; indicates that the G3D::Texture class should choose
either RGBA8 or RGB8 depending on the presence of an alpha channel
in the input.
@ -376,9 +389,18 @@ public:
NEAREST,
BILINEAR,
MHC,
HIGH_QUALITY = MHC
BEST = MHC
};
private:
static const char* toString(int i, Value& v) {
static const char* str[] = {"NEAREST", "BILINEAR", "MHC", "BEST", NULL};
static const Value val[] = {NEAREST, BILINEAR, MHC, BEST};
const char* s = str[i];
if (s) {
v = val[i];
}
return s;
}
Value value;
@ -399,7 +421,7 @@ public:
*/
static bool convert(const Array<const void*>& srcBytes, int srcWidth, int srcHeight, const ImageFormat* srcFormat, int srcRowPadBits,
const Array<void*>& dstBytes, const ImageFormat* dstFormat, int dstRowPadBits,
bool invertY = false, BayerAlgorithm bayerAlg = BayerAlgorithm::HIGH_QUALITY);
bool invertY = false, BayerAlgorithm bayerAlg = BayerAlgorithm::MHC);
/* Checks if a conversion between two formats is available. */
static bool conversionAvailable(const ImageFormat* srcFormat, int srcRowPadBits, const ImageFormat* dstFormat, int dstRowPadBits, bool invertY = false);