Commit f6f335af authored by hybrid's avatar hybrid

Some reindentation, minor bugfixes, removed unused members from ExtensionHandler.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1100 dfc29bdd-3216-0410-991c-e03cc46cb475
parent b2f55c36
...@@ -356,14 +356,14 @@ void COpenGLDriver::createMaterialRenderers() ...@@ -356,14 +356,14 @@ void COpenGLDriver::createMaterialRenderers()
lmr->drop(); lmr->drop();
// add remaining material renderer // add remaining material renderer
addAndDropMaterialRenderer(new COpenGLMaterialRenderer_DETAIL_MAP( this)); addAndDropMaterialRenderer(new COpenGLMaterialRenderer_DETAIL_MAP(this));
addAndDropMaterialRenderer(new COpenGLMaterialRenderer_SPHERE_MAP( this)); addAndDropMaterialRenderer(new COpenGLMaterialRenderer_SPHERE_MAP(this));
addAndDropMaterialRenderer(new COpenGLMaterialRenderer_REFLECTION_2_LAYER( this)); addAndDropMaterialRenderer(new COpenGLMaterialRenderer_REFLECTION_2_LAYER(this));
addAndDropMaterialRenderer(new COpenGLMaterialRenderer_TRANSPARENT_ADD_COLOR( this)); addAndDropMaterialRenderer(new COpenGLMaterialRenderer_TRANSPARENT_ADD_COLOR(this));
addAndDropMaterialRenderer(new COpenGLMaterialRenderer_TRANSPARENT_ALPHA_CHANNEL( this)); addAndDropMaterialRenderer(new COpenGLMaterialRenderer_TRANSPARENT_ALPHA_CHANNEL(this));
addAndDropMaterialRenderer(new COpenGLMaterialRenderer_TRANSPARENT_ALPHA_CHANNEL_REF( this)); addAndDropMaterialRenderer(new COpenGLMaterialRenderer_TRANSPARENT_ALPHA_CHANNEL_REF(this));
addAndDropMaterialRenderer(new COpenGLMaterialRenderer_TRANSPARENT_VERTEX_ALPHA( this)); addAndDropMaterialRenderer(new COpenGLMaterialRenderer_TRANSPARENT_VERTEX_ALPHA(this));
addAndDropMaterialRenderer(new COpenGLMaterialRenderer_TRANSPARENT_REFLECTION_2_LAYER( this)); addAndDropMaterialRenderer(new COpenGLMaterialRenderer_TRANSPARENT_REFLECTION_2_LAYER(this));
// add normal map renderers // add normal map renderers
s32 tmp = 0; s32 tmp = 0;
...@@ -511,7 +511,7 @@ bool COpenGLDriver::updateVertexHardwareBuffer(SHWBufferLink_opengl *HWBuffer) ...@@ -511,7 +511,7 @@ bool COpenGLDriver::updateVertexHardwareBuffer(SHWBufferLink_opengl *HWBuffer)
if (!HWBuffer) if (!HWBuffer)
return false; return false;
if (!VertexBufferObjectExtension) if (!FeatureAvailable[IRR_ARB_vertex_buffer_object])
return false; return false;
const scene::IMeshBuffer* mb = HWBuffer->MeshBuffer; const scene::IMeshBuffer* mb = HWBuffer->MeshBuffer;
...@@ -521,16 +521,16 @@ bool COpenGLDriver::updateVertexHardwareBuffer(SHWBufferLink_opengl *HWBuffer) ...@@ -521,16 +521,16 @@ bool COpenGLDriver::updateVertexHardwareBuffer(SHWBufferLink_opengl *HWBuffer)
u32 vertexSize = getVertexPitchFromType(vType); u32 vertexSize = getVertexPitchFromType(vType);
//buffer vertex data, and convert colours... //buffer vertex data, and convert colours...
core::array<c8> buffer(vertexSize * vertexCount); core::array<c8> buffer(vertexSize * vertexCount);
memcpy(buffer.pointer(), vertices, vertexSize * vertexCount); memcpy(buffer.pointer(), vertices, vertexSize * vertexCount);
// in order to convert the colours into opengl format (RGBA) // in order to convert the colours into opengl format (RGBA)
switch (vType) switch (vType)
{ {
case EVT_STANDARD: case EVT_STANDARD:
{ {
const S3DVertex* pb = reinterpret_cast<const S3DVertex*>(buffer.pointer()); const S3DVertex* pb = reinterpret_cast<const S3DVertex*>(buffer.pointer());
const S3DVertex* po = reinterpret_cast<const S3DVertex*>(vertices); const S3DVertex* po = reinterpret_cast<const S3DVertex*>(vertices);
for (u32 i=0; i<vertexCount; i++) for (u32 i=0; i<vertexCount; i++)
{ {
po[i].Color.toOpenGLColor((u8*)&(pb[i].Color.color)); po[i].Color.toOpenGLColor((u8*)&(pb[i].Color.color));
...@@ -540,7 +540,7 @@ bool COpenGLDriver::updateVertexHardwareBuffer(SHWBufferLink_opengl *HWBuffer) ...@@ -540,7 +540,7 @@ bool COpenGLDriver::updateVertexHardwareBuffer(SHWBufferLink_opengl *HWBuffer)
case EVT_2TCOORDS: case EVT_2TCOORDS:
{ {
const S3DVertex2TCoords* pb = reinterpret_cast<const S3DVertex2TCoords*>(buffer.pointer()); const S3DVertex2TCoords* pb = reinterpret_cast<const S3DVertex2TCoords*>(buffer.pointer());
const S3DVertex2TCoords* po = reinterpret_cast<const S3DVertex2TCoords*>(vertices); const S3DVertex2TCoords* po = reinterpret_cast<const S3DVertex2TCoords*>(vertices);
for (u32 i=0; i<vertexCount; i++) for (u32 i=0; i<vertexCount; i++)
{ {
po[i].Color.toOpenGLColor((u8*)&(pb[i].Color.color)); po[i].Color.toOpenGLColor((u8*)&(pb[i].Color.color));
...@@ -550,17 +550,17 @@ bool COpenGLDriver::updateVertexHardwareBuffer(SHWBufferLink_opengl *HWBuffer) ...@@ -550,17 +550,17 @@ bool COpenGLDriver::updateVertexHardwareBuffer(SHWBufferLink_opengl *HWBuffer)
case EVT_TANGENTS: case EVT_TANGENTS:
{ {
const S3DVertexTangents* pb = reinterpret_cast<const S3DVertexTangents*>(buffer.pointer()); const S3DVertexTangents* pb = reinterpret_cast<const S3DVertexTangents*>(buffer.pointer());
const S3DVertexTangents* po = reinterpret_cast<const S3DVertexTangents*>(vertices); const S3DVertexTangents* po = reinterpret_cast<const S3DVertexTangents*>(vertices);
for (u32 i=0; i<vertexCount; i++) for (u32 i=0; i<vertexCount; i++)
{ {
po[i].Color.toOpenGLColor((u8*)&(pb[i].Color.color)); po[i].Color.toOpenGLColor((u8*)&(pb[i].Color.color));
} }
} }
break; break;
default: default:
{ {
return false; return false;
} }
} }
//get or create buffer //get or create buffer
...@@ -591,23 +591,21 @@ bool COpenGLDriver::updateVertexHardwareBuffer(SHWBufferLink_opengl *HWBuffer) ...@@ -591,23 +591,21 @@ bool COpenGLDriver::updateVertexHardwareBuffer(SHWBufferLink_opengl *HWBuffer)
} }
bool COpenGLDriver::updateIndexHardwareBuffer(SHWBufferLink_opengl *HWBuffer) bool COpenGLDriver::updateIndexHardwareBuffer(SHWBufferLink_opengl *HWBuffer)
{ {
if (!HWBuffer) if (!HWBuffer)
return false; return false;
if(!VertexBufferObjectExtension) if(!FeatureAvailable[IRR_ARB_vertex_buffer_object])
return false; return false;
const scene::IMeshBuffer* mb = HWBuffer->MeshBuffer; const scene::IMeshBuffer* mb = HWBuffer->MeshBuffer;
const u16* indices=mb->getIndices(); const u16* indices=mb->getIndices();
u32 indexCount= mb->getIndexCount(); u32 indexCount= mb->getIndexCount();
u32 indexSize = 2; u32 indexSize = 2;
//get or create buffer //get or create buffer
bool newBuffer=false; bool newBuffer=false;
if (!HWBuffer->vbo_indicesID) if (!HWBuffer->vbo_indicesID)
{ {
extGlGenBuffers(1, &HWBuffer->vbo_indicesID); extGlGenBuffers(1, &HWBuffer->vbo_indicesID);
...@@ -634,8 +632,6 @@ bool COpenGLDriver::updateIndexHardwareBuffer(SHWBufferLink_opengl *HWBuffer) ...@@ -634,8 +632,6 @@ bool COpenGLDriver::updateIndexHardwareBuffer(SHWBufferLink_opengl *HWBuffer)
} }
//! updates hardware buffer if needed //! updates hardware buffer if needed
bool COpenGLDriver::updateHardwareBuffer(SHWBufferLink *HWBuffer) bool COpenGLDriver::updateHardwareBuffer(SHWBufferLink *HWBuffer)
{ {
...@@ -656,15 +652,15 @@ bool COpenGLDriver::updateHardwareBuffer(SHWBufferLink *HWBuffer) ...@@ -656,15 +652,15 @@ bool COpenGLDriver::updateHardwareBuffer(SHWBufferLink *HWBuffer)
return true; return true;
} }
//! Create hardware buffer from mesh
//! Create hardware buffer from meshbuffer
COpenGLDriver::SHWBufferLink *COpenGLDriver::createHardwareBuffer(const scene::IMeshBuffer* mb) COpenGLDriver::SHWBufferLink *COpenGLDriver::createHardwareBuffer(const scene::IMeshBuffer* mb)
{ {
if (!mb) return 0; if (!mb || (mb->getHardwareMappingHint()==scene::EHM_NEVER))
if (mb->getHardwareMappingHint()==scene::EHM_NEVER) return 0; return 0;
SHWBufferLink_opengl *HWBuffer=new SHWBufferLink_opengl(mb); SHWBufferLink_opengl *HWBuffer=new SHWBufferLink_opengl(mb);
//add to list, in order of their meshbuffer pointer //add to list, in order of their meshbuffer pointer
u32 n; u32 n;
for (n=0;n<HWBufferLinks.size();++n) for (n=0;n<HWBufferLinks.size();++n)
...@@ -692,6 +688,7 @@ COpenGLDriver::SHWBufferLink *COpenGLDriver::createHardwareBuffer(const scene::I ...@@ -692,6 +688,7 @@ COpenGLDriver::SHWBufferLink *COpenGLDriver::createHardwareBuffer(const scene::I
return HWBuffer; return HWBuffer;
} }
void COpenGLDriver::deleteHardwareBuffer(SHWBufferLink *_HWBuffer) void COpenGLDriver::deleteHardwareBuffer(SHWBufferLink *_HWBuffer)
{ {
SHWBufferLink_opengl *HWBuffer=(SHWBufferLink_opengl*)_HWBuffer; SHWBufferLink_opengl *HWBuffer=(SHWBufferLink_opengl*)_HWBuffer;
...@@ -709,10 +706,12 @@ void COpenGLDriver::deleteHardwareBuffer(SHWBufferLink *_HWBuffer) ...@@ -709,10 +706,12 @@ void COpenGLDriver::deleteHardwareBuffer(SHWBufferLink *_HWBuffer)
} }
//! Draw hardware buffer //! Draw hardware buffer
void COpenGLDriver::drawHardwareBuffer(SHWBufferLink *_HWBuffer) void COpenGLDriver::drawHardwareBuffer(SHWBufferLink *_HWBuffer)
{ {
if (!_HWBuffer) return; if (!_HWBuffer)
return;
SHWBufferLink_opengl *HWBuffer=(SHWBufferLink_opengl*)_HWBuffer; SHWBufferLink_opengl *HWBuffer=(SHWBufferLink_opengl*)_HWBuffer;
const scene::IMeshBuffer* mb = HWBuffer->MeshBuffer; const scene::IMeshBuffer* mb = HWBuffer->MeshBuffer;
...@@ -797,16 +796,21 @@ void COpenGLDriver::drawVertexPrimitiveList(const void* vertices, u32 vertexCoun ...@@ -797,16 +796,21 @@ void COpenGLDriver::drawVertexPrimitiveList(const void* vertices, u32 vertexCoun
if ((pType!=scene::EPT_POINTS) && (pType!=scene::EPT_POINT_SPRITES)) if ((pType!=scene::EPT_POINTS) && (pType!=scene::EPT_POINT_SPRITES))
glEnableClientState(GL_NORMAL_ARRAY); glEnableClientState(GL_NORMAL_ARRAY);
if (vertices) glColorPointer(4, GL_UNSIGNED_BYTE, 0, &ColorBuffer[0]); if (vertices)
glColorPointer(4, GL_UNSIGNED_BYTE, 0, &ColorBuffer[0]);
switch (vType) switch (vType)
{ {
case EVT_STANDARD: case EVT_STANDARD:
glVertexPointer(3, GL_FLOAT, sizeof(S3DVertex), &(reinterpret_cast<const S3DVertex*>(vertices))[0].Pos); if (vertices)
glVertexPointer(3, GL_FLOAT, sizeof(S3DVertex), &(reinterpret_cast<const S3DVertex*>(vertices))[0].Pos);
else
glVertexPointer(3, GL_FLOAT, sizeof(S3DVertex), 0);
glNormalPointer(GL_FLOAT, sizeof(S3DVertex), &(reinterpret_cast<const S3DVertex*>(vertices))[0].Normal); glNormalPointer(GL_FLOAT, sizeof(S3DVertex), &(reinterpret_cast<const S3DVertex*>(vertices))[0].Normal);
glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertex), &(reinterpret_cast<const S3DVertex*>(vertices))[0].TCoords); glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertex), &(reinterpret_cast<const S3DVertex*>(vertices))[0].TCoords);
if (!vertices) glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(S3DVertex), &(reinterpret_cast<const S3DVertex*>(vertices))[0].Color); if (!vertices)
glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(S3DVertex), &(reinterpret_cast<const S3DVertex*>(vertices))[0].Color);
if (MultiTextureExtension && CurrentTexture[1]) if (MultiTextureExtension && CurrentTexture[1])
{ {
...@@ -816,7 +820,10 @@ void COpenGLDriver::drawVertexPrimitiveList(const void* vertices, u32 vertexCoun ...@@ -816,7 +820,10 @@ void COpenGLDriver::drawVertexPrimitiveList(const void* vertices, u32 vertexCoun
} }
break; break;
case EVT_2TCOORDS: case EVT_2TCOORDS:
glVertexPointer(3, GL_FLOAT, sizeof(S3DVertex2TCoords), &(reinterpret_cast<const S3DVertex2TCoords*>(vertices))[0].Pos); if (vertices)
glVertexPointer(3, GL_FLOAT, sizeof(S3DVertex2TCoords), &(reinterpret_cast<const S3DVertex2TCoords*>(vertices))[0].Pos);
else
glVertexPointer(3, GL_FLOAT, sizeof(S3DVertex2TCoords), 0);
glNormalPointer(GL_FLOAT, sizeof(S3DVertex2TCoords), &(reinterpret_cast<const S3DVertex2TCoords*>(vertices))[0].Normal); glNormalPointer(GL_FLOAT, sizeof(S3DVertex2TCoords), &(reinterpret_cast<const S3DVertex2TCoords*>(vertices))[0].Normal);
// texture coordinates // texture coordinates
glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertex2TCoords), &(reinterpret_cast<const S3DVertex2TCoords*>(vertices))[0].TCoords); glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertex2TCoords), &(reinterpret_cast<const S3DVertex2TCoords*>(vertices))[0].TCoords);
...@@ -831,7 +838,10 @@ void COpenGLDriver::drawVertexPrimitiveList(const void* vertices, u32 vertexCoun ...@@ -831,7 +838,10 @@ void COpenGLDriver::drawVertexPrimitiveList(const void* vertices, u32 vertexCoun
} }
break; break;
case EVT_TANGENTS: case EVT_TANGENTS:
glVertexPointer(3, GL_FLOAT, sizeof(S3DVertexTangents), &(reinterpret_cast<const S3DVertexTangents*>(vertices))[0].Pos); if (vertices)
glVertexPointer(3, GL_FLOAT, sizeof(S3DVertexTangents), &(reinterpret_cast<const S3DVertexTangents*>(vertices))[0].Pos);
else
glVertexPointer(3, GL_FLOAT, sizeof(S3DVertexTangents), 0);
glNormalPointer(GL_FLOAT, sizeof(S3DVertexTangents), &(reinterpret_cast<const S3DVertexTangents*>(vertices))[0].Normal); glNormalPointer(GL_FLOAT, sizeof(S3DVertexTangents), &(reinterpret_cast<const S3DVertexTangents*>(vertices))[0].Normal);
// texture coordinates // texture coordinates
glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertexTangents), &(reinterpret_cast<const S3DVertexTangents*>(vertices))[0].TCoords); glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertexTangents), &(reinterpret_cast<const S3DVertexTangents*>(vertices))[0].TCoords);
...@@ -930,11 +940,9 @@ void COpenGLDriver::drawVertexPrimitiveList(const void* vertices, u32 vertexCoun ...@@ -930,11 +940,9 @@ void COpenGLDriver::drawVertexPrimitiveList(const void* vertices, u32 vertexCoun
glDisableClientState(GL_VERTEX_ARRAY); glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_NORMAL_ARRAY); glDisableClientState(GL_NORMAL_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisableClientState(GL_TEXTURE_COORD_ARRAY);
} }
//! draws a 2d image, using a color and the alpha channel of the texture if //! draws a 2d image, using a color and the alpha channel of the texture if
//! desired. The image is drawn at pos, clipped against clipRect (if != 0). //! desired. The image is drawn at pos, clipped against clipRect (if != 0).
//! Only the subtexture defined by sourceRect is used. //! Only the subtexture defined by sourceRect is used.
...@@ -1980,8 +1988,8 @@ void COpenGLDriver::setViewPort(const core::rect<s32>& area) ...@@ -1980,8 +1988,8 @@ void COpenGLDriver::setViewPort(const core::rect<s32>& area)
if (vp.getHeight()>0 && vp.getWidth()>0) if (vp.getHeight()>0 && vp.getWidth()>0)
glViewport(vp.UpperLeftCorner.X, glViewport(vp.UpperLeftCorner.X,
getCurrentRenderTargetSize().Height - vp.UpperLeftCorner.Y - vp.getHeight(), getCurrentRenderTargetSize().Height - vp.UpperLeftCorner.Y - vp.getHeight(),
vp.getWidth(), vp.getHeight()); vp.getWidth(), vp.getHeight());
ViewPort = vp; ViewPort = vp;
} }
...@@ -2357,7 +2365,7 @@ ITexture* COpenGLDriver::createRenderTargetTexture(const core::dimension2d<s32>& ...@@ -2357,7 +2365,7 @@ ITexture* COpenGLDriver::createRenderTargetTexture(const core::dimension2d<s32>&
#if defined(GL_EXT_framebuffer_object) #if defined(GL_EXT_framebuffer_object)
// if driver supports FrameBufferObjects, use them // if driver supports FrameBufferObjects, use them
if (queryFeature(EVDF_FRAMEBUFFER_OBJECT)) if (queryFeature(EVDF_FRAMEBUFFER_OBJECT))
rtt = new COpenGLTexture(size, FeatureAvailable[IRR_EXT_packed_depth_stencil], name, this); rtt = new COpenGLTexture(size, FeatureAvailable[IRR_EXT_packed_depth_stencil], name, this);
else else
#endif #endif
{ {
...@@ -2387,7 +2395,7 @@ u32 COpenGLDriver::getMaximalPrimitiveCount() const ...@@ -2387,7 +2395,7 @@ u32 COpenGLDriver::getMaximalPrimitiveCount() const
//! checks triangle count and print warning if wrong //! checks triangle count and print warning if wrong
bool COpenGLDriver::setRenderTarget(video::ITexture* texture, bool clearBackBuffer, bool COpenGLDriver::setRenderTarget(video::ITexture* texture, bool clearBackBuffer,
bool clearZBuffer, SColor color) bool clearZBuffer, SColor color)
{ {
// check for right driver type // check for right driver type
...@@ -2405,6 +2413,8 @@ bool COpenGLDriver::setRenderTarget(video::ITexture* texture, bool clearBackBuff ...@@ -2405,6 +2413,8 @@ bool COpenGLDriver::setRenderTarget(video::ITexture* texture, bool clearBackBuff
ResetRenderStates=true; ResetRenderStates=true;
if (RenderTargetTexture!=0) if (RenderTargetTexture!=0)
{ {
glReadPixels(0, 0, RenderTargetTexture->getSize().Width, RenderTargetTexture->getSize().Height, GL_RGBA, GL_UNSIGNED_BYTE, RenderTargetTexture->lock());
RenderTargetTexture->unlock();
if (RenderTargetTexture->isFrameBufferObject()) if (RenderTargetTexture->isFrameBufferObject())
{ {
RenderTargetTexture->unbindFrameBufferObject(); RenderTargetTexture->unbindFrameBufferObject();
...@@ -2468,18 +2478,20 @@ const core::dimension2d<s32>& COpenGLDriver::getCurrentRenderTargetSize() const ...@@ -2468,18 +2478,20 @@ const core::dimension2d<s32>& COpenGLDriver::getCurrentRenderTargetSize() const
return CurrentRendertargetSize; return CurrentRendertargetSize;
} }
//! Clears the ZBuffer. //! Clears the ZBuffer.
void COpenGLDriver::clearZBuffer() void COpenGLDriver::clearZBuffer()
{ {
GLboolean enabled = GL_TRUE; GLboolean enabled = GL_TRUE;
glGetBooleanv(GL_DEPTH_WRITEMASK, &enabled); glGetBooleanv(GL_DEPTH_WRITEMASK, &enabled);
glDepthMask(GL_TRUE); glDepthMask(GL_TRUE);
glClear(GL_DEPTH_BUFFER_BIT); glClear(GL_DEPTH_BUFFER_BIT);
glDepthMask(enabled); glDepthMask(enabled);
} }
//! Returns an image created from the last rendered frame. //! Returns an image created from the last rendered frame.
IImage* COpenGLDriver::createScreenShot() IImage* COpenGLDriver::createScreenShot()
{ {
......
...@@ -15,9 +15,7 @@ namespace video ...@@ -15,9 +15,7 @@ namespace video
COpenGLExtensionHandler::COpenGLExtensionHandler() : COpenGLExtensionHandler::COpenGLExtensionHandler() :
StencilBuffer(false), StencilBuffer(false),
MultiTextureExtension(false), MultiSamplingExtension(false), AnisotropyExtension(false), MultiTextureExtension(false), MultiSamplingExtension(false), AnisotropyExtension(false),
SeparateStencilExtension(false),
TextureCompressionExtension(false), TextureCompressionExtension(false),
VertexBufferObjectExtension(false),
MaxTextureUnits(1), MaxLights(1), MaxIndices(65535), MaxTextureUnits(1), MaxLights(1), MaxIndices(65535),
MaxAnisotropy(1.0f), MaxUserClipPlanes(0), MaxAnisotropy(1.0f), MaxUserClipPlanes(0),
Version(0), ShaderLanguageVersion(0) Version(0), ShaderLanguageVersion(0)
...@@ -102,9 +100,7 @@ void COpenGLExtensionHandler::initExtensions(bool stencilBuffer) ...@@ -102,9 +100,7 @@ void COpenGLExtensionHandler::initExtensions(bool stencilBuffer)
MultiTextureExtension = FeatureAvailable[IRR_ARB_multitexture]; MultiTextureExtension = FeatureAvailable[IRR_ARB_multitexture];
MultiSamplingExtension = FeatureAvailable[IRR_ARB_multisample]; MultiSamplingExtension = FeatureAvailable[IRR_ARB_multisample];
AnisotropyExtension = FeatureAvailable[IRR_EXT_texture_filter_anisotropic]; AnisotropyExtension = FeatureAvailable[IRR_EXT_texture_filter_anisotropic];
SeparateStencilExtension = FeatureAvailable[IRR_ATI_separate_stencil];
TextureCompressionExtension = FeatureAvailable[IRR_ARB_texture_compression]; TextureCompressionExtension = FeatureAvailable[IRR_ARB_texture_compression];
VertexBufferObjectExtension = FeatureAvailable[IRR_ARB_vertex_buffer_object];
StencilBuffer=stencilBuffer; StencilBuffer=stencilBuffer;
#ifdef _IRR_WINDOWS_API_ #ifdef _IRR_WINDOWS_API_
......
...@@ -663,9 +663,7 @@ class COpenGLExtensionHandler ...@@ -663,9 +663,7 @@ class COpenGLExtensionHandler
bool MultiTextureExtension; bool MultiTextureExtension;
bool MultiSamplingExtension; bool MultiSamplingExtension;
bool AnisotropyExtension; bool AnisotropyExtension;
bool SeparateStencilExtension;
bool TextureCompressionExtension; bool TextureCompressionExtension;
bool VertexBufferObjectExtension;
// Some non-boolean properties // Some non-boolean properties
//! Maxmimum texture layers supported by the fixed pipeline //! Maxmimum texture layers supported by the fixed pipeline
......
...@@ -61,13 +61,13 @@ public: ...@@ -61,13 +61,13 @@ public:
//! unlock function //! unlock function
virtual void unlock(); virtual void unlock();
//! Returns original size of the texture. //! Returns original size of the texture (image).
virtual const core::dimension2d<s32>& getOriginalSize() const; virtual const core::dimension2d<s32>& getOriginalSize() const;
//! Returns size of the texture. //! Returns size of the texture.
virtual const core::dimension2d<s32>& getSize() const; virtual const core::dimension2d<s32>& getSize() const;
//! returns driver type of texture (=the driver, who created the texture) //! returns driver type of texture (=the driver, that created it)
virtual E_DRIVER_TYPE getDriverType() const; virtual E_DRIVER_TYPE getDriverType() const;
//! returns color format of texture //! returns color format of texture
...@@ -113,7 +113,7 @@ private: ...@@ -113,7 +113,7 @@ private:
//! \param: newTexture is true if method is called from a newly created texture for the first time. Otherwise call with false to improve memory handling. //! \param: newTexture is true if method is called from a newly created texture for the first time. Otherwise call with false to improve memory handling.
void copyTexture(bool newTexture=true); void copyTexture(bool newTexture=true);
//! returns the size of a texture which would be the optimize size for rendering it //! returns the size of a texture which would be optimal for rendering
inline s32 getTextureSizeFromSurfaceSize(s32 size) const; inline s32 getTextureSizeFromSurfaceSize(s32 size) const;
core::dimension2d<s32> ImageSize; core::dimension2d<s32> ImageSize;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment