Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
SoShaderParameterImage.h
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-2024 BY FEI S.A.S, **
17** BORDEAUX, FRANCE **
18** ALL RIGHTS RESERVED **
19==============================================================================*/
20
21#pragma once
22
23#include <Inventor/nodes/SoNode.h>
24#include <Inventor/fields/SoSFInt32.h>
25#include <Inventor/fields/SoSFEnum.h>
26#include <Inventor/fields/SoSFNode.h>
27#include <Inventor/fields/SoSFBool.h>
28#include <Inventor/SbEnums.h>
29#include <Inventor/nodes/SoShaderParameter.h>
30
31class SoTexture;
32
94{
95 SO_NODE_HEADER(SoShaderParameterImage);
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
160 void fieldHasChanged(SoField* field) override;
161
162private:
163 virtual ~SoShaderParameterImage();
164
165private:
166 int m_assignedUnit;
167};
168
Class for smart character strings.
Definition SbString.h:202
Base class for all fields.
Definition SoField.h:234
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:156