- Merged revision 5183 from trunk.
- Fixed support for Android. Following features are still unavailable in ogl-es branch since rev 5181: * OpenGL ES1 * Cubemap textures in OpenGL drivers * Support for iOS * Support for OSX (If you need one of those features please use rev 5180) git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5184 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
96cf944466
commit
e8db0e6662
|
@ -68,7 +68,7 @@ enum E_TEXTURE_CREATION_FLAG
|
||||||
//! Allow the driver to keep a copy of the texture in memory
|
//! Allow the driver to keep a copy of the texture in memory
|
||||||
/** This makes calls to ITexture::lock a lot faster, but costs main memory.
|
/** This makes calls to ITexture::lock a lot faster, but costs main memory.
|
||||||
Default is off, except for font-texture which always enable this flag.
|
Default is off, except for font-texture which always enable this flag.
|
||||||
Currently only used in combination with OpenGL-ES2. */
|
Currently only used in combination with OpenGL drivers. */
|
||||||
ETCF_ALLOW_MEMORY_COPY = 0x00000080,
|
ETCF_ALLOW_MEMORY_COPY = 0x00000080,
|
||||||
|
|
||||||
/** This flag is never used, it only forces the compiler to compile
|
/** This flag is never used, it only forces the compiler to compile
|
||||||
|
|
|
@ -157,18 +157,16 @@ LOCAL_SRC_FILES := \
|
||||||
COGLES2NormalMapRenderer.cpp \
|
COGLES2NormalMapRenderer.cpp \
|
||||||
COGLES2ParallaxMapRenderer.cpp \
|
COGLES2ParallaxMapRenderer.cpp \
|
||||||
COGLES2Renderer2D.cpp \
|
COGLES2Renderer2D.cpp \
|
||||||
COGLES2Texture.cpp \
|
|
||||||
COGLESDriver.cpp \
|
COGLESDriver.cpp \
|
||||||
COGLESExtensionHandler.cpp \
|
COGLESExtensionHandler.cpp \
|
||||||
COGLESTexture.cpp \
|
|
||||||
COgreMeshFileLoader.cpp \
|
COgreMeshFileLoader.cpp \
|
||||||
|
COpenGLCacheHandler.cpp \
|
||||||
COpenGLDriver.cpp \
|
COpenGLDriver.cpp \
|
||||||
COpenGLExtensionHandler.cpp \
|
COpenGLExtensionHandler.cpp \
|
||||||
COpenGLNormalMapRenderer.cpp \
|
COpenGLNormalMapRenderer.cpp \
|
||||||
COpenGLParallaxMapRenderer.cpp \
|
COpenGLParallaxMapRenderer.cpp \
|
||||||
COpenGLShaderMaterialRenderer.cpp \
|
COpenGLShaderMaterialRenderer.cpp \
|
||||||
COpenGLSLMaterialRenderer.cpp \
|
COpenGLSLMaterialRenderer.cpp \
|
||||||
COpenGLTexture.cpp \
|
|
||||||
COSOperator.cpp \
|
COSOperator.cpp \
|
||||||
CPakReader.cpp \
|
CPakReader.cpp \
|
||||||
CParticleAnimatedMeshSceneNodeEmitter.cpp \
|
CParticleAnimatedMeshSceneNodeEmitter.cpp \
|
||||||
|
|
|
@ -216,22 +216,22 @@ void CGUIFont::setMaxHeight()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGUIFont::pushTextureCreationFlags(bool (&flags)[3])
|
void CGUIFont::pushTextureCreationFlags(bool(&flags)[3])
|
||||||
{
|
{
|
||||||
flags[0] = Driver->getTextureCreationFlag ( video::ETCF_ALLOW_NON_POWER_2 );
|
flags[0] = Driver->getTextureCreationFlag(video::ETCF_ALLOW_NON_POWER_2);
|
||||||
flags[1] = Driver->getTextureCreationFlag ( video::ETCF_CREATE_MIP_MAPS );
|
flags[1] = Driver->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS);
|
||||||
flags[2] = Driver->getTextureCreationFlag ( video::ETCF_ALLOW_MEMORY_COPY );
|
flags[2] = Driver->getTextureCreationFlag(video::ETCF_ALLOW_MEMORY_COPY);
|
||||||
|
|
||||||
Driver->setTextureCreationFlag(video::ETCF_ALLOW_NON_POWER_2, true);
|
Driver->setTextureCreationFlag(video::ETCF_ALLOW_NON_POWER_2, true);
|
||||||
Driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false );
|
Driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false);
|
||||||
Driver->setTextureCreationFlag(video::ETCF_ALLOW_MEMORY_COPY, true);
|
Driver->setTextureCreationFlag(video::ETCF_ALLOW_MEMORY_COPY, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGUIFont::popTextureCreationFlags(bool (&flags)[3])
|
void CGUIFont::popTextureCreationFlags(bool(&flags)[3])
|
||||||
{
|
{
|
||||||
Driver->setTextureCreationFlag( video::ETCF_ALLOW_NON_POWER_2, flags[0] );
|
Driver->setTextureCreationFlag(video::ETCF_ALLOW_NON_POWER_2, flags[0]);
|
||||||
Driver->setTextureCreationFlag( video::ETCF_CREATE_MIP_MAPS, flags[1] );
|
Driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, flags[1]);
|
||||||
Driver->setTextureCreationFlag( video::ETCF_ALLOW_MEMORY_COPY, flags[2] );
|
Driver->setTextureCreationFlag(video::ETCF_ALLOW_MEMORY_COPY, flags[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//! loads a font file, native file needed, for texture parsing
|
//! loads a font file, native file needed, for texture parsing
|
||||||
|
|
|
@ -98,8 +98,8 @@ private:
|
||||||
s32 getAreaFromCharacter (const wchar_t c) const;
|
s32 getAreaFromCharacter (const wchar_t c) const;
|
||||||
void setMaxHeight();
|
void setMaxHeight();
|
||||||
|
|
||||||
void pushTextureCreationFlags(bool (&flags)[3]);
|
void pushTextureCreationFlags(bool(&flags)[3]);
|
||||||
void popTextureCreationFlags(bool (&flags)[3]);
|
void popTextureCreationFlags(bool(&flags)[3]);
|
||||||
|
|
||||||
core::array<SFontArea> Areas;
|
core::array<SFontArea> Areas;
|
||||||
core::map<wchar_t, s32> CharacterMap;
|
core::map<wchar_t, s32> CharacterMap;
|
||||||
|
|
Loading…
Reference in New Issue