/*! -------------------------------------------------------------------- \file texture.cpp \brief Encapsulate texture data \author James Kuffner \date 2002-09-18 // -------------------------------------------------------------------*/ #ifndef IGNORE_DEPEND #include #include #include #endif #include "texturemap.h" //--------------------------------------------------------------------- // TextureMap // Method: Constructor // //--------------------------------------------------------------------- TextureMap::TextureMap() { _textureBuf = NULL; _width = 0; _height = 0; } //--------------------------------------------------------------------- // TextureMap // Method: Destructor // //--------------------------------------------------------------------- TextureMap::~TextureMap() { if (_textureBuf) delete [] _textureBuf; } //--------------------------------------------------------------------- // TextureMap // Method: InitTextureParams // //! create mipmap and setup texture params // //--------------------------------------------------------------------- bool TextureMap::InitTextureParams(bool bMipmap) { // generate unique "name glGenTextures(1, &_name); //cout<<"generated name: "<<_name<