Revert " following guidance from OpenGL Common Mistakes:"
This commit is contained in:
parent
9b6fa79e32
commit
821ca4e5cd
@ -2298,8 +2298,9 @@ void Texture::applyTexImage2D_load(State& state, GLenum target, const Image* ima
|
|||||||
if (height == 0)
|
if (height == 0)
|
||||||
height = 1;
|
height = 1;
|
||||||
|
|
||||||
glTexImage2D( target, k, _internalFormat,
|
glTexSubImage2D( target, k,
|
||||||
width, height, _borderWidth,
|
0, 0,
|
||||||
|
width, height,
|
||||||
(GLenum)image->getPixelFormat(),
|
(GLenum)image->getPixelFormat(),
|
||||||
(GLenum)image->getDataType(),
|
(GLenum)image->getDataType(),
|
||||||
dataPtr + image->getMipmapOffset(k));
|
dataPtr + image->getMipmapOffset(k));
|
||||||
@ -2602,11 +2603,12 @@ void Texture::applyTexImage2D_subload(State& state, GLenum target, const Image*
|
|||||||
if (height == 0)
|
if (height == 0)
|
||||||
height = 1;
|
height = 1;
|
||||||
|
|
||||||
glTexImage2D( target, k, _internalFormat,
|
glTexSubImage2D( target, k,
|
||||||
width, height, _borderWidth,
|
0, 0,
|
||||||
(GLenum)image->getPixelFormat(),
|
width, height,
|
||||||
(GLenum)image->getDataType(),
|
(GLenum)image->getPixelFormat(),
|
||||||
dataPtr + image->getMipmapOffset(k));
|
(GLenum)image->getDataType(),
|
||||||
|
dataPtr + image->getMipmapOffset(k));
|
||||||
|
|
||||||
width >>= 1;
|
width >>= 1;
|
||||||
height >>= 1;
|
height >>= 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user