Fixes to the new texture subloading methods.

This commit is contained in:
Robert Osfield
2002-07-29 00:04:07 +00:00
parent 6b59f66d80
commit 067dc6cddf
5 changed files with 6 additions and 7 deletions

View File

@@ -169,7 +169,6 @@ const unsigned int Image::computeRowWidthInBytes(int width,GLenum format,GLenum
return (widthInBits/packingInBits + ((widthInBits%packingInBits)?1:0))*packing;
}
void Image::setInternalTextureFormat(GLint internalFormat)
{
// won't do any sanity checking right now, leave it to

View File

@@ -230,7 +230,7 @@ void Texture::apply(State& state) const
if (_subloadMode == AUTO ||
(_subloadMode == IF_DIRTY && modifiedTag != _image->getModifiedTag()))
{
glPixelStorei(GL_UNPACK_ROW_LENGTH,_image->getRowSizeInBytes());
glPixelStorei(GL_UNPACK_ROW_LENGTH,_image->s());
glTexSubImage2D(_target, 0,
_subloadTextureOffsetX, _subloadTextureOffsetY,
@@ -576,7 +576,7 @@ void Texture::applyTexImage(GLenum target, Image* image, State& state) const
NULL);
glPixelStorei(GL_UNPACK_ROW_LENGTH,image->getRowSizeInBytes());
glPixelStorei(GL_UNPACK_ROW_LENGTH,image->s());
glTexSubImage2D(target, 0,
_subloadTextureOffsetX, _subloadTextureOffsetY,

View File

@@ -204,9 +204,9 @@ void TextureCubeMap::apply(State& state) const
(_subloadMode == IF_DIRTY && modifiedTag != _images[n]->getModifiedTag()))
{
if (rowwidth != _images[n]->getRowSizeInBytes())
if (rowwidth != _images[n]->s())
{
rowwidth = _images[n]->getRowSizeInBytes();
rowwidth = _images[n]->s();
glPixelStorei(GL_UNPACK_ROW_LENGTH,rowwidth);
}