Class ImageFormatExtensions
Namespace: ValveResourceFormat.Renderer
Assembly: Renderer.dll
Maps , the engine format vocabulary, to the OpenGL equivalents.
This makes the renderer unaware of graphics API specific formats, and we can later map these to anything else.
public static class ImageFormatExtensionsInheritance
object ← ImageFormatExtensions
Methods
HasSrgbVariant(ImageFormat)
Returns whether the format has an sRGB storage variant.
public static bool HasSrgbVariant(this ImageFormat format)Parameters
format ImageFormat
Returns
IsBlockCompressed(ImageFormat)
Returns whether the format is block compressed. Block compressed data uploads with the compressed image calls and has no pixel format or type.
public static bool IsBlockCompressed(this ImageFormat format)Parameters
format ImageFormat
Returns
ToGLPixelFormat(ImageFormat)
Returns the pixel format for uploads and readbacks. Not valid for block compressed formats.
public static PixelFormat ToGLPixelFormat(this ImageFormat format)Parameters
format ImageFormat
Returns
PixelFormat
ToGLPixelType(ImageFormat)
Returns the pixel component type for uploads and readbacks. Not valid for block compressed formats.
public static PixelType ToGLPixelType(this ImageFormat format)Parameters
format ImageFormat
Returns
PixelType
ToGLSizedInternalFormat(ImageFormat, bool)
Returns the sized internal format for texture storage.
public static SizedInternalFormat ToGLSizedInternalFormat(this ImageFormat format, bool srgb = false)Parameters
format ImageFormat
srgb bool
Returns
SizedInternalFormat

