Commit ecbe186f authored by hybrid's avatar hybrid

Fixed the getSize confusion and the wrongly comitted profiling option in the makefile.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@732 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 59ab9c52
...@@ -158,17 +158,10 @@ COpenGLTexture::~COpenGLTexture() ...@@ -158,17 +158,10 @@ COpenGLTexture::~COpenGLTexture()
glDeleteTextures(1, &DepthRenderBuffer); glDeleteTextures(1, &DepthRenderBuffer);
if (StencilRenderBuffer && StencilRenderBuffer != DepthRenderBuffer) if (StencilRenderBuffer && StencilRenderBuffer != DepthRenderBuffer)
glDeleteTextures(1, &StencilRenderBuffer); glDeleteTextures(1, &StencilRenderBuffer);
ColorFrameBuffer = 0;
DepthRenderBuffer = 0;
StencilRenderBuffer = 0;
glDeleteTextures(1, &TextureName); glDeleteTextures(1, &TextureName);
if (Image) if (Image)
{
Image->drop(); Image->drop();
Image=0;
}
ImageSize.Width=ImageSize.Height=0;
} }
...@@ -346,20 +339,20 @@ void COpenGLTexture::unlock() ...@@ -346,20 +339,20 @@ void COpenGLTexture::unlock()
//! Returns original size of the texture. //! Returns size of the original image.
const core::dimension2d<s32>& COpenGLTexture::getOriginalSize() const core::dimension2d<s32>& COpenGLTexture::getOriginalSize()
{ {
if (Image)
return Image->getDimension();
else
return ImageSize; return ImageSize;
} }
//! Returns (=size) of the texture. //! Returns of the texture.
const core::dimension2d<s32>& COpenGLTexture::getSize() const core::dimension2d<s32>& COpenGLTexture::getSize()
{ {
if (Image)
return Image->getDimension();
else
return ImageSize; return ImageSize;
} }
......
...@@ -38,7 +38,7 @@ CXXINCS = -I../../include -Izlib -Ijpeglib -Ilibpng ...@@ -38,7 +38,7 @@ CXXINCS = -I../../include -Izlib -Ijpeglib -Ilibpng
CPPFLAGS = $(CXXINCS) -DIRRLICHT_EXPORTS=1 CPPFLAGS = $(CXXINCS) -DIRRLICHT_EXPORTS=1
CXXFLAGS = -Wall CXXFLAGS = -Wall
ifndef NDEBUG ifndef NDEBUG
CXXFLAGS += -pg CXXFLAGS += -g
else else
CXXFLAGS += -fexpensive-optimizations -O3 CXXFLAGS += -fexpensive-optimizations -O3
endif endif
......
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