Changeset 8027 in orxonox.OLD for branches/water/src
- Timestamp:
- May 31, 2006, 2:31:12 PM (19 years ago)
- Location:
- branches/water/src/lib/graphics/importer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/water/src/lib/graphics/importer/material.cc
r7982 r8027 386 386 } 387 387 388 /** 389 * @brief renders viewport buffer (?? or another buffer ;-)) to a texture 390 * @param textureNumber select the texture unit that will be overwritten 391 */ 392 void Material::renderToTexture(unsigned int textureNumber, GLenum target, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height) 393 { 394 glActiveTexture(Material::glTextureArbs[textureNumber]); 395 glEnable(GL_TEXTURE_2D); 396 glBindTexture(GL_TEXTURE_2D, this->textures[textureNumber].getTexture()); 397 glCopyTexSubImage2D(target, 0, xoffset, yoffset, 0, 0, width, height); 398 } 388 399 389 400 /** 390 401 * @brief Sets the Materials Ambient Map 391 * @param aMap the Name of the Image to Use 392 @todo implement this 402 * @todo implement this 393 403 */ 394 404 void Material::setAmbientMap(const std::string& aMap, GLenum target) -
branches/water/src/lib/graphics/importer/material.h
r8025 r8027 58 58 void setDiffuseMap(const std::string& dMap, GLenum target = GL_TEXTURE_2D, unsigned int textureNumber = 0); 59 59 void setSDLDiffuseMap(SDL_Surface *surface, GLenum target = GL_TEXTURE_2D, unsigned int textureNumber = 0); 60 void renderToTexture(unsigned int textureNumber, GLenum target, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height); 60 61 61 62 void setAmbientMap(const std::string& aMap, GLenum target = GL_TEXTURE_2D);
Note: See TracChangeset
for help on using the changeset viewer.