]> git.cworth.org Git - vogl/blob - src/vogleditor/vogleditor_gl_state_snapshot.h
Initial vogl checkin
[vogl] / src / vogleditor / vogleditor_gl_state_snapshot.h
1 #ifndef VOGLEDITOR_GL_STATE_SNAPSHOT_H
2 #define VOGLEDITOR_GL_STATE_SNAPSHOT_H
3
4 #include "vogl_gl_state_snapshot.h"
5
6 class vogleditor_gl_state_snapshot
7 {
8 public:
9     vogleditor_gl_state_snapshot(vogl_gl_state_snapshot* pSnapshot);
10     virtual ~vogleditor_gl_state_snapshot();
11
12     bool is_valid() const { return m_pSnapshot != NULL && m_pSnapshot->is_valid(); }
13
14     void set_edited(bool bEdited) { m_bEdited = bEdited; }
15     bool is_edited() const { return m_bEdited; }
16
17     void set_outdated(bool bOutdated);
18     bool is_outdated() const { return m_bOutdated; }
19
20     inline vogl_gl_state_snapshot* get_snapshot() { return m_pSnapshot; }
21
22     // direct accessors to the snapshot object
23     vogl_trace_ptr_value get_cur_trace_context() const { return m_pSnapshot->get_cur_trace_context(); }
24     vogl_context_snapshot_ptr_vec& get_contexts() { return m_pSnapshot->get_contexts(); }
25     const vogl_context_snapshot_ptr_vec& get_contexts() const { return m_pSnapshot->get_contexts(); }
26     vogl_context_snapshot* get_context(vogl_trace_ptr_value contextHandle) const { return m_pSnapshot->get_context(contextHandle); }
27     vogl_default_framebuffer_state &get_default_framebuffer() { return m_pSnapshot->get_default_framebuffer(); }
28
29 private:
30     vogl_gl_state_snapshot* m_pSnapshot;
31     bool m_bEdited;
32     bool m_bOutdated;
33 };
34
35 #endif // VOGLEDITOR_GL_STATE_SNAPSHOT_H