#include <sglTexture2D.hpp>
Inheritance diagram for sglTexture2D::
Public Methods | |
sglTexture2D () | |
virtual | ~sglTexture2D () |
bool | setImage (void *image, ExternalFormatEnum format, TypeEnum type, unsigned int num_s, unsigned int num_t, bool border=false) |
void | getImage (void *&image, ExternalFormatEnum &format, TypeEnum &type, unsigned int &num_s, unsigned int &num_t, bool &border) const |
bool | setMipmapLevels (const vector< void *> &images) |
bool | subloadImage (void *sub_image, GLint level, GLint offset_x, GLint offset_y, GLint width, GLint height) |
virtual bool | replaceImage (void *new_image, GLint level=0) |
void | getSize (unsigned int &width, unsigned int &height) const |
virtual unsigned int | getIdealInternalSize () const |
virtual unsigned int | getLikelyInternalSize () const |
void | setWrapMode (WrapEnum s_repeat_flag, WrapEnum t_repeat_flag) |
void | getWrapMode (WrapEnum &s_repeat_flag, WrapEnum &t_repeat_flag) const |
virtual bool | checkProxy () |
virtual void | bind () |
bool | copyTexSubImage (GLint level, GLint offset_x, GLint offset_y, GLint win_x, GLint win_y, GLint width, GLint height) |
virtual bool | buildMipmaps (vector< void *> &mipmaps) |
virtual void | printInfo (ostream &ostrm, const char *indent_string) const |
Static Public Methods | |
bool | resizeImage (sglTexture::ExternalFormatEnum format, sglTexture::TypeEnum type, unsigned int old_s, unsigned int old_t, bool border, unsigned int new_s, unsigned int new_t, void *old_image, void *&new_image) |
bool | halveImage (sglTexture::ExternalFormatEnum format, sglTexture::TypeEnum type, unsigned int &num_s, unsigned int &num_t, bool border, void *old_image, void *&new_image) |
Definition at line 39 of file sglTexture2D.hpp.
|
Set the image to be textured (level zero).
|
|
Set the mipmap images. Returns false if number of images is not correct or if the AutoMipmap feature is on. Assumes that the images are correct in size and format. Reimplemented from sglTexture. |
|
Replace all or part of a contiguous subregion of the current image.
|
|
Helper function to replace an entire image via subtexload funtionality. The new_image data must be the same size as the original image set by setImage, and the pointer to the old image data is lost. Returns false if the parameters are out of range. Reimplemented from sglTexture. |
|
Get the size of the level zero image.
Definition at line 98 of file sglTexture2D.hpp. |
|
Returns the number of bytes of texture memory this texture will use if the requested internal format was honored. Reimplemented from sglTexture. |
|
Returns the number of bytes of texture memory this texture is most likely using. Must be called by a thread with a current rendering context. Reimplemented from sglTexture. |
|
Get/set whether the texture repeats or is stretched by tex coords > 1.
|
|
Use the GL_PROXY_TEXTURE mechanism to check if the texture is capable of being loaded into texture memory. Returns false if the texture is too large. Must be called by a thread with a current rendering context. Reimplemented from sglTexture. |
|
Copy texture (and changes) into texture memory. If (getAutoBind() == false), this method must be called before before the texture can be applied. Must be called by a thread with a current rendering context. Reimplemented from sglTexture. |
|
Replace all or part of a contiguous subregion of the current image.
|
|
Generates a set of mipmaps from the level 0 image in this texture. Existing images in the given mipmaps vector will be resized (via realloc) and excess images will be free()'d. Returns false if the mipmaps could not be built. Reimplemented from sglTexture. |
|
Creates a new image (using malloc) from another image, but with a different size. Note that the new and old sizes are NOT constrained to be a power of two. Also note that this method is slow.
|
|
Creates a new image one quarter the size (x/2, y/2) of another image. This method is much faster than resizeImage(). Note that num_s and num_t must be divisible by two.
|
|
Output the state of this node to the specified ostream.
Reimplemented from sglTexture. |