00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef EGGTOBAM_H
00016 #define EGGTOBAM_H
00017
00018 #include "pandatoolbase.h"
00019
00020 #include "eggToSomething.h"
00021 #include "pset.h"
00022 #include "graphicsPipe.h"
00023
00024 class PandaNode;
00025 class RenderState;
00026 class Texture;
00027 class GraphicsEngine;
00028 class GraphicsStateGuardian;
00029 class GraphicsOutput;
00030
00031
00032
00033
00034
00035 class EggToBam : public EggToSomething {
00036 public:
00037 EggToBam();
00038
00039 void run();
00040
00041 protected:
00042 virtual bool handle_args(Args &args);
00043
00044 private:
00045 void collect_textures(PandaNode *node);
00046 void collect_textures(const RenderState *state);
00047 void convert_txo(Texture *tex);
00048
00049 bool make_buffer();
00050
00051 private:
00052 typedef pset<Texture *> Textures;
00053 Textures _textures;
00054
00055 bool _has_egg_flatten;
00056 int _egg_flatten;
00057 bool _has_egg_combine_geoms;
00058 int _egg_combine_geoms;
00059 bool _egg_suppress_hidden;
00060 bool _ls;
00061 bool _has_compression_quality;
00062 int _compression_quality;
00063 bool _compression_off;
00064 bool _tex_rawdata;
00065 bool _tex_txo;
00066 bool _tex_txopz;
00067 bool _tex_ctex;
00068 bool _tex_mipmap;
00069 string _ctex_quality;
00070 string _load_display;
00071
00072
00073 PT(GraphicsPipe) _pipe;
00074 GraphicsStateGuardian *_gsg;
00075 GraphicsEngine *_engine;
00076 GraphicsOutput *_buffer;
00077 };
00078
00079 #endif