Coin Logo http://www.sim.no/
http://www.coin3d.org/

SoGLDisplayList.h
1 #ifndef COIN_SOGLDISPLAYLIST_H
2 #define COIN_SOGLDISPLAYLIST_H
3 
4 /**************************************************************************\
5  *
6  * This file is part of the Coin 3D visualization library.
7  * Copyright (C) by Kongsberg Oil & Gas Technologies.
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * ("GPL") version 2 as published by the Free Software Foundation.
12  * See the file LICENSE.GPL at the root directory of this source
13  * distribution for additional information about the GNU GPL.
14  *
15  * For using Coin with software that can not be combined with the GNU
16  * GPL, and for taking advantage of the additional benefits of our
17  * support services, please contact Kongsberg Oil & Gas Technologies
18  * about acquiring a Coin Professional Edition License.
19  *
20  * See http://www.coin3d.org/ for more information.
21  *
22  * Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
23  * http://www.sim.no/ sales@sim.no coin-support@coin3d.org
24  *
25 \**************************************************************************/
26 
27 #include <Inventor/SbBasic.h>
28 
29 class SoState;
30 class SoGLDisplayListP;
31 
32 // *************************************************************************
33 
34 class COIN_DLL_API SoGLDisplayList {
35 public:
36  enum Type {
37  DISPLAY_LIST,
38  TEXTURE_OBJECT
39  };
40  SoGLDisplayList(SoState * state, Type type, int allocnum = 1,
41  SbBool mipmaptexobj = FALSE);
42  void ref(void);
43  void unref(SoState * state = NULL);
44 
45  void open(SoState *state, int index = 0);
46  void close(SoState *state);
47 
48  void call(SoState * state, int index = 0);
49  void addDependency(SoState * state);
50 
51  SbBool isMipMapTextureObject(void) const;
52  Type getType(void) const;
53  int getNumAllocated(void) const;
54  // this returns GLuint in Inventor, but we try to avoid including
55  // gl.h in the header files so we just return unsigned int.
56  unsigned int getFirstIndex(void) const;
57  int getContext(void) const;
58 
59  void setTextureTarget(int target);
60  int getTextureTarget(void) const;
61 
62 private:
63  ~SoGLDisplayList();
64  SoGLDisplayListP * pimpl;
65  void bindTexture(SoState *state);
66 
67  friend class SoGLCacheContextElement;
68 };
69 
70 #endif // !COIN_SOGLDISPLAYLIST_H
The SoState class manages the Coin scenegraph traversal state data.The SoState class is used by actio...
Definition: SoState.h:35
The SoGLDisplayList class stores and manages OpenGL display lists.The TEXTURE_OBJECT type is not dire...
Definition: SoGLDisplayList.h:34

Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.

Generated on Wed Feb 7 2018 for Coin by Doxygen 1.8.14.