Browse Source

transparent background, wrap mode

David Rose 17 years ago
parent
commit
84f25781b4

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

@@ -119,7 +119,7 @@ Palettizer() {
   _shadow_color_type = (PNMFileType *)NULL;
   _shadow_color_type = (PNMFileType *)NULL;
   _shadow_alpha_type = (PNMFileType *)NULL;
   _shadow_alpha_type = (PNMFileType *)NULL;
   _pal_x_size = _pal_y_size = 512;
   _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_mode = EggRenderMode::AM_dual;
   _cutout_ratio = 0.3;
   _cutout_ratio = 0.3;
 
 

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

@@ -484,8 +484,11 @@ update_egg() {
   nassertv(image != (PaletteImage *)NULL);
   nassertv(image != (PaletteImage *)NULL);
 
 
   image->update_egg_tex(_egg_tex);
   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_u(EggTexture::WM_unspecified);
   _egg_tex->set_wrap_v(EggTexture::WM_unspecified);
   _egg_tex->set_wrap_v(EggTexture::WM_unspecified);