Geogram Version 1.8.5
A programming library of geometric algorithms
Loading...
Searching...
No Matches
GLUP_context_GLSL.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2000-2022 Inria
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 *
8 * * Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution.
13 * * Neither the name of the ALICE Project-Team nor the names of its
14 * contributors may be used to endorse or promote products derived from this
15 * software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
21 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 * POSSIBILITY OF SUCH DAMAGE.
28 *
29 * Contact: Bruno Levy
30 *
31 * https://www.inria.fr/fr/bruno-levy
32 *
33 * Inria,
34 * Domaine de Voluceau,
35 * 78150 Le Chesnay - Rocquencourt
36 * FRANCE
37 *
38 */
39
40#ifndef GEOGRAM_GFX_GLUP_GLUP_CONTEXT_GLSL
41#define GEOGRAM_GFX_GLUP_GLUP_CONTEXT_GLSL
42
45
51#ifdef GEO_GL_150
52
53namespace GLUP {
54 using namespace GEO;
55
56 /*********************************************************************/
57
67 class Context_GLSL150 : public Context {
68 public:
69
73 Context_GLSL150();
74
78 const char* profile_name() const override;
79
83 void setup() override;
84
85 protected:
89 void setup_GLUP_POINTS() override;
90
94 void setup_GLUP_LINES() override;
95
99 void setup_GLUP_TRIANGLES() override;
100
104 void setup_GLUP_QUADS() override;
105
109 void setup_GLUP_TETRAHEDRA() override;
110
114 void setup_GLUP_PRISMS() override;
115
119 void setup_GLUP_HEXAHEDRA() override;
120
124 void setup_GLUP_PYRAMIDS() override;
125
129 void setup_GLUP_CONNECTORS() override;
130
134 void setup_GLUP_SPHERES() override;
135
139 void get_vertex_shader_preamble_pseudo_file(
140 std::vector<GLSL::Source>& sources
141 ) override;
142
146 void get_fragment_shader_preamble_pseudo_file(
147 std::vector<GLSL::Source>& sources
148 ) override;
149
153 void get_geometry_shader_preamble_pseudo_file(
154 std::vector<GLSL::Source>& sources
155 ) override;
156
160 void get_primitive_pseudo_file(
161 std::vector<GLSL::Source>& sources
162 ) override;
163
169 virtual void get_geometry_shader_layout(
170 std::vector<GLSL::Source>& sources
171 );
172 };
173
174 /*********************************************************************/
175
184 class Context_GLSL440 : public Context_GLSL150 {
185 public:
186
190 Context_GLSL440();
191
195 const char* profile_name() const override;
196
197 protected:
201 void setup_GLUP_HEXAHEDRA() override;
202
206 void setup_GLUP_PYRAMIDS() override;
207
211 void get_vertex_shader_preamble_pseudo_file(
212 std::vector<GLSL::Source>& sources
213 ) override;
214
218 void get_fragment_shader_preamble_pseudo_file(
219 std::vector<GLSL::Source>& sources
220 ) override;
221
225 void get_geometry_shader_preamble_pseudo_file(
226 std::vector<GLSL::Source>& sources
227 ) override;
228
232 void get_tess_evaluation_shader_preamble_pseudo_file(
233 std::vector<GLSL::Source>& sources
234 ) override;
235
239 void get_primitive_pseudo_file(
240 std::vector<GLSL::Source>& sources
241 ) override;
242
246 void get_geometry_shader_layout(
247 std::vector<GLSL::Source>& sources
248 ) override;
249
250 bool use_tessellation_;
251 };
252
253 /*********************************************************************/
254}
255
256#endif
257
258#endif
259
Internal implementation of GLUP context.
Common include file, providing basic definitions. Should be included before anything else by all head...
Global Vorpaline namespace.
Definition algorithm.h:64