From 222f57d8e349d7337b784d62deb533463d95483e Mon Sep 17 00:00:00 2001 From: hybrid Date: Mon, 25 Jun 2007 21:42:06 +0000 Subject: [PATCH] Fixed the getSize confusion and the wrongly comitted profiling option in the makefile. git-svn-id: http://svn.code.sf.net/p/irrlicht/code/trunk@732 dfc29bdd-3216-0410-991c-e03cc46cb475 --- source/Irrlicht/COpenGLTexture.cpp | 25 +++++++++---------------- source/Irrlicht/Makefile | 2 +- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/source/Irrlicht/COpenGLTexture.cpp b/source/Irrlicht/COpenGLTexture.cpp index f2d3f9ac..c5190da2 100644 --- a/source/Irrlicht/COpenGLTexture.cpp +++ b/source/Irrlicht/COpenGLTexture.cpp @@ -158,17 +158,10 @@ COpenGLTexture::~COpenGLTexture() glDeleteTextures(1, &DepthRenderBuffer); if (StencilRenderBuffer && StencilRenderBuffer != DepthRenderBuffer) glDeleteTextures(1, &StencilRenderBuffer); - ColorFrameBuffer = 0; - DepthRenderBuffer = 0; - StencilRenderBuffer = 0; glDeleteTextures(1, &TextureName); if (Image) - { Image->drop(); - Image=0; - } - ImageSize.Width=ImageSize.Height=0; } @@ -346,8 +339,16 @@ void COpenGLTexture::unlock() -//! Returns original size of the texture. +//! Returns size of the original image. const core::dimension2d& COpenGLTexture::getOriginalSize() +{ + return ImageSize; +} + + + +//! Returns of the texture. +const core::dimension2d& COpenGLTexture::getSize() { if (Image) return Image->getDimension(); @@ -357,14 +358,6 @@ const core::dimension2d& COpenGLTexture::getOriginalSize() -//! Returns (=size) of the texture. -const core::dimension2d& COpenGLTexture::getSize() -{ - return ImageSize; -} - - - //! returns driver type of texture (=the driver, who created the texture) E_DRIVER_TYPE COpenGLTexture::getDriverType() { diff --git a/source/Irrlicht/Makefile b/source/Irrlicht/Makefile index 37dd4cf7..1c81ecd7 100644 --- a/source/Irrlicht/Makefile +++ b/source/Irrlicht/Makefile @@ -38,7 +38,7 @@ CXXINCS = -I../../include -Izlib -Ijpeglib -Ilibpng CPPFLAGS = $(CXXINCS) -DIRRLICHT_EXPORTS=1 CXXFLAGS = -Wall ifndef NDEBUG -CXXFLAGS += -pg +CXXFLAGS += -g else CXXFLAGS += -fexpensive-optimizations -O3 endif