]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Texture.cc
initial working frustum culling implementation
[chaz/yoink] / src / Moof / Texture.cc
index 8bd3c4a3ae00a16657d670fe55620f48b0c99af0..dc9407afc9da1af082ed577da1ab99a6b27bc1e6 100644 (file)
@@ -396,7 +396,7 @@ Texture::Texture(const std::string& name) :
  * Bind the GL texture for mapping, etc.
  */
 
-void Texture::bind()
+void Texture::bind() const
 {
        // pass through
        impl_->bind();
@@ -407,20 +407,27 @@ void Texture::bind()
  * Get the texture object, for the curious.
  */
 
-GLuint Texture::getObject()
+GLuint Texture::getObject() const
 {
        // pass through
        return impl_->object_;
 }
 
 
-unsigned Texture::getWidth()
+void Texture::resetBind()
+{
+       glBindTexture(GL_TEXTURE_2D, 0);
+       TextureImpl::globalObject_ = 0;
+}
+
+
+unsigned Texture::getWidth() const
 {
        // pass through
        return impl_->width_;
 }
 
-unsigned Texture::getHeight()
+unsigned Texture::getHeight() const
 {
        // pass through
        return impl_->height_;
@@ -454,7 +461,7 @@ void Texture::setWrapT(GLuint wrap)
 
 std::string Texture::getPathToResource(const std::string& name)
 {
-       // TODO named resources must be png for now
+       // TODO named texture resources must be png for now
        return Resource::getPathToResource("textures/" + name + ".png");
 }
 
This page took 0.018498 seconds and 4 git commands to generate.