Vp::ColorAttachment
Color attachment using a 2D Texture.
#include "Viewport/framebuffer/ColorAttachment.h"
Public Functions
Name | |
---|---|
ColorAttachment(const ColorAttachment & attchmt)<br>Copy constructor. | |
ColorAttachment(GLint internalFormat, GLint format, GLsizei width, GLsizei height, GLenum type)<br>Creates a color attachment with index 0. | |
void | bind() const |
void | create() |
void | dispose() |
void | resize(int width, int height) |
Public Attributes
Name | |
---|---|
GLint | m_format <br>Pixel data format (see OpenGL docs) |
int | m_height <br>Texture height in pixels. |
unsigned int | m_index <br>Index of the color attachment. |
GLint | m_internalFormat <br>Pixel data internal format (see OpenGL docs) |
GLint | m_magFilter |
GLint | m_minFilter |
bool | m_multisampled <br>Use MSAA texture. |
unsigned int | m_samples <br>Number of MSAA samples if multisampled. |
bool | m_syncSize |
GLuint | m_texture <br>ID of the created texture. |
GLint | m_textureWrapS |
GLint | m_textureWrapT |
GLenum | m_type <br>Pixel data type (see OpenGL docs) |
int | m_width <br>Texture width in pixels. |
Public Functions Documentation
function ColorAttachment
cpp
ColorAttachment(
const ColorAttachment & attchmt
)
ColorAttachment(
const ColorAttachment & attchmt
)
Copy constructor.
function ColorAttachment
cpp
ColorAttachment(
GLint internalFormat,
GLint format,
GLsizei width,
GLsizei height,
GLenum type
)
ColorAttachment(
GLint internalFormat,
GLint format,
GLsizei width,
GLsizei height,
GLenum type
)
Creates a color attachment with index 0.
Parameters mimic an OpenGL image texture color attachment.
function bind
cpp
void bind() const
void bind() const
function create
cpp
void create()
void create()
function dispose
cpp
void dispose()
void dispose()
function resize
cpp
void resize(
int width,
int height
)
void resize(
int width,
int height
)
Public Attributes Documentation
variable m_format
cpp
GLint m_format;
GLint m_format;
Pixel data format (see OpenGL docs)
variable m_height
cpp
int m_height;
int m_height;
Texture height in pixels.
variable m_index
cpp
unsigned int m_index {0};
unsigned int m_index {0};
Index of the color attachment.
variable m_internalFormat
cpp
GLint m_internalFormat;
GLint m_internalFormat;
Pixel data internal format (see OpenGL docs)
variable m_magFilter
cpp
GLint m_magFilter {GL_NEAREST};
GLint m_magFilter {GL_NEAREST};
variable m_minFilter
cpp
GLint m_minFilter {GL_NEAREST};
GLint m_minFilter {GL_NEAREST};
variable m_multisampled
cpp
bool m_multisampled {false};
bool m_multisampled {false};
Use MSAA texture.
variable m_samples
cpp
unsigned int m_samples {4};
unsigned int m_samples {4};
Number of MSAA samples if multisampled.
variable m_syncSize
cpp
bool m_syncSize {true};
bool m_syncSize {true};
variable m_texture
cpp
GLuint m_texture {0};
GLuint m_texture {0};
ID of the created texture.
variable m_textureWrapS
cpp
GLint m_textureWrapS {GL_REPEAT};
GLint m_textureWrapS {GL_REPEAT};
variable m_textureWrapT
cpp
GLint m_textureWrapT {GL_REPEAT};
GLint m_textureWrapT {GL_REPEAT};
variable m_type
cpp
GLenum m_type;
GLenum m_type;
Pixel data type (see OpenGL docs)
variable m_width
cpp
int m_width;
int m_width;
Texture width in pixels.
Updated on 2025-01-07 at 13:40:43 +0000