Move the applying of Projection and ModelView matrices into osg::State so that

it now maintains references to the last applied matrices, automatically doing
lazy state updating.  This simplifies the various places in the OSG which
were previously doing the applying, add paves the way for managing the
projection matrix within the scene graph.

Remove MemoryAdapter and mem_ptr as they arn't being used, and can potentially
confuse users by their existance.
This commit is contained in:
Robert Osfield
2002-03-29 17:26:40 +00:00
parent 07f9421f39
commit 56cee8c711
13 changed files with 92 additions and 335 deletions

View File

@@ -462,11 +462,11 @@ void Texture::applyTexImage(GLenum target, Image* image, State& state) const
// calculate texture dimension
_textureWidth = 1;
for (; _textureWidth < (_subloadOffsX + width); _textureWidth <<= 1)
for (; _textureWidth < (static_cast<GLsizei>(_subloadOffsX) + width); _textureWidth <<= 1)
;
_textureHeight = 1;
for (; _textureHeight < (_subloadOffsY + height); _textureHeight <<= 1)
for (; _textureHeight < (static_cast<GLsizei>(_subloadOffsY) + height); _textureHeight <<= 1)
;
// reserve appropriate texture memory