BALL  1.5.0
glDisplayList.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 // $Id: glDisplayList.h,v 1.8.16.1 2007/03/25 21:26:14 oliver Exp $
5 
6 #ifndef BALL_VIEW_RENDERING_GLDISPLAYLIST_H
7 #define BALL_VIEW_RENDERING_GLDISPLAYLIST_H
8 
9 #ifndef BALL_COMMON_H
10 # include <BALL/common.h>
11 #endif
12 
13 #include <QtOpenGL/qgl.h>
14 
15 namespace BALL
16 {
17  namespace VIEW
18  {
19 
32 {
33  public:
34 
36 
37 
40 
45  typedef unsigned long GLList;
46 
48 
51 
56  static const GLList DISPLAYLIST_NOT_DEFINED;
57 
59 
62 
68  class BALL_VIEW_EXPORT NestedDisplayList: public Exception::GeneralException
69  {
70  public:
71 
72  NestedDisplayList(const char* file, int line) ;
73  };
74 
81  {
82  public:
83 
84  NoDisplayListAvailable(const char* file, int line);
85  };
86 
93  {
94  public:
95 
96  DisplayListRedeclaration(const char* file, int line);
97  };
98 
100 
103 
112 
114 
117 
121  virtual ~GLDisplayList();
122 
126  virtual void clear();
127 
129 
132 
145 
151 
160  void draw();
161 
173 
186 
188 
191 
196  bool isCompileMode() const;
197 
203 
205 
211  virtual bool isValid() const
212  { return GL_list_ != 0; }
213 
220  virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
221 
223 
224  private:
225 
226  /* compile switch */
227  bool compile_;
228 
229  /* display list */
230  GLList GL_list_;
231 };
232 
233 # ifndef BALL_NO_INLINE_FUNCTIONS
234 # include <BALL/VIEW/RENDERING/glDisplayList.iC>
235 # endif
236 
237  } // namespace VIEW
238 } // namespace BALL
239 
240 #endif // BALL_VIEW_RENDERING_GLDISPLAYLIST_H
BALL::VIEW::GLDisplayList::useCompileAndExecuteMode
void useCompileAndExecuteMode()
BALL::VIEW::GLDisplayList::clear
virtual void clear()
BALL::VIEW::GLDisplayList::useCompileMode
void useCompileMode()
BALL::VIEW::GLDisplayList::draw
void draw()
BALL::VIEW::GLDisplayList::isValid
virtual bool isValid() const
Definition: glDisplayList.h:211
BALL::VIEW::GLDisplayList::GLList
unsigned long GLList
Definition: glDisplayList.h:45
BALL::VIEW::GLDisplayList::~GLDisplayList
virtual ~GLDisplayList()
BALL::VIEW::GLDisplayList::DisplayListRedeclaration
Definition: glDisplayList.h:93
BALL::VIEW::GLDisplayList::startDefinition
void startDefinition()
BALL::VIEW::GLDisplayList::NestedDisplayList
Definition: glDisplayList.h:69
BALL
Definition: constants.h:13
BALL::VIEW::GLDisplayList::isCompileMode
bool isCompileMode() const
BALL::VIEW::GLDisplayList::NestedDisplayList::NestedDisplayList
NestedDisplayList(const char *file, int line)
BALL::VIEW::GLDisplayList::GLDisplayList
GLDisplayList()
BALL_SIZE_TYPE
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52
BALL::VIEW::GLDisplayList::endDefinition
void endDefinition()
BALL::VIEW::GLDisplayList::NoDisplayListAvailable::NoDisplayListAvailable
NoDisplayListAvailable(const char *file, int line)
BALL::VIEW::GLDisplayList::dump
virtual void dump(std::ostream &s=std::cout, Size depth=0) const
common.h
BALL::VIEW::GLDisplayList::DisplayListRedeclaration::DisplayListRedeclaration
DisplayListRedeclaration(const char *file, int line)
BALL::Exception::GeneralException
Definition: COMMON/exception.h:61
BALL_CREATE
#define BALL_CREATE(name)
Definition: create.h:62
BALL::VIEW::GLDisplayList::NoDisplayListAvailable
Definition: glDisplayList.h:81
BALL::VIEW::GLDisplayList
Definition: glDisplayList.h:32
BALL::VIEW::GLDisplayList::isCompileAndExecuteMode
bool isCompileAndExecuteMode() const