diff --git a/pandatool/src/egg-palettize/eggFile.cxx b/pandatool/src/egg-palettize/eggFile.cxx index 025be09201..a0d72c6000 100644 --- a/pandatool/src/egg-palettize/eggFile.cxx +++ b/pandatool/src/egg-palettize/eggFile.cxx @@ -275,13 +275,16 @@ build_cross_links() { Textures::const_iterator ti; for (ti = _textures.begin(); ti != _textures.end(); ++ti) { - (*ti)->get_texture()->note_egg_file(this); + TextureReference *reference = (*ti); + TextureImage *texture = reference->get_texture(); + nassertv(texture != (TextureImage *)NULL); + texture->note_egg_file(this); // Actually, this may count the same egg file multiple times for a // particular SourceTextureImage, since a given texture may be // reference multiples times within an egg file. No harm done, // however. - (*ti)->get_source()->increment_egg_count(); + reference->get_source()->increment_egg_count(); } PaletteGroups::const_iterator gi; diff --git a/pandatool/src/egg-palettize/textureProperties.cxx b/pandatool/src/egg-palettize/textureProperties.cxx index f024d044a2..f34373db98 100644 --- a/pandatool/src/egg-palettize/textureProperties.cxx +++ b/pandatool/src/egg-palettize/textureProperties.cxx @@ -156,6 +156,7 @@ fully_define() { if (!_got_num_channels) { switch (_format) { case EggTexture::F_rgba: + case EggTexture::F_rgbm: case EggTexture::F_rgba12: case EggTexture::F_rgba8: case EggTexture::F_rgba4: @@ -239,6 +240,7 @@ fully_define() { case 4: switch (_format) { case EggTexture::F_rgba: + case EggTexture::F_rgbm: case EggTexture::F_rgba12: case EggTexture::F_rgba8: case EggTexture::F_rgba4: @@ -358,6 +360,9 @@ get_format_string(EggTexture::Format format) { case EggTexture::F_rgba: return "a"; + case EggTexture::F_rgbm: + return "m"; + case EggTexture::F_rgba12: return "a12"; @@ -472,6 +477,7 @@ union_format(EggTexture::Format a, EggTexture::Format b) { case EggTexture::F_rgba: switch (b) { + case EggTexture::F_rgbm: case EggTexture::F_rgba12: case EggTexture::F_rgba8: case EggTexture::F_rgba4: diff --git a/pandatool/src/egg-palettize/textureReference.cxx b/pandatool/src/egg-palettize/textureReference.cxx index f8120411d7..3e38c31b79 100644 --- a/pandatool/src/egg-palettize/textureReference.cxx +++ b/pandatool/src/egg-palettize/textureReference.cxx @@ -146,6 +146,7 @@ get_source() const { //////////////////////////////////////////////////////////////////// TextureImage *TextureReference:: get_texture() const { + nassertr(_source_texture != (SourceTextureImage *)NULL, (TextureImage *)NULL); return _source_texture->get_texture(); } diff --git a/pandatool/src/gtk-stats/gtkStatsStripChart.cxx b/pandatool/src/gtk-stats/gtkStatsStripChart.cxx index 415e913638..00f4b26dab 100644 --- a/pandatool/src/gtk-stats/gtkStatsStripChart.cxx +++ b/pandatool/src/gtk-stats/gtkStatsStripChart.cxx @@ -52,7 +52,12 @@ mark_dead() { _is_dead = true; setup_white_gc(); - force_redraw(); + + if (!first_data()) { + force_redraw(); + } else { + clear_region(); + } } //////////////////////////////////////////////////////////////////// diff --git a/pandatool/src/pstatserver/pStatStripChart.cxx b/pandatool/src/pstatserver/pStatStripChart.cxx index 86c4da5723..2568e52e44 100644 --- a/pandatool/src/pstatserver/pStatStripChart.cxx +++ b/pandatool/src/pstatserver/pStatStripChart.cxx @@ -105,6 +105,17 @@ update() { idle(); } +//////////////////////////////////////////////////////////////////// +// Function: PStatStripChart::first_data +// Access: Public +// Description: Returns true if the chart has seen its first data +// appear on it, false if it is still a virgin chart. +//////////////////////////////////////////////////////////////////// +bool PStatStripChart:: +first_data() const { + return _first_data; +} + //////////////////////////////////////////////////////////////////// // Function: PStatStripChart::get_collector_under_pixel // Access: Public diff --git a/pandatool/src/pstatserver/pStatStripChart.h b/pandatool/src/pstatserver/pStatStripChart.h index 95a563fbaa..ab611bd322 100644 --- a/pandatool/src/pstatserver/pStatStripChart.h +++ b/pandatool/src/pstatserver/pStatStripChart.h @@ -39,6 +39,7 @@ public: void new_data(int frame_number); void update(); + bool first_data() const; INLINE PStatView &get_view() const; INLINE int get_collector_index() const;