Euphoria
shaderattribute3d.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 
6 namespace eu::render
7 {
8  struct ShaderProgram;
9 }
10 
11 // todo(Gustav): Refactor into a pipeline/layout structure
12 /*
13 Currently attributes are hardcoded into a special layout.
14 It would be preferable if the layout is written in script
15 and the actual values are dynamically created in script.
16 */
18 {
20  {
21  1,
23  "aPosition",
25  };
26 
28  {
29  2,
31  "aNormal",
33  };
34 
36  {
37  3,
39  "aTexCoord",
41  };
42 
44  {
45  4,
47  "aColor",
49  };
50 
51 
53 }
constexpr ShaderAttribute tex_coord
constexpr ShaderAttribute normal
constexpr ShaderAttribute vertex
constexpr ShaderAttribute color
void add_attributes_to_shader(ShaderProgram *shader)
Represents a shader attribute like vertex, normal or uv coord.