Changeset 8034 in orxonox.OLD for branches/water/src/lib/graphics
- Timestamp:
- May 31, 2006, 4:19:33 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
r8027 r8034 390 390 * @param textureNumber select the texture unit that will be overwritten 391 391 */ 392 void Material::renderToTexture(unsigned int textureNumber, GLenum target, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height)392 void Material::renderToTexture(unsigned int textureNumber, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) 393 393 { 394 394 glActiveTexture(Material::glTextureArbs[textureNumber]); 395 395 glEnable(GL_TEXTURE_2D); 396 396 glBindTexture(GL_TEXTURE_2D, this->textures[textureNumber].getTexture()); 397 glCopyTexSubImage2D(target, 0, xoffset, yoffset, 0, 0, width, height);397 glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); 398 398 } 399 399 -
branches/water/src/lib/graphics/importer/material.h
r8027 r8034 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 void renderToTexture(unsigned int textureNumber, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); 61 61 62 62 void setAmbientMap(const std::string& aMap, GLenum target = GL_TEXTURE_2D);
Note: See TracChangeset
for help on using the changeset viewer.