VR-Forces 4.8 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 
Diagonal crossing liens.
Definition: DtTacticalGraphicUtilities.h:93
META_StateAttribute(osg, DtOpenGLCubeMap, TEXTURE)
virtual void allocateMipmap(osg::State &state) const
osg::Camera * myCamera
Definition: DtOpenGLCubeMap.h:61
virtual osg::Image * getImage(unsigned int face)
int myId
Definition: DtOpenGLCubeMap.h:63
Contains texture unit information.
virtual void computeInternalFormat() const
Definition: DtOpenGLCubeMap.h:24
virtual void setImage(unsigned int face, osg::Image *image)
IMGUI_API void Image(ImTextureID user_texture_id, const ImVec2 &size, const ImVec2 &uv0=ImVec2(0, 0), const ImVec2 &uv1=ImVec2(1, 1), const ImVec4 &tint_col=ImVec4(1, 1, 1, 1), const ImVec4 &border_col=ImVec4(0, 0, 0, 0))
static int getEnvMapSlot(void)
Definition: DtOpenGLCubeMap.h:56
virtual unsigned int getNumImages() const
unsigned int GLenum
Definition: DtGlTextureBufferObject.h:18
Base class to provide boost signal/slot management.
virtual int compare(const osg::StateAttribute &sa) const
DtDe * myDe
Definition: DtOpenGLCubeMap.h:62
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
static const int EnvironmentMapTextureUnit
Definition: DtTextureUnitInfo.h:20
virtual GLenum getTextureTarget() const
virtual void apply(osg::State &state) const

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)