// // Copyright 2016 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // Format: // A universal description of typed GPU storage. Across multiple // renderer back-ends, there are common formats and some distinct // permutations, this enum encapsulates them all. Formats apply to // textures, but could also apply to any typed data.
booloperator==(const Format &other) const { return this->id == other.id; }
FormatID id;
// The closest matching GL internal format for the storage this format uses. Note that this // may be a different internal format than the one this ANGLE format is used for.
GLenum glInternalFormat;
// The format we should report to the GL layer when querying implementation formats from a FBO. // This might not be the same as the glInternalFormat, since some DXGI formats don't have // matching GL format enums, like BGRA4, BGR5A1 and B5G6R6.
GLenum fboImplementationInternalFormat;
constexpr bool Format::isLUMA() const
{ // There's no format with G or B without R
ASSERT(redBits > 0 || (greenBits == 0 && blueBits == 0)); return redBits == 0 && (luminanceBits > 0 || alphaBits > 0);
}
constexpr bool Format::isBGRA() const
{ return id == FormatID::B8G8R8A8_UNORM || id == FormatID::B8G8R8A8_UNORM_SRGB ||
id == FormatID::B8G8R8A8_TYPELESS || id == FormatID::B8G8R8A8_TYPELESS_SRGB;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.