Home | History | Annotate | Download | only in libGLESv2

Lines Matching refs:Texture

7 // Texture.cpp: Implements the gl::Texture class and its derived classes
8 // Texture2D and TextureCubeMap. Implements GL texture objects and related
11 #include "libGLESv2/Texture.h"
27 Texture::Image::Image()
32 Texture::Image::~Image()
37 Texture::Texture(GLuint id) : RefCountObject(id)
54 Texture::~Texture()
58 Blit *Texture::getBlitter()
65 bool Texture::setMinFilter(GLenum filter)
89 bool Texture::setMagFilter(GLenum filter)
109 bool Texture::setWrapS(GLenum wrap)
130 bool Texture::setWrapT(GLenum wrap)
150 GLenum Texture::getMinFilter() const
155 GLenum Texture::getMagFilter() const
160 GLenum Texture::getWrapS() const
165 GLenum Texture::getWrapT() const
170 GLuint Texture::getWidth() const
175 GLuint Texture::getHeight() const
180 bool Texture::isFloatingPoint() const
185 bool Texture::isRenderableFormat() const
208 D3DFORMAT Texture::selectFormat(GLenum format, GLenum type)
246 void Texture::loadImageData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type,
352 void Texture::loadAlphaImageData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
372 void Texture::loadAlphaFloatImageData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
392 void Texture::loadAlphaHalfFloatImageData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
412 void Texture::loadLuminanceImageData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
441 void Texture::loadLuminanceFloatImageData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
461 void Texture::loadLuminanceHalfFloatImageData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
481 void Texture::loadLuminanceAlphaImageData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
510 void Texture::loadLuminanceAlphaFloatImageData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
530 void Texture
550 void Texture::loadRGBUByteImageData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
570 void Texture::loadRGB565ImageData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
591 void Texture::loadRGBFloatImageData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
611 void Texture::loadRGBHalfFloatImageData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
631 void Texture::loadRGBAUByteImageData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
651 void Texture::loadRGBA4444ImageData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
672 void Texture::loadRGBA5551ImageData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
693 void Texture::loadRGBAFloatImageData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
707 void Texture::loadRGBAHalfFloatImageData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
721 void Texture::loadBGRAImageData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
735 void Texture::createSurface(GLsizei width, GLsizei height, GLenum format, GLenum type, Image *img)
783 void Texture::setImage(GLsizei width, GLsizei height, GLenum format, GLenum type, GLint unpackAlignment, const void *pixels, Image *img)
809 void Texture::setCompressedImage(GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *pixels, Image *img)
832 bool Texture::subImage(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint unpackAlignment, const void *pixels, Image *img)
867 bool Texture::subImageCompressed(GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *pixels, Image *img)
916 // This implements glCopyTex[Sub]Image2D for non-renderable internal texture formats
917 void Texture::copyNonRenderable(Image *image, GLenum internalFormat, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height, IDirect3DSurface9 *renderTarget)
1085 D3DFORMAT Texture::getD3DFormat() const
1090 IDirect3DBaseTexture9 *Texture::getTexture()
1114 bool Texture::isDirty() const
1119 // Returns the top-level texture surface as a render target
1120 void Texture::needRenderTarget()
1136 void Texture::dropTexture()
1146 void Texture::pushTexture(IDirect3DBaseTexture9 *newTexture, bool renderable)
1155 GLint Texture::creationLevels(GLsizei width, GLsizei height, GLint maxlevel) const
1168 GLint Texture::creationLevels(GLsizei size, GLint maxlevel) const
1173 int Texture::levelCount() const
1178 bool Texture::isRenderable() const
1183 Texture2D::Texture2D(GLuint id) : Texture(id)
1209 // While OpenGL doesn't check texture consistency until draw-time, D3D9 requires a complete texture
1210 // for render-to-texture (such as CopyTexImage). We have no way of keeping individual inconsistent levels.
1211 // Call this when a particular level of the texture must be defined with a specific format, width and height.
1213 // Returns true if the existing texture was unsuitable and had to be destroyed. If so, it will also set
1214 // a new height and width for the texture by working backwards from the given width and height.
1230 TRACE("Redefining 2D texture (%d, 0x%04X, %d, %d => 0x%04X, %d, %d).", level,
1234 // Purge all the levels and the texture.
1267 Texture::setImage(width, height, format, type, unpackAlignment, pixels, &mImageArray[level]);
1274 Texture::setCompressedImage(width, height, internalFormat, imageSize, pixels, &mImageArray[level]);
1314 if (Texture::subImage(xoffset, yoffset, width, height, format, type, unpackAlignment, pixels, &mImageArray[level]))
1322 if (Texture::subImageCompressed(xoffset, yoffset, width, height, format, imageSize, pixels, &mImageArray[level]))
1427 // Tests for GL texture object completeness. [OpenGL ES 2.0.24] section 3.7.10 page 81.
1507 // Constructs a Direct3D 9 texture resource from the texture images, or returns an existing one
1510 IDirect3DTexture9 *texture;
1515 HRESULT result = device->CreateTexture(mWidth, mHeight, creationLevels(mWidth, mHeight, 0), 0, format, D3DPOOL_DEFAULT, &texture, NULL);
1524 mTexture = texture;
1525 return texture;
1558 IDirect3DTexture9 *texture = NULL;
1566 HRESULT result = device->CreateTexture(mWidth, mHeight, creationLevels(mWidth, mHeight, 0), D3DUSAGE_RENDERTARGET, format, D3DPOOL_DEFAULT, &texture, NULL);
1586 texture->Release();
1592 result = texture->GetSurfaceLevel(i, &dest);
1598 texture->Release();
1611 texture->Release();
1629 mTexture = texture;
1748 TextureCubeMap::TextureCubeMap(GLuint id) : Texture(id)
1811 Texture::setCompressedImage(width, height, internalFormat, imageSize, pixels, &mImageArray[faceIndex(face)][level]);
1851 if (Texture::subImage(xoffset, yoffset, width, height, format, type, unpackAlignment, pixels, &mImageArray[faceIndex(target)][level]))
1859 if (Texture::subImageCompressed(xoffset, yoffset, width, height, format, imageSize, pixels, &mImageArray[faceIndex(target)][level]))
1865 // Tests for GL texture object completeness. [OpenGL ES 2.0.24] section 3.7.10 page 81.
1945 // Constructs a Direct3D 9 texture resource from the texture images, or returns an existing one
1951 IDirect3DCubeTexture9 *texture;
1953 HRESULT result = device->CreateCubeTexture(mWidth, creationLevels(mWidth, 0), 0, format, D3DPOOL_DEFAULT, &texture, NULL);
1963 mTexture = texture;
1999 IDirect3DCubeTexture9 *texture = NULL;
2007 HRESULT result = device->CreateCubeTexture(mWidth, creationLevels(mWidth, 0), D3DUSAGE_RENDERTARGET, format, D3DPOOL_DEFAULT, &texture, NULL);
2029 texture->Release();
2035 result = texture->GetCubeMapSurface(static_cast<D3DCUBEMAP_FACES>(f), i, &dest);
2041 texture->Release();
2054 texture->Release();
2070 mTexture = texture;
2078 Texture::setImage(width, height, format, type, unpackAlignment, pixels, &mImageArray[face][level]);
2107 // While OpenGL doesn't check texture consistency until draw-time, D3D9 requires a complete texture
2108 // for render-to-texture (such as CopyTexImage). We have no way of keeping individual inconsistent levels & faces.
2109 // Call this when a particular level of the texture must be defined with a specific format, width and height.
2111 // Returns true if the existing texture was unsuitable had to be destroyed. If so, it will also set
2112 // a new size for the texture by working backwards from the given size.
2122 texture (%d, 0x%04X, %d => 0x%04X, %d).", level,
2126 // Purge all the levels and the texture.
2422 Texture::TextureColorbufferProxy::TextureColorbufferProxy(Texture *texture, GLenum target)
2423 : Colorbuffer(texture), mTexture(texture), mTarget(target)
2428 void Texture::TextureColorbufferProxy::addRef() const
2433 void Texture::TextureColorbufferProxy::release() const
2438 IDirect3DSurface9 *Texture::TextureColorbufferProxy::getRenderTarget()
2447 int Texture::TextureColorbufferProxy::getWidth() const
2452 int Texture::TextureColorbufferProxy::getHeight() const
2457 GLenum Texture::TextureColorbufferProxy::getFormat() const
2462 bool Texture::TextureColorbufferProxy::isFloatingPoint() const