Game of Ur 0.3.3
This is a computer adaptation of Game of Ur, written in C++ mainly using SDL and OpenGL.
Loading...
Searching...
No Matches
ToyMaker::ColorBufferDefinition Struct Reference

A struct containing the definition of a color buffer, using which similar color buffers can be created. More...

#include <texture.hpp>

Public Types

enum class  Type { TEXTURE_2D , CUBEMAP }
 The type of texture defined.
 
enum class  CubemapLayout : uint8_t { NA , ROW }
 For a 2D texture - determines the manner in which the Texture should be sampled in order for it to be used as a cubemap.
 

Public Attributes

glm::vec2 mDimensions {800, 600}
 The dimensions of the 2D texture.
 
CubemapLayout mCubemapLayout { CubemapLayout::NA }
 The type of cubemap layout the texture conforms to, if it is a cubemap.
 
GLenum mMagFilter { GL_LINEAR }
 The type of sampling used with the texture when it is zoomed in to.
 
GLenum mMinFilter { GL_LINEAR }
 The type of sampling used with the texture when it is zoomed out from.
 
GLenum mWrapS { GL_CLAMP_TO_EDGE }
 Horizontally: for UV coordinates beyond the 0.0-1.0 range, which part of the texture is to be sampled from.
 
GLenum mWrapT { GL_CLAMP_TO_EDGE }
 Vertically: for UV coordinates beyond the 0.0-1.0 range, which part of the texture is to be sampled from.
 
GLenum mDataType { GL_UNSIGNED_BYTE }
 The underlying data type representing each channel (also component) of the texture.
 
GLbyte mComponentCount { 4 }
 The number of components (or channels) each pixel of the texture contains.
 
bool mUsesWebColors { false }
 Whether the intensity of the color of a component maps linearly or exponentially with the value of that component on a pixel.
 

Detailed Description

A struct containing the definition of a color buffer, using which similar color buffers can be created.

Member Data Documentation

◆ mUsesWebColors

bool ToyMaker::ColorBufferDefinition::mUsesWebColors { false }

Whether the intensity of the color of a component maps linearly or exponentially with the value of that component on a pixel.

Web colors are mapped exponentially, whereas lighting calculations are performed in linear space.

Related: SRGB and SRGB_ALPHA in OpenGL.


The documentation for this struct was generated from the following file: