Changeset 3655 in orxonox.OLD for orxonox/trunk/src/lib/graphics
- Timestamp:
- Mar 26, 2005, 3:28:39 PM (20 years ago)
- Location:
- orxonox/trunk/src/lib/graphics/importer
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/importer/material.cc
r3590 r3655 23 23 #include <stdlib.h> 24 24 #include <string.h> 25 26 //! \todo check if we are in RESOURCE MANAGER-mode 27 #include "resource_manager.h" 25 28 26 29 using namespace std; … … 104 107 this->ambientTextureSet = false; 105 108 this->specularTextureSet = false; 106 107 108 109 } 109 110 … … 333 334 { 334 335 PRINTF(4)("setting Diffuse Map %s\n", dMap); 335 diffuseTexture = new Texture(); 336 this->diffuseTextureSet = diffuseTexture->loadImage(dMap); 337 336 diffuseTexture = new Texture(); 337 this->diffuseTextureSet = diffuseTexture->loadImage(dMap); 338 339 //! \todo check if RESOURCE MANAGER is availiable 340 //this->diffuseTextureSet = this->diffuseTexture = (Texture*)ResourceManager::load(dMap, IMAGE); 338 341 } 339 342 -
orxonox/trunk/src/lib/graphics/importer/objModel.cc
r3590 r3655 21 21 22 22 #include "debug.h" 23 24 /**25 \brief Crates a 3D-Model and loads in a File.26 \param fileName file to parse and load (must be a .obj file)27 */28 OBJModel::OBJModel(char* fileName)29 {30 this->initializeOBJ();31 32 this->importFile (fileName);33 34 this->importToGL ();35 36 this->cleanup();37 }38 23 39 24 /** … … 193 178 else if (!strncmp(Buffer, "s ", 2)) //! \todo smoothing groups have to be implemented 194 179 { 195 PRINTF( 3)("smoothing groups not supportet yet. line: %s\n", Buffer);180 PRINTF(2)("smoothing groups not supportet yet. line: %s\n", Buffer); 196 181 } 197 182 } -
orxonox/trunk/src/lib/graphics/importer/objModel.h
r3454 r3655 13 13 { 14 14 public: 15 OBJModel(char* fileName); 16 OBJModel(char* fileName, float scaling); 15 OBJModel(char* fileName, float scaling = 1.0); 17 16 virtual ~OBJModel(); 18 17 void initializeOBJ(void); … … 28 27 bool readFromObjFile (void); 29 28 bool readMtlLib (char* matFile); 30 31 29 }; 32 30 -
orxonox/trunk/src/lib/graphics/importer/texture.cc
r3622 r3655 131 131 132 132 /** 133 \brief Constructor for a Texture 134 */ 135 Texture::Texture(const char* imageName) 136 { 137 this->pImage = new Image; 138 this->pImage->data = NULL; 139 this->map = NULL; 140 this->texture = 0; 141 this->loadImage(imageName); 142 } 143 144 /** 133 145 \brief Destructor of a Texture 134 146 … … 149 161 \returns pathName+texName if texName was found in the pathList. NULL if the Texture is not found. 150 162 */ 151 char* Texture::searchTextureInPaths(c har* texName) const163 char* Texture::searchTextureInPaths(const char* texName) const 152 164 { 153 165 char* tmpName = NULL; … … 215 227 216 228 #ifdef HAVE_SDL_SDL_IMAGE_H 217 bool Texture::loadImage(c har* imageName)229 bool Texture::loadImage(const char* imageName) 218 230 { 219 231 if (GraphicsEngine::texturesEnabled) … … 269 281 \todo Checks where to find the Image 270 282 */ 271 bool Texture::loadImage(c har* imageName)283 bool Texture::loadImage(const char* imageName) 272 284 { 273 285 if (GraphicsEngine::texturesEnabled) -
orxonox/trunk/src/lib/graphics/importer/texture.h
r3548 r3655 70 70 GLuint texture; //!< The Texture-ID of opengl from this Texture. 71 71 SDL_Surface* map; //!< The map SDL initializes for this element. 72 char* searchTextureInPaths(c har* texName) const;72 char* searchTextureInPaths(const char* texName) const; 73 73 inline void swap(unsigned char &a, unsigned char &b); 74 74 public: 75 75 Texture(void); 76 Texture(const char* imageName); 76 77 ~Texture(void); 77 78 /** \returns The textureID of this texture. */ … … 79 80 bool loadTexToGL (Image* pImage); 80 81 81 bool loadImage(c har* imageName);82 bool loadImage(const char* imageName); 82 83 #ifndef HAVE_SDL_SDL_IMAGE_H 83 84
Note: See TracChangeset
for help on using the changeset viewer.