VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtOpenGLCubeMap.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <osg/Texture>
13 #include <osg/Image>
15 
16 // custom texture class that lets us wrap a non-OSG
17 // environmental cube map for reflections (it comes from SilverLining.)
18 namespace makVrv
19 {
20  class DtDe;
21  class DtOsgSkyObject;
22 
24  {
25  public:
27 
28  DtOpenGLCubeMap(const makVrv::DtOsgSkyObject * skyObject);
29 
30  DtOpenGLCubeMap(const DtOpenGLCubeMap& copy, const osg::CopyOp& copyOp =
31  osg::CopyOp::SHALLOW_COPY);
32 
33  META_StateAttribute(osg, DtOpenGLCubeMap, TEXTURE);
34 
35  virtual void connectToSky( DtDe& de );
36  virtual void slot_skyAdded( DtOsgSkyObject* sky );
37  virtual void slot_skyRemoved();
38 
39  virtual int compare(const osg::StateAttribute& sa) const;
40 
41  virtual GLenum getTextureTarget() const ;
42 
43  virtual void setImage(unsigned int face, osg::Image *image);
44 
45  virtual osg::Image *getImage(unsigned int face);
46 
47  virtual const osg::Image *getImage(unsigned int face) const;
48 
49  virtual unsigned int getNumImages() const;
50 
51  virtual void computeInternalFormat() const;
52 
53  virtual void allocateMipmap(osg::State& state) const;
54 
55  virtual void apply(osg::State& state) const;
56 
57  // We stick the environment cube map above the highest "normal"
58  // slot to avoid interference with OSG textures
59  static int getEnvMapSlot(void){return 8;}
60 
61  protected:
62  virtual ~DtOpenGLCubeMap();
63 
66  };
67 
68 
69 }
70 

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)