瀏覽代碼

transparent background, wrap mode

David Rose 17 年之前
父節點
當前提交
84f25781b4
共有 2 個文件被更改,包括 6 次插入3 次删除
  1. 1 1
      pandatool/src/palettizer/palettizer.cxx
  2. 5 2
      pandatool/src/palettizer/textureReference.cxx

+ 1 - 1
pandatool/src/palettizer/palettizer.cxx

@@ -119,7 +119,7 @@ Palettizer() {
   _shadow_color_type = (PNMFileType *)NULL;
   _shadow_alpha_type = (PNMFileType *)NULL;
   _pal_x_size = _pal_y_size = 512;
-  _background.set(0.0, 0.0, 0.0, 1.0);
+  _background.set(0.0, 0.0, 0.0, 0.0);
   _cutout_mode = EggRenderMode::AM_dual;
   _cutout_ratio = 0.3;
 

+ 5 - 2
pandatool/src/palettizer/textureReference.cxx

@@ -484,8 +484,11 @@ update_egg() {
   nassertv(image != (PaletteImage *)NULL);
 
   image->update_egg_tex(_egg_tex);
-  // Palette images never wrap.
-  _egg_tex->set_wrap_mode(EggTexture::WM_clamp);
+
+  // Palette images never wrap, so the wrap mode doesn't matter.  We
+  // let this default to unspecified, which means the images will
+  // wrap by default, which is the fastest mode for tinydisplay anyway.
+  _egg_tex->set_wrap_mode(EggTexture::WM_unspecified);
   _egg_tex->set_wrap_u(EggTexture::WM_unspecified);
   _egg_tex->set_wrap_v(EggTexture::WM_unspecified);