Documentation of SFML 2.6.1

Loading...
Searching...
No Matches
Glsl.hpp
1
2//
3// SFML - Simple and Fast Multimedia Library
4// Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org)
5//
6// This software is provided 'as-is', without any express or implied warranty.
7// In no event will the authors be held liable for any damages arising from the use of this software.
8//
9// Permission is granted to anyone to use this software for any purpose,
10// including commercial applications, and to alter it and redistribute it freely,
11// subject to the following restrictions:
12//
13// 1. The origin of this software must not be misrepresented;
14// you must not claim that you wrote the original software.
15// If you use this software in a product, an acknowledgment
16// in the product documentation would be appreciated but is not required.
17//
18// 2. Altered source versions must be plainly marked as such,
19// and must not be misrepresented as being the original software.
20//
21// 3. This notice may not be removed or altered from any source distribution.
22//
24
25#ifndef SFML_GLSL_HPP
26#define SFML_GLSL_HPP
27
29// Headers
31#include <SFML/Graphics/Transform.hpp>
32#include <SFML/Graphics/Color.hpp>
33#include <SFML/System/Vector2.hpp>
34#include <SFML/System/Vector3.hpp>
35
36
37namespace sf
38{
39namespace priv
40{
41 // Forward declarations
42 template <std::size_t Columns, std::size_t Rows>
43 struct Matrix;
44
45 template <typename T>
46 struct Vector4;
47
48#include <SFML/Graphics/Glsl.inl>
49
50} // namespace priv
51
52
57namespace Glsl
58{
59
65
71
77
83
89
95
96#ifdef SFML_DOXYGEN
97
110 typedef implementation-defined Vec4;
111
124 typedef implementation-defined Ivec4;
125
130 typedef implementation-defined Bvec4;
131
155 typedef implementation-defined Mat3;
156
181 typedef implementation-defined Mat4;
182
183#else // SFML_DOXYGEN
184
185 typedef priv::Vector4<float> Vec4;
186 typedef priv::Vector4<int> Ivec4;
187 typedef priv::Vector4<bool> Bvec4;
188 typedef priv::Matrix<3, 3> Mat3;
189 typedef priv::Matrix<4, 4> Mat4;
190
191#endif // SFML_DOXYGEN
192
193} // namespace Glsl
194} // namespace sf
195
196#endif // SFML_GLSL_HPP
197
198
Utility template class for manipulating 2-dimensional vectors.
Definition Vector2.hpp:38
Utility template class for manipulating 3-dimensional vectors.
Definition Vector3.hpp:38
Vector3< bool > Bvec3
3D bool vector (bvec3 in GLSL)
Definition Glsl.hpp:94
Vector2< bool > Bvec2
2D bool vector (bvec2 in GLSL)
Definition Glsl.hpp:76
Vector3< int > Ivec3
3D int vector (ivec3 in GLSL)
Definition Glsl.hpp:88
implementation defined Mat4
4x4 float matrix (mat4 in GLSL)
Definition Glsl.hpp:181
implementation defined Ivec4
4D int vector (ivec4 in GLSL)
Definition Glsl.hpp:124
implementation defined Vec4
4D float vector (vec4 in GLSL)
Definition Glsl.hpp:110
implementation defined Bvec4
4D bool vector (bvec4 in GLSL)
Definition Glsl.hpp:130
Vector3< float > Vec3
3D float vector (vec3 in GLSL)
Definition Glsl.hpp:82
implementation defined Mat3
3x3 float matrix (mat3 in GLSL)
Definition Glsl.hpp:155
Vector2< int > Ivec2
2D int vector (ivec2 in GLSL)
Definition Glsl.hpp:70
Vector2< float > Vec2
2D float vector (vec2 in GLSL)
Definition Glsl.hpp:64