Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SoShaderParameterImage.h
Go to the documentation of this file.
1/*==============================================================================
2** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), **
3** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. **
4** **
5** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS **
6** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR **
7** WRITTEN AUTHORIZATION OF FEI S.A.S. **
8** **
9** RESTRICTED RIGHTS LEGEND **
10** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS **
11** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN **
12** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT **
13** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN **
14** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. **
15** **
16** COPYRIGHT (C) 1996-2022 BY FEI S.A.S, **
17** BORDEAUX, FRANCE **
18** ALL RIGHTS RESERVED **
19==============================================================================*/
20
21#pragma once
22
28#include <Inventor/SbEnums.h>
30
31class SoTexture;
32
94{
96 RENDERER_RESOURCE(SoShaderParameterImage);
97
98public:
104
110
115 {
119 READ = SbEnums::READ,
120
124 WRITE = SbEnums::WRITE,
125
129 READ_WRITE = SbEnums::READ_WRITE,
130 };
131
138
140
141private:
142 void GLRender(SoGLRenderAction* action);
143
144private:
145 static void initClass();
146 static void exitClass();
147
148 void setAssignedUnit(int unit)
149 {
150 m_assignedUnit = unit;
151 }
152
153 int getAssignedUnit() const
154 {
155 return m_assignedUnit;
156 }
157
158 static const SbString& getGLSLFormatLayout(SoTexture* texture);
159
160private:
161 virtual ~SoShaderParameterImage();
162
163private:
164 int m_assignedUnit;
165};
166
#define SO_NODE_HEADER(className)
Definition SoSubNode.h:151
Class for smart character strings.
Definition SbString.h:202
Renders a scene graph using Open Inventor's Render Engine.
Field containing an enumerated value.
Definition SoSFEnum.h:89
Field containing a int32_t integer.
Definition SoSFInt32.h:80
Field containing a a node.
Definition SoSFNode.h:97
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Shader parameter...
SoSFEnum accessMode
Specifies the type of access that will be performed on the image.
SoSFInt32 layer
Specifies the layer of texture to be bound to the image unit.
@ READ_WRITE
The shader can read from and can write to the image.
@ WRITE
The shader can only write to the image.
@ READ
The shader can only read from the image.
SoSFNode texture
Specifies the texture to bind to the image unit.
Abstract base class for texture mapping nodes.
Definition SoTexture.h:155