From 6a0476ebcb403bf184de479ec760d2285df9a48f Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 3 Mar 2004 01:34:46 +0000 Subject: [PATCH] render textures should clamp by default --- panda/src/display/graphicsBuffer.cxx | 2 ++ panda/src/display/graphicsEngine.cxx | 2 ++ panda/src/display/parasiteBuffer.cxx | 2 ++ 3 files changed, 6 insertions(+) diff --git a/panda/src/display/graphicsBuffer.cxx b/panda/src/display/graphicsBuffer.cxx index 8d4378ba66..dab0ca905e 100644 --- a/panda/src/display/graphicsBuffer.cxx +++ b/panda/src/display/graphicsBuffer.cxx @@ -45,6 +45,8 @@ GraphicsBuffer(GraphicsPipe *pipe, GraphicsStateGuardian *gsg, if (want_texture) { _texture = new Texture(); _texture->set_name(_name); + _texture->set_wrapu(Texture::WM_clamp); + _texture->set_wrapv(Texture::WM_clamp); _copy_texture = true; } diff --git a/panda/src/display/graphicsEngine.cxx b/panda/src/display/graphicsEngine.cxx index be0dfa5b14..08e2c16e2a 100644 --- a/panda/src/display/graphicsEngine.cxx +++ b/panda/src/display/graphicsEngine.cxx @@ -252,6 +252,8 @@ make_buffer(GraphicsStateGuardian *gsg, const string &name, if (want_texture) { window->_texture = new Texture(); window->_texture->set_name(name); + window->_texture->set_wrapu(Texture::WM_clamp); + window->_texture->set_wrapv(Texture::WM_clamp); window->_copy_texture = true; } diff --git a/panda/src/display/parasiteBuffer.cxx b/panda/src/display/parasiteBuffer.cxx index b905796fa6..2fd10ba3cd 100644 --- a/panda/src/display/parasiteBuffer.cxx +++ b/panda/src/display/parasiteBuffer.cxx @@ -46,6 +46,8 @@ ParasiteBuffer(GraphicsOutput *host, const string &name, _texture = new Texture(); _texture->set_name(_name); + _texture->set_wrapu(Texture::WM_clamp); + _texture->set_wrapv(Texture::WM_clamp); _copy_texture = true; _x_size = x_size;