Easy3D 2.6.1
|
An implementation of framebuffer object (FBO). More...
#include <easy3d/renderer/framebuffer_object.h>
Public Member Functions | |
FramebufferObject (int w, int h, int samples=0) | |
Constructor. | |
virtual | ~FramebufferObject () |
Destructor. | |
bool | add_color_texture (GLenum internal_format=GL_RGBA8, GLenum format=GL_RGBA, GLenum type=GL_UNSIGNED_BYTE, GLenum filter=GL_NEAREST) |
Add a color texture render buffer. | |
bool | add_color_buffer (GLenum internal_format=GL_RGBA8, GLenum format=GL_RGBA, GLenum type=GL_UNSIGNED_BYTE) |
Add a color render buffer. | |
bool | add_depth_texture (GLenum internal_format=GL_DEPTH24_STENCIL8, GLenum filter=GL_NEAREST, GLenum compare_mode=GL_NONE, GLenum compare_func=GL_LEQUAL) |
Add a depth texture render buffer. | |
bool | add_depth_buffer (GLenum internal_format=GL_DEPTH24_STENCIL8) |
Add a depth render buffer. | |
bool | attach_color_texture (GLenum target, GLuint texture_id, GLenum attachment) |
Attach an existing color texture to the framebuffer. | |
bool | attach_depth_texture (GLenum target, GLuint texture_id, GLenum attachment) |
Attach an existing depth texture to the framebuffer. | |
void | ensure_size (int w, int h) |
Ensure the size of the buffers is (w, h). If its size matches the required size, i.e, (w, h), it does nothing. Otherwise, it resizes the buffers. | |
bool | bind (GLenum target=GL_FRAMEBUFFER) |
Bind FBO to FRAMEBUFFER, DRAW_FRAMEBUFFER, or READ_FRAMEBUFFER. | |
bool | release (GLenum target=GL_FRAMEBUFFER) |
Switches rendering back to the default framebuffer. | |
bool | is_valid () const |
Returns true if the framebuffer object is valid. | |
bool | is_bound (GLenum target=GL_FRAMEBUFFER) const |
Check if the framebuffer object is currently bound to the current context. | |
void | activate_draw_buffer (unsigned int index) const |
Choose the buffers to render into. This command lets you select which attachments are written to. | |
void | activate_draw_buffers (unsigned int num_buffers, const unsigned int indices[]) const |
Choose the buffers to render into. | |
void | activate_draw_buffers (unsigned int minId, unsigned int maxId) const |
Choose the buffers in the range [minId, ... maxId] to render into. | |
void | deactivate_draw_buffers () const |
Deactivate all draw buffers. | |
void | activate_read_buffer (unsigned int index) const |
Choose the buffers to read from. This command lets you select which attachment to read from. | |
void | deactivate_read_buffer () const |
Deactivates reading from the buffers. | |
GLuint | handle () const |
Returns the OpenGL framebuffer object handle for this framebuffer object. This handle can be used to attach new images or buffers to the framebuffer. If you attach images or buffers, you are responsible for cleaning up and destroying these objects. | |
int | width () const |
Returns the width of the render buffers. | |
int | height () const |
Returns the height of the render buffers. | |
int | samples () const |
Returns the number of samples per pixel. | |
int | num_color_attachments () const |
Returns the number of color attachments. | |
bool | has_color_attachment (unsigned int index) const |
Checks if the framebuffer object has a color attachment at the given index. | |
bool | has_depth_attachment () const |
Checks if the framebuffer object has a depth attachment. | |
int | depth_bits () const |
Returns the depth bits. | |
bool | has_stencil () const |
Checks if the framebuffer object has a stencil buffer. | |
GLenum | texture_target () const |
Returns the texture target. | |
GLuint | color_texture (unsigned int index=0, bool resolve=true) const |
Returns the texture ID attached to the color attachment at the given index. | |
bool | has_color_texture (unsigned int index) const |
Checks if the framebuffer object has a color texture at the given index. | |
GLuint | depth_texture (bool resolve=true) const |
Returns the texture ID for the texture attached to the depth attachment. | |
bool | has_depth_texture () const |
Checks if the framebuffer object has a depth texture. | |
bool | copy_color_to_texture (GLuint &texture_handle, unsigned int index=0, int internal_format=GL_RGBA8, GLenum format=GL_RGBA, GLenum type=GL_UNSIGNED_BYTE, GLenum filter=GL_NEAREST) |
Makes a copy of the current buffer into a texture (regardless the attachments already have textures). | |
bool | copy_depth_to_texture (GLuint &texture_handle, unsigned int internal_format=GL_DEPTH24_STENCIL8, GLenum filter=GL_NEAREST) |
Makes a copy of the current depth buffer into a texture. | |
void | print_attachments () const |
Print all the attachments of the current framebuffer object. | |
void | print_draw_buffers () const |
Print the draw buffers. | |
void | print_read_buffer () const |
Print the read buffer. | |
bool | read_color (unsigned int index, unsigned char *buffer, unsigned int format, bool flip_vertically=true) const |
Read the color render buffer attached to color attachment at the given index. | |
bool | read_color (unsigned int index, std::vector< unsigned char > &buffer, unsigned int format, bool flip_vertically=true) const |
Read the color render buffer attached to color attachment at the given index. | |
bool | read_depth (float *buffer, bool flip_vertically=true) const |
Read the depth render buffer into a specified buffer. | |
bool | read_depth (std::vector< float > &buffer, bool flip_vertically=true) const |
Read the depth render buffer into a specified buffer. | |
bool | read_color (unsigned char rgba[4], int x, int y, int index=0) const |
Reads the color at the given pixel coordinates from the color render buffer attached to color attachment at the given index. | |
bool | read_depth (float &depth, int x, int y) const |
Reads the depth at the given pixel coordinates. | |
bool | snapshot_color (unsigned int index, const std::string &file_name) const |
Snapshots the color render buffer attached to color attachment at the given index into an image file. | |
bool | snapshot_depth (const std::string &file_name) const |
Snapshots the depth render buffer into an image file. | |
Static Public Member Functions | |
static bool | is_supported () |
Queries if FramebufferObject is supported. | |
static void | blit_framebuffer (FramebufferObject *target, const FramebufferObject *source, GLbitfield buffers, GLenum filter=GL_NEAREST) |
Blit the whole sized buffer. | |
static void | blit_framebuffer (FramebufferObject *target, const FramebufferObject *source, int target_color_attachment_index, int source_color_attachment_index, GLbitfield buffers, GLenum filter=GL_NEAREST) |
Blit the whole sized buffer of a specific color attachment. | |
static void | blit_framebuffer (FramebufferObject *target, int tx0, int ty0, int tx1, int ty1, const FramebufferObject *source, int sx0, int sy0, int sx1, int sy1, GLbitfield buffers, GLenum filter=GL_NEAREST) |
Blit a specified region. | |
static void | blit_framebuffer (FramebufferObject *target, int tx0, int ty0, int tx1, int ty1, const FramebufferObject *source, int sx0, int sy0, int sx1, int sy1, int target_color_attachment_index, int source_color_attachment_index, GLbitfield buffers, GLenum filter=GL_NEAREST) |
Blit a specified region of a specific color attachment. | |
An implementation of framebuffer object (FBO).
A framebuffer object is conceptually a structure containing pointers to GPU memory. The memory pointed to is either an OpenGL texture or an OpenGL RenderBuffer. FBOs can be used to render to one or more textures, share depth buffers between multiple sets of color buffers/textures. http://oss.sgi.com/projects/ogl-sample/registry/EXT/framebuffer_object.txt for details.
Note that you need to create a FramebufferObject with more than one sample per pixel for primitives to be antialiased. To create a multisample framebuffer object you should set the sample property to a non-zero value. The default sample count of 0 represents a regular non-multisample framebuffer object. If the desired amount of samples per pixel is not supported by the hardware then the maximum number of samples per pixel will be used. The GL_EXT_framebuffer_multisample extension is required to create a framebuffer with more than one sample per pixel.
Example usage 1: draw to a fbo:
Example usage 2: draw the depth map of an object or a scene:
For both the above examples, it's easy to enable MSAA by creating a multisample FBO and render to it. But do remember to blit to a normal FBO before using the texture.
Current implement support only GL_TEXTURE_2D (see the texture_target_ variable), and it does not manage externally created textures.
FramebufferObject | ( | int | w, |
int | h, | ||
int | samples = 0 ) |
Constructor.
w | The width of the framebuffer. |
h | The height of the framebuffer. |
samples | The number of samples per pixel. |
void activate_draw_buffer | ( | unsigned int | index | ) | const |
Choose the buffers to render into. This command lets you select which attachments are written to.
index | The index of the buffer. |
void activate_draw_buffers | ( | unsigned int | minId, |
unsigned int | maxId ) const |
Choose the buffers in the range [minId, ... maxId] to render into.
minId | The minimum index of the buffer. |
maxId | The maximum index of the buffer. |
void activate_draw_buffers | ( | unsigned int | num_buffers, |
const unsigned int | indices[] ) const |
Choose the buffers to render into.
num_buffers | The number of buffers. |
indices | The indices of the buffers. |
void activate_read_buffer | ( | unsigned int | index | ) | const |
Choose the buffers to read from. This command lets you select which attachment to read from.
index | The index of the buffer. |
bool add_color_buffer | ( | GLenum | internal_format = GL_RGBA8, |
GLenum | format = GL_RGBA, | ||
GLenum | type = GL_UNSIGNED_BYTE ) |
Add a color render buffer.
internal_format | The internal format of the buffer. It looks like GL_[components][size][type], e.g., GL_RG8, GL_RGBA16, GL_R16F, GL_RG16, GL_RGBA32F. |
format | The format of the pixel data, e.g., GL_RED, GL_RG, GL_RGB, GL_BGR, GL_BGRA. |
type | The data type of the pixel data, e.g., GL_BYTE, GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT. |
bool add_color_texture | ( | GLenum | internal_format = GL_RGBA8, |
GLenum | format = GL_RGBA, | ||
GLenum | type = GL_UNSIGNED_BYTE, | ||
GLenum | filter = GL_NEAREST ) |
Add a color texture render buffer.
internal_format | The internal format of the texture. It looks like GL_[components][size][type], e.g., GL_RG8, GL_RGBA16, GL_R16F, GL_RG16, GL_RGBA32F. |
format | The format of the pixel data, e.g., GL_RED, GL_RG, GL_RGB, GL_BGR, GL_BGRA. |
type | The data type of the pixel data, e.g., GL_BYTE, GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT. |
filter | The texture minifying/magnification functions, e.g., GL_NEAREST, GL_LINEAR. |
bool add_depth_buffer | ( | GLenum | internal_format = GL_DEPTH24_STENCIL8 | ) |
Add a depth render buffer.
internal_format | The internal format of the buffer, e.g., GL_DEPTH_COMPONENT32, GL_DEPTH_COMPONENT32F, GL_DEPTH24_STENCIL8, GL_DEPTH32F_STENCIL8, GL_DEPTH_COMPONENT16 |
bool add_depth_texture | ( | GLenum | internal_format = GL_DEPTH24_STENCIL8, |
GLenum | filter = GL_NEAREST, | ||
GLenum | compare_mode = GL_NONE, | ||
GLenum | compare_func = GL_LEQUAL ) |
Add a depth texture render buffer.
internal_format | The internal format of the texture, e.g., GL_DEPTH_COMPONENT32, GL_DEPTH_COMPONENT32F, GL_DEPTH24_STENCIL8, GL_DEPTH32F_STENCIL8, GL_DEPTH_COMPONENT16 |
filter | The texture minifying/magnification functions, e.g., GL_NEAREST, GL_LINEAR. |
compare_mode | The compare mode for the texture, e.g., GL_NONE, GL_COMPARE_REF_TO_TEXTURE. |
compare_func | The compare function for the texture, e.g., GL_GEQUAL, GL_LESS, GL_GREATER, GL_EQUAL, GL_NOTEQUAL, GL_ALWAYS(for 1.0) and GL_NEVER(for 0.0). |
bool attach_color_texture | ( | GLenum | target, |
GLuint | texture_id, | ||
GLenum | attachment ) |
Attach an existing color texture to the framebuffer.
target | The target texture type. GL_TEXTURE_2D, GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_2D_ARRAY |
texture_id | The ID of the texture. |
attachment | The attachment point. GL_COLOR_ATTACHMENTi |
bool attach_depth_texture | ( | GLenum | target, |
GLuint | texture_id, | ||
GLenum | attachment ) |
Attach an existing depth texture to the framebuffer.
target | The target texture type. GL_TEXTURE_2D, GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_2D_ARRAY |
texture_id | The ID of the texture. |
attachment | The attachment point. GL_DEPTH_ATTACHMENT, GL_STENCIL_ATTACHMENT or GL_DEPTH_STENCIL_ATTACHMENT. |
bool bind | ( | GLenum | target = GL_FRAMEBUFFER | ) |
|
static |
Blit the whole sized buffer.
Blits from the source rectangle in the source framebuffer object to the target rectangle in the target framebuffer object. If source or target is 0, the default framebuffer will be used instead of a framebuffer object as source or target respectively. The buffers parameter should be a mask consisting of any combination of GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, and GL_STENCIL_BUFFER_BIT. Any buffer type that is not present both in the source and target buffers is ignored.
The source and target rectangles may have different sizes; in this case buffers should not contain GL_DEPTH_BUFFER_BIT or GL_STENCIL_BUFFER_BIT. The filter parameter should be set to GL_LINEAR or GL_NEAREST specifying whether linear or nearest interpolation should be used for scaling. For GL_DEPTH_BUFFER_BIT or GL_STENCIL_BUFFER_BIT, the filter parameter must be GL_NEAREST.
If source equals target a copy is performed within the same buffer. Results are undefined if the source and target rectangles overlap and have different sizes. The sizes must also be the same if any of the framebuffer objects are multisample frame buffers.
When multiple render targets are in use, source_color_attachment_index and target_color_attachment_index specify the index of the color attachments in the source and destination frame buffers.
target | The target framebuffer object. |
source | The source framebuffer object. |
buffers | The buffers to blit (e.g., GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT, or GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT). |
filter | The interpolation method (GL_LINEAR or GL_NEAREST). |
|
static |
Blit the whole sized buffer of a specific color attachment.
target | The target framebuffer object. |
source | The source framebuffer object. |
target_color_attachment_index | The index of the color attachment in the target framebuffer. |
source_color_attachment_index | The index of the color attachment in the source framebuffer. |
buffers | The buffers to blit (e.g., GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT, or GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT). |
filter | The interpolation method (GL_LINEAR or GL_NEAREST). |
|
static |
Blit a specified region.
target | The target framebuffer object. |
tx0 | The x-coordinate of the lower-left corner of the target rectangle. |
ty0 | The y-coordinate of the lower-left corner of the target rectangle. |
tx1 | The x-coordinate of the upper-right corner of the target rectangle. |
ty1 | The y-coordinate of the upper-right corner of the target rectangle. |
source | The source framebuffer object. |
sx0 | The x-coordinate of the lower-left corner of the source rectangle. |
sy0 | The y-coordinate of the lower-left corner of the source rectangle. |
sx1 | The x-coordinate of the upper-right corner of the source rectangle. |
sy1 | The y-coordinate of the upper-right corner of the source rectangle. |
buffers | The buffers to blit (e.g., GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT, , or GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT). |
filter | The interpolation method (GL_LINEAR or GL_NEAREST). |
|
static |
Blit a specified region of a specific color attachment.
target | The target framebuffer object. |
tx0 | The x-coordinate of the lower-left corner of the target rectangle. |
ty0 | The y-coordinate of the lower-left corner of the target rectangle. |
tx1 | The x-coordinate of the upper-right corner of the target rectangle. |
ty1 | The y-coordinate of the upper-right corner of the target rectangle. |
source | The source framebuffer object. |
sx0 | The x-coordinate of the lower-left corner of the source rectangle. |
sy0 | The y-coordinate of the lower-left corner of the source rectangle. |
sx1 | The x-coordinate of the upper-right corner of the source rectangle. |
sy1 | The y-coordinate of the upper-right corner of the source rectangle. |
target_color_attachment_index | The index of the color attachment in the target framebuffer. |
source_color_attachment_index | The index of the color attachment in the source framebuffer. |
buffers | The buffers to blit (e.g., GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT, , or GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT). |
filter | The interpolation method (GL_LINEAR or GL_NEAREST). |
GLuint color_texture | ( | unsigned int | index = 0, |
bool | resolve = true ) const |
Returns the texture ID attached to the color attachment at the given index.
index | The index of the color attachment. |
resolve | If a multisample framebuffer object is used, the function blits and returns the resolved non-multisample texture when resolve is true. |
bool copy_color_to_texture | ( | GLuint & | texture_handle, |
unsigned int | index = 0, | ||
int | internal_format = GL_RGBA8, | ||
GLenum | format = GL_RGBA, | ||
GLenum | type = GL_UNSIGNED_BYTE, | ||
GLenum | filter = GL_NEAREST ) |
Makes a copy of the current buffer into a texture (regardless the attachments already have textures).
Internally it creates a texture and uses glCopyTexSubImage2D() to directly copy the buffer in it.
texture_handle | The target texture (will be created if it does not exist). |
index | The index of the color attachment. |
internal_format | The internal format of the texture. |
format | The format of the pixel data. |
type | The data type of the pixel data. The internal_format / format / type together define the texture format and hence which and how components of the buffer are copied into the texture. See the glTexImage2D() documentation for details. The typical internal_format/format/type combinations are: For depth: GL_DEPTH_COMPONENT32, GL_DEPTH_COMPONENT24 / GL_DEPTH_COMPONENT / GL_UNSIGNED_BYTE GL_DEPTH_COMPONENT32F / GL_DEPTH_COMPONENT / GL_FLOAT For color: GL_RGBA8 / GL_RGBA / GL_UNSIGNED_BYTE internal_format must be GL_[components][size][type], e.g., GL_RG8, GL_RGBA16, GL_R16F, GL_RG16, GL_RGBA32F ... format must be one of the GL_RED, GL_RG, GL_RGB, GL_BGR, GL_BGRA ... type can be GL_UNSIGNED_BYTE, GL_BYTE, GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT ... Use GL_LUMINANCE as the internal_format and GL_RED, GL_GREEN or GL_BLUE as format to capture a single color component as a luminance (gray scaled) value. |
filter | The texture minifying/magnification functions. |
bool copy_depth_to_texture | ( | GLuint & | texture_handle, |
unsigned int | internal_format = GL_DEPTH24_STENCIL8, | ||
GLenum | filter = GL_NEAREST ) |
Makes a copy of the current depth buffer into a texture.
texture_handle | The target texture (will be created if it does not exist). |
internal_format | The internal format of the texture. |
filter | The texture minifying/magnification functions. |
int depth_bits | ( | ) | const |
Returns the depth bits.
GLuint depth_texture | ( | bool | resolve = true | ) | const |
Returns the texture ID for the texture attached to the depth attachment.
resolve | If a multisample framebuffer object is used, the function blits and returns the resolved non-multisample texture if resolve is true. |
void ensure_size | ( | int | w, |
int | h ) |
Ensure the size of the buffers is (w, h). If its size matches the required size, i.e, (w, h), it does nothing. Otherwise, it resizes the buffers.
w | The width of the buffers. |
h | The height of the buffers. |
|
inline |
Returns the OpenGL framebuffer object handle for this framebuffer object. This handle can be used to attach new images or buffers to the framebuffer. If you attach images or buffers, you are responsible for cleaning up and destroying these objects.
bool has_color_attachment | ( | unsigned int | index | ) | const |
Checks if the framebuffer object has a color attachment at the given index.
index | The index of the color attachment. |
bool has_color_texture | ( | unsigned int | index | ) | const |
Checks if the framebuffer object has a color texture at the given index.
index | The index of the color texture. |
bool has_depth_attachment | ( | ) | const |
Checks if the framebuffer object has a depth attachment.
bool has_depth_texture | ( | ) | const |
Checks if the framebuffer object has a depth texture.
bool has_stencil | ( | ) | const |
Checks if the framebuffer object has a stencil buffer.
|
inline |
Returns the height of the render buffers.
bool is_bound | ( | GLenum | target = GL_FRAMEBUFFER | ) | const |
Check if the framebuffer object is currently bound to the current context.
target | The target framebuffer. |
|
static |
Queries if FramebufferObject is supported.
bool is_valid | ( | ) | const |
Returns true if the framebuffer object is valid.
Returns true if the framebuffer object is valid.
The framebuffer can become invalid if the initialization process fails, the user attaches an invalid buffer to the framebuffer object, or a non-power of two width/height is specified as the texture size if the texture target is {GL_TEXTURE_2D}
. The non-power of two limitation does not apply if the OpenGL version is 2.0 or higher, or if the GL_ARB_texture_non_power_of_two extension is present.
The framebuffer can also become invalid if the OpenGL context that the framebuffer was created within is destroyed and there are no other shared contexts that can take over ownership of the framebuffer.
int num_color_attachments | ( | ) | const |
Returns the number of color attachments.
bool read_color | ( | unsigned char | rgba[4], |
int | x, | ||
int | y, | ||
int | index = 0 ) const |
Reads the color at the given pixel coordinates from the color render buffer attached to color attachment at the given index.
rgba | The buffer to read into. |
x | The x-coordinate of the pixel (in the OpenGL coordinate system). |
y | The y-coordinate of the pixel (in the OpenGL coordinate system). |
index | The index of the color attachment. |
bool read_color | ( | unsigned int | index, |
std::vector< unsigned char > & | buffer, | ||
unsigned int | format, | ||
bool | flip_vertically = true ) const |
Read the color render buffer attached to color attachment at the given index.
index | The index of the color attachment. |
buffer | The buffer to read into. |
format | The format of the pixel data. Supported formats: GL_RGB, GL_BGR, GL_RGBA, and GL_BGRA. |
flip_vertically | If true, flips the buffer vertically. |
bool read_color | ( | unsigned int | index, |
unsigned char * | buffer, | ||
unsigned int | format, | ||
bool | flip_vertically = true ) const |
Read the color render buffer attached to color attachment at the given index.
index | The index of the color attachment. |
buffer | The buffer to read into. |
format | The format of the pixel data. Supported formats: GL_RGB, GL_BGR, GL_RGBA, and GL_BGRA. |
flip_vertically | If true, flips the buffer vertically. |
bool read_depth | ( | float & | depth, |
int | x, | ||
int | y ) const |
Reads the depth at the given pixel coordinates.
depth | The buffer to read into. |
x | The x-coordinate of the pixel (in the OpenGL coordinate system). |
y | The y-coordinate of the pixel (in the OpenGL coordinate system). |
bool read_depth | ( | float * | buffer, |
bool | flip_vertically = true ) const |
Read the depth render buffer into a specified buffer.
buffer | The buffer to read into. |
flip_vertically | If true, flips the buffer vertically. |
bool read_depth | ( | std::vector< float > & | buffer, |
bool | flip_vertically = true ) const |
Read the depth render buffer into a specified buffer.
buffer | The buffer to read into. |
flip_vertically | If true, flips the buffer vertically. |
bool release | ( | GLenum | target = GL_FRAMEBUFFER | ) |
Switches rendering back to the default framebuffer.
target | The target framebuffer. |
|
inline |
Returns the number of samples per pixel.
bool snapshot_color | ( | unsigned int | index, |
const std::string & | file_name ) const |
Snapshots the color render buffer attached to color attachment at the given index into an image file.
index | The index of the color attachment. |
file_name | The name of the image file. |
bool snapshot_depth | ( | const std::string & | file_name | ) | const |
Snapshots the depth render buffer into an image file.
file_name | The name of the image file. |
GLenum texture_target | ( | ) | const |
Returns the texture target.
|
inline |
Returns the width of the render buffers.