Panda3D
|
00001 // Filename: eggToBam.h 00002 // Created by: drose (28Jun00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 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 // Class : EggToBam 00033 // Description : 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 // The rest of this is required to support -ctex. 00073 PT(GraphicsPipe) _pipe; 00074 GraphicsStateGuardian *_gsg; 00075 GraphicsEngine *_engine; 00076 GraphicsOutput *_buffer; 00077 }; 00078 00079 #endif