1 #ifndef VOGLEDITOR_STATETREECONTEXTGENERALITEM_H
2 #define VOGLEDITOR_STATETREECONTEXTGENERALITEM_H
4 #include "vogleditor_statetreeitem.h"
6 #include "vogl_state_vector.h"
7 #include "vogl_general_context_state.h"
9 class vogleditor_stateTreeContextGeneralCompressTextureFormatItem : public vogleditor_stateTreeDatatypeItem<int>
12 vogleditor_stateTreeContextGeneralCompressTextureFormatItem(QString glenumName, GLenum name, unsigned int index, const vogl_state_vector& stateVec, int formatEnum, unsigned int numComponents, bool isIndexed, vogleditor_stateTreeItem* parent);
13 virtual ~vogleditor_stateTreeContextGeneralCompressTextureFormatItem() {}
15 virtual void set_diff_base_state(const vogl_state_vector* pBaseState) { VOGL_NOTE_UNUSED(pBaseState); VOGL_ASSERT(!"This version of the function is not supported for vogleditor_stateTreeContextGeneralCompressTextureFormatItem"); }
16 void set_diff_base_state(const vogl_general_context_state* pBaseGeneralState) { m_pDiffBaseGeneralState = pBaseGeneralState; }
18 virtual bool hasChanged() const;
22 const vogl_general_context_state* m_pDiffBaseGeneralState;
25 class vogleditor_stateTreeContextGeneralItem : public vogleditor_stateTreeItem
28 vogleditor_stateTreeContextGeneralItem(QString name, QString value, vogleditor_stateTreeItem* parent, vogl_general_context_state& generalState, const vogl_context_info& info);
29 virtual ~vogleditor_stateTreeContextGeneralItem()
31 m_pState = NULL; m_pDiffBaseState = NULL;
34 vogl_general_context_state* get_context_general_state() const { return m_pState; }
35 void set_diff_base_state(const vogl_general_context_state* pBaseState) {
36 m_pDiffBaseState = pBaseState;
37 for (vogleditor_stateTreeStateVecDiffableItem** iter = m_diffableItems.begin(); iter != m_diffableItems.end(); iter++)
39 (*iter)->set_diff_base_state(static_cast<const vogl_state_vector*>(pBaseState));
42 for (vogleditor_stateTreeContextGeneralCompressTextureFormatItem** iter = m_formatItems.begin(); iter != m_formatItems.end(); iter++)
44 (*iter)->set_diff_base_state(pBaseState);
49 vogl_general_context_state* m_pState;
50 const vogl_general_context_state* m_pDiffBaseState;
51 vogl::vector<vogleditor_stateTreeStateVecDiffableItem*> m_diffableItems;
52 vogl::vector<vogleditor_stateTreeContextGeneralCompressTextureFormatItem*> m_formatItems;
56 #endif // VOGLEDITOR_STATETREECONTEXTGENERALITEM_H