From 9d4ee0d7664de2f07f5d3fb1d85854a99e7826e6 Mon Sep 17 00:00:00 2001 From: OpenSceneGraph git repository Date: Mon, 1 Jan 2018 10:12:09 +0000 Subject: [PATCH] Improved spacing and indentaton To keep things consistent with the rest of the OSG --- src/osg/ImageTexture.cpp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/osg/ImageTexture.cpp b/src/osg/ImageTexture.cpp index 242b09450..9a45e34e9 100644 --- a/src/osg/ImageTexture.cpp +++ b/src/osg/ImageTexture.cpp @@ -2,7 +2,8 @@ using namespace osg; -int ImageTextureBinding::compare(const osg::StateAttribute &sa)const{ +int ImageTextureBinding::compare(const osg::StateAttribute &sa) const +{ COMPARE_StateAttribute_Types(ImageTextureBinding,sa) // Compare each parameter in turn against the rhs. COMPARE_StateAttribute_Parameter(_target) @@ -14,15 +15,18 @@ int ImageTextureBinding::compare(const osg::StateAttribute &sa)const{ return 0; } -void ImageTextureBinding::apply(osg::State&state)const{ - if(_target.valid()){ - osg::Texture::TextureObject *to = _target->getTextureObject( state.getContextID() ); - if( !to ){ - // _target never been applied yet - _target->apply(state); - to = _target->getTextureObject( state.getContextID() ); - } - state.get()->glBindImageTexture(_imageunit, to->id(), _level, _layered, _layer, _access, _format); +void ImageTextureBinding::apply(osg::State&state) const +{ + if(_target.valid()) + { + osg::Texture::TextureObject *to = _target->getTextureObject( state.getContextID() ); + if( !to ) + { + // _target never been applied yet + _target->apply(state); + to = _target->getTextureObject( state.getContextID() ); + } + state.get()->glBindImageTexture(_imageunit, to->id(), _level, _layered, _layer, _access, _format); } }