mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
Allow to force a texture bind.
--HG-- branch : dev
This commit is contained in:
@@ -97,15 +97,17 @@ class EE_API TextureFactory : protected Mutex {
|
||||
|
||||
/** Bind the the internal Texture Id indicated. This is useful if you are rendering a texture outside this class.
|
||||
* @param TexId The internal Texture Id
|
||||
* @param coordinateType Use normalized or pixel coordinates
|
||||
* @param TextureUnit The Texture Unit binded
|
||||
* @param forceRebind Force the texture bind
|
||||
*/
|
||||
void bind( const Uint32& TexId, Texture::CoordinateType coordinateType = Texture::CoordinateType::Normalized, const Uint32& textureUnit = 0 );
|
||||
void bind( const Uint32& TexId, Texture::CoordinateType coordinateType = Texture::CoordinateType::Normalized, const Uint32& textureUnit = 0, const bool& forceRebind = false );
|
||||
|
||||
/** Bind the the Texture indicated. This is useful if you are rendering a texture outside this class.
|
||||
* @param Tex The Texture Pointer
|
||||
* @param TextureUnit The Texture Unit binded
|
||||
*/
|
||||
void bind( const Texture* Tex, Texture::CoordinateType coordinateType = Texture::CoordinateType::Normalized, const Uint32& TextureUnit = 0 );
|
||||
void bind( const Texture* Tex, Texture::CoordinateType coordinateType = Texture::CoordinateType::Normalized, const Uint32& TextureUnit = 0, const bool& forceRebind = false );
|
||||
|
||||
/**
|
||||
* @param TexId The internal Texture Id
|
||||
|
||||
@@ -239,7 +239,7 @@ class EE_API UIWindow : public UIWidget {
|
||||
|
||||
virtual void postDraw();
|
||||
|
||||
Sizei getFrameBufferSize();
|
||||
virtual Sizei getFrameBufferSize();
|
||||
|
||||
UISceneNode * getUISceneNode();
|
||||
};
|
||||
|
||||
@@ -109,9 +109,9 @@ Uint32 TextureFactory::findFreeSlot() {
|
||||
return (Uint32)mTextures.size() - 1;
|
||||
}
|
||||
|
||||
void TextureFactory::bind( const Texture* texture, Texture::CoordinateType coordinateType, const Uint32& TextureUnit ) {
|
||||
void TextureFactory::bind( const Texture* texture, Texture::CoordinateType coordinateType, const Uint32& TextureUnit, const bool& forceRebind ) {
|
||||
if( NULL != texture ) {
|
||||
if ( mCurrentTexture[ TextureUnit ] != (Int32)texture->getHandle() ) {
|
||||
if ( mCurrentTexture[ TextureUnit ] != (Int32)texture->getHandle() || forceRebind ) {
|
||||
if ( TextureUnit && GLi->isExtension( EEGL_ARB_multitexture ) )
|
||||
setActiveTextureUnit( TextureUnit );
|
||||
|
||||
@@ -153,8 +153,8 @@ void TextureFactory::bind( const Texture* texture, Texture::CoordinateType coord
|
||||
}
|
||||
}
|
||||
|
||||
void TextureFactory::bind( const Uint32& TexId, Texture::CoordinateType coordinateType, const Uint32& textureUnit ) {
|
||||
bind( getTexture( TexId ), coordinateType, textureUnit );
|
||||
void TextureFactory::bind( const Uint32& TexId, Texture::CoordinateType coordinateType, const Uint32& textureUnit, const bool& forceRebind ) {
|
||||
bind( getTexture( TexId ), coordinateType, textureUnit, forceRebind );
|
||||
}
|
||||
|
||||
void TextureFactory::unloadTextures() {
|
||||
|
||||
Reference in New Issue
Block a user