48 GLenum internal_format;
55 float border_color[4];
59 int multisample_samples;
65 , internal_format(GL_NONE)
67 , mag_filter(GL_LINEAR)
68 , min_filter(GL_LINEAR_MIPMAP_LINEAR)
72 , border_color{0, 0, 0, 0}
73 , generate_mipmap(
true)
76 , multisample_samples(4)
80 static Params multisampled_rgba16f(
int num_samples = 4)
83 p.type = GL_TEXTURE_2D_MULTISAMPLE;
84 p.internal_format = GL_RGBA16F;
85 p.generate_mipmap =
false;
86 p.min_filter = GL_LINEAR;
87 p.multisample_samples = num_samples;
92 static Params multisampled_rgba16f_depth(
int num_samples = 4)
94 Params p = multisampled_rgba16f(num_samples);
95 p.internal_format = GL_DEPTH_COMPONENT24;
99 static Params rgb16f()
102 p.type = GL_TEXTURE_2D;
104 p.internal_format = GL_RGB16F;
105 p.wrap_s = GL_CLAMP_TO_EDGE;
106 p.wrap_t = GL_CLAMP_TO_EDGE;
107 p.mag_filter = GL_LINEAR;
108 p.min_filter = GL_LINEAR;
109 p.generate_mipmap =
false;
114 static Params rgba16f()
118 p.internal_format = GL_RGBA16F;
125 p.type = GL_TEXTURE_2D;
127 p.internal_format = GL_RED;
128 p.wrap_s = GL_CLAMP_TO_EDGE;
129 p.wrap_t = GL_CLAMP_TO_EDGE;
130 p.mag_filter = GL_LINEAR;
131 p.min_filter = GL_LINEAR;
132 p.generate_mipmap =
false;
139 p.type = GL_TEXTURE_2D;
141 p.internal_format = GL_RGB;
142 p.wrap_s = GL_CLAMP_TO_EDGE;
143 p.wrap_t = GL_CLAMP_TO_EDGE;
144 p.mag_filter = GL_NEAREST;
145 p.min_filter = GL_NEAREST;
146 p.generate_mipmap =
false;
154 p.internal_format = GL_RGBA;
158 static Params depth()
161 p.format = GL_DEPTH_COMPONENT;
162 p.internal_format = GL_DEPTH_COMPONENT24;