Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8034 in orxonox.OLD for branches/water/src/lib/graphics


Ignore:
Timestamp:
May 31, 2006, 4:19:33 PM (19 years ago)
Author:
stefalie
Message:

water: refraction doesnt work with reflection

Location:
branches/water/src/lib/graphics/importer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/water/src/lib/graphics/importer/material.cc

    r8027 r8034  
    390390 * @param textureNumber select the texture unit that will be overwritten
    391391*/
    392 void Material::renderToTexture(unsigned int textureNumber, GLenum target, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height)
     392void Material::renderToTexture(unsigned int textureNumber, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
    393393{
    394394  glActiveTexture(Material::glTextureArbs[textureNumber]);
    395395  glEnable(GL_TEXTURE_2D);
    396396  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);
    398398}
    399399
  • branches/water/src/lib/graphics/importer/material.h

    r8027 r8034  
    5858    void setDiffuseMap(const std::string& dMap, GLenum target = GL_TEXTURE_2D, unsigned int textureNumber = 0);
    5959    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);
    6161
    6262    void setAmbientMap(const std::string& aMap, GLenum target = GL_TEXTURE_2D);
Note: See TracChangeset for help on using the changeset viewer.