Ocean
Loading...
Searching...
No Matches
GLESPrimitiveAttribute.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#ifndef META_OCEAN_RENDERING_GLES_PRIMITIVE_ATTRIBUTE_H
9#define META_OCEAN_RENDERING_GLES_PRIMITIVE_ATTRIBUTE_H
10
13
15
16namespace Ocean
17{
18
19namespace Rendering
20{
21
22namespace GLESceneGraph
23{
24
25/**
26 * This class implements a GLESceneGraph primitive attribute object.
27 * @ingroup renderinggles
28 */
29class OCEAN_RENDERING_GLES_EXPORT GLESPrimitiveAttribute :
30 virtual public GLESAttribute,
31 virtual public PrimitiveAttribute
32{
33 friend class GLESFactory;
34
35 public:
36
37 /**
38 * Returns the face mode of this attribute.
39 * @see PrimitiveAttribute::faceMode().
40 */
41 FaceMode faceMode() const override;
42
43 /**
44 * Returns the culling mode of this attribute.
45 * @see PrimitiveAttribute::cullingMode().
46 */
47 CullingMode cullingMode() const override;
48
49 /**
50 * Returns the lighting mode of this attribute.
51 * @see PrimitiveAttribute::lightingMode().
52 */
53 LightingMode lightingMode() const override;
54
55 /**
56 * Sets the face mode for this attribute.
57 * @see PrimitiveAttribute::setFaceMode().
58 */
59 void setFaceMode(const FaceMode mode) override;
60
61 /**
62 * Sets the culling mode for this attribute.
63 * @see PrimitiveAttribute::setCullingMode().
64 */
65 void setCullingMode(const CullingMode culling) override;
66
67 /**
68 * Sets the lighting mode for this attribute.
69 * @see PrimitiveAttribute::setLightingMode().
70 */
71 void setLightingMode(const LightingMode lighting) override;
72
73 /**
74 * Binds this attribute.
75 * @see GLESAttribute::bindAttribute().
76 */
77 void bindAttribute(const GLESFramebuffer& framebuffer, GLESShaderProgram& shaderProgram) override;
78
79 /**
80 * Unbindes this attribute.
81 * @see GLESAttribute::unbindAttribute().
82 */
83 void unbindAttribute() override;
84
85 protected:
86
87 /**
88 * Creates a new GLESceneGraph primitive attribute.
89 */
91
92 /**
93 * Destructs a GLESceneGraph primitive attribute.
94 */
96
97 private:
98
99 /// The face mode of this attribute.
101
102 /// Culling mode of this attribute.
104
105 /// OpenGL ES culling mode.
107
108 /// Two sided lighting state.
110
111 /// True, if a parameter unbind is necessary.
113};
114
115}
116
117}
118
119}
120
121#endif // META_OCEAN_RENDERING_GLES_PRIMITIVE_ATTRIBUTE_H
This class wraps a GLESceneGraph attribute object.
Definition GLESAttribute.h:36
This class implements a class factory for all GLESceneGraph objects.
Definition GLESFactory.h:30
This class implements a base for all GLESceneGraph framebuffers.
Definition rendering/glescenegraph/GLESFramebuffer.h:34
This class implements a GLESceneGraph primitive attribute object.
Definition GLESPrimitiveAttribute.h:32
void setCullingMode(const CullingMode culling) override
Sets the culling mode for this attribute.
GLESPrimitiveAttribute()
Creates a new GLESceneGraph primitive attribute.
CullingMode cullingMode_
Culling mode of this attribute.
Definition GLESPrimitiveAttribute.h:103
void unbindAttribute() override
Unbindes this attribute.
LightingMode lightingMode_
Two sided lighting state.
Definition GLESPrimitiveAttribute.h:109
~GLESPrimitiveAttribute() override
Destructs a GLESceneGraph primitive attribute.
LightingMode lightingMode() const override
Returns the lighting mode of this attribute.
void setFaceMode(const FaceMode mode) override
Sets the face mode for this attribute.
void bindAttribute(const GLESFramebuffer &framebuffer, GLESShaderProgram &shaderProgram) override
Binds this attribute.
void setLightingMode(const LightingMode lighting) override
Sets the lighting mode for this attribute.
bool unbindNecessary_
True, if a parameter unbind is necessary.
Definition GLESPrimitiveAttribute.h:112
GLenum glesCullingMode_
OpenGL ES culling mode.
Definition GLESPrimitiveAttribute.h:106
CullingMode cullingMode() const override
Returns the culling mode of this attribute.
FaceMode faceMode_
The face mode of this attribute.
Definition GLESPrimitiveAttribute.h:100
FaceMode faceMode() const override
Returns the face mode of this attribute.
This class implements a container for an OpenGL ES shader program.
Definition GLESShaderProgram.h:53
This class implements an attribute specifying face and culling properties of primitives.
Definition PrimitiveAttribute.h:35
FaceMode
Defines different face rendering modes.
Definition PrimitiveAttribute.h:42
CullingMode
Defines different face culling modes.
Definition PrimitiveAttribute.h:57
LightingMode
Definition of different lighting modes.
Definition PrimitiveAttribute.h:74
The namespace covering the entire Ocean framework.
Definition Accessor.h:15