VR-Forces Development_Version 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>
16 
17 // custom texture class that lets us wrap a non-OSG
18 // environmental cube map for reflections (it comes from SilverLining.)
19 namespace makVrv
20 {
21  class DtDe;
22  class DtOsgSkyObject;
23 
25  {
26  public:
28 
29  DtOpenGLCubeMap(const makVrv::DtOsgSkyObject * skyObject);
30 
31  DtOpenGLCubeMap(const DtOpenGLCubeMap& copy, const osg::CopyOp& copyOp =
32  osg::CopyOp::SHALLOW_COPY);
33 
34  META_StateAttribute(osg, DtOpenGLCubeMap, TEXTURE);
35 
36  virtual void connectToSky( DtDe& de );
37  virtual void slot_skyAdded( DtOsgSkyObject* sky );
38  virtual void slot_skyRemoved();
39 
40  virtual int compare(const osg::StateAttribute& sa) const;
41 
42  virtual GLenum getTextureTarget() const ;
43 
44  virtual void setImage(unsigned int face, osg::Image *image);
45 
46  virtual osg::Image *getImage(unsigned int face);
47 
48  virtual const osg::Image *getImage(unsigned int face) const;
49 
50  virtual unsigned int getNumImages() const;
51 
52  virtual void computeInternalFormat() const;
53 
54  virtual void allocateMipmap(osg::State& state) const;
55 
56  virtual void apply(osg::State& state) const;
57 
58  // We stick the environment cube map above the highest "normal"
59  // slot to avoid interference with OSG textures
61 
62  protected:
63  virtual ~DtOpenGLCubeMap();
64 
67  };
68 
69 
70 }
71 

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)