瀏覽代碼

render textures should clamp by default

David Rose 22 年之前
父節點
當前提交
6a0476ebcb
共有 3 個文件被更改,包括 6 次插入0 次删除
  1. 2 0
      panda/src/display/graphicsBuffer.cxx
  2. 2 0
      panda/src/display/graphicsEngine.cxx
  3. 2 0
      panda/src/display/parasiteBuffer.cxx

+ 2 - 0
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;
   }
 

+ 2 - 0
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;
       }
 

+ 2 - 0
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;