VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOpenGLCubeMap.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2018 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <osg/Texture>
13 #include <osg/Image>
14 #include <osg/Camera>
17 
18 // custom texture class that lets us wrap a non-OSG
19 // environmental cube map for reflections (it comes from SilverLining.)
20 namespace makVrv
21 {
22  class DtDe;
23 
25  {
26  public:
28 
29  DtOpenGLCubeMap(DtDe& de, osg::Camera* camera);
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 int compare(const osg::StateAttribute& sa) const;
37 
38  virtual GLenum getTextureTarget() const ;
39 
40  virtual void setImage(unsigned int face, osg::Image *image);
41 
42  virtual osg::Image *getImage(unsigned int face);
43 
44  virtual const osg::Image *getImage(unsigned int face) const;
45 
46  virtual unsigned int getNumImages() const;
47 
48  virtual void computeInternalFormat() const;
49 
50  virtual void allocateMipmap(osg::State& state) const;
51 
52  virtual void apply(osg::State& state) const;
53 
54  // We stick the environment cube map above the highest "normal"
55  // slot to avoid interference with OSG textures
57 
58  protected:
59  virtual ~DtOpenGLCubeMap();
60 
61  osg::Camera * myCamera;
63  int myId;
64  };
65 
66 
67 }
68 

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)