15
15
16
16
#include " registry/ImplementationRegistry.h"
17
17
#include " implementations/AbstractTextureImplementation.h"
18
+ #include " implementations/AbstractTextureStorageImplementation.h"
18
19
19
20
20
21
namespace
21
22
{
22
23
23
- const globjects::AbstractTextureImplementation & implementation ()
24
+ const globjects::AbstractTextureImplementation & bindlessImplementation ()
24
25
{
25
- return globjects::ImplementationRegistry::current ().textureImplementation ();
26
+ return globjects::ImplementationRegistry::current ().textureBindlessImplementation ();
27
+ }
28
+
29
+ const globjects::AbstractTextureStorageImplementation & storageImplementation ()
30
+ {
31
+ return globjects::ImplementationRegistry::current ().textureStorageImplementation ();
26
32
}
27
33
28
34
}
@@ -132,27 +138,27 @@ void Texture::setParameter(const GLenum name, const GLenum value)
132
138
133
139
void Texture::setParameter (const GLenum name, const GLint value)
134
140
{
135
- implementation ().setParameter (this , name, value);
141
+ bindlessImplementation ().setParameter (this , name, value);
136
142
}
137
143
138
144
void Texture::setParameter (const GLenum name, const GLfloat value)
139
145
{
140
- implementation ().setParameter (this , name, value);
146
+ bindlessImplementation ().setParameter (this , name, value);
141
147
}
142
148
143
149
void Texture::setParameter (gl::GLenum name, const glm::vec4 & value)
144
150
{
145
- implementation ().setParameter (this , name, value);
151
+ bindlessImplementation ().setParameter (this , name, value);
146
152
}
147
153
148
154
GLint Texture::getParameter (const GLenum pname) const
149
155
{
150
- return implementation ().getParameter (this , pname);
156
+ return bindlessImplementation ().getParameter (this , pname);
151
157
}
152
158
153
159
GLint Texture::getLevelParameter (const GLint level, const GLenum pname) const
154
160
{
155
- return implementation ().getLevelParameter (this , level, pname);
161
+ return bindlessImplementation ().getLevelParameter (this , level, pname);
156
162
}
157
163
158
164
void Texture::getImage (const GLint level, const GLenum format, const GLenum type, GLvoid * image) const
@@ -195,22 +201,22 @@ std::vector<unsigned char> Texture::getCompressedImage(const GLint lod) const
195
201
196
202
void Texture::image1D (const GLint level, const GLenum internalFormat, const GLsizei width, const GLint border, const GLenum format, const GLenum type, const GLvoid * data)
197
203
{
198
- implementation ().image1D (this , level, internalFormat, width, border, format, type, data);
204
+ bindlessImplementation ().image1D (this , level, internalFormat, width, border, format, type, data);
199
205
}
200
206
201
207
void Texture::compressedImage1D (const GLint level, const GLenum internalFormat, const GLsizei width, const GLint border, const GLsizei imageSize, const GLvoid * data)
202
208
{
203
- implementation ().compressedImage1D (this , level, internalFormat, width, border, imageSize, data);
209
+ bindlessImplementation ().compressedImage1D (this , level, internalFormat, width, border, imageSize, data);
204
210
}
205
211
206
212
void Texture::subImage1D (const GLint level, const GLint xOffset, const GLsizei width, const GLenum format, const GLenum type, const GLvoid * data)
207
213
{
208
- implementation ().subImage1D (this , level, xOffset, width, format, type, data);
214
+ bindlessImplementation ().subImage1D (this , level, xOffset, width, format, type, data);
209
215
}
210
216
211
217
void Texture::image2D (const GLint level, const GLenum internalFormat, const GLsizei width, const GLsizei height, const GLint border, const GLenum format, const GLenum type, const GLvoid* data)
212
218
{
213
- implementation ().image2D (this , level, internalFormat, width, height, border, format, type, data);
219
+ bindlessImplementation ().image2D (this , level, internalFormat, width, height, border, format, type, data);
214
220
}
215
221
216
222
void Texture::image2D (const GLint level, const GLenum internalFormat, const glm::ivec2 & size, const GLint border, const GLenum format, const GLenum type, const GLvoid* data)
@@ -220,7 +226,7 @@ void Texture::image2D(const GLint level, const GLenum internalFormat, const glm:
220
226
221
227
void Texture::compressedImage2D (const GLint level, const GLenum internalFormat, const GLsizei width, const GLsizei height, const GLint border, const GLsizei imageSize, const GLvoid * data)
222
228
{
223
- implementation ().compressedImage2D (this , level, internalFormat, width, height, border, imageSize, data);
229
+ bindlessImplementation ().compressedImage2D (this , level, internalFormat, width, height, border, imageSize, data);
224
230
}
225
231
226
232
void Texture::compressedImage2D (const GLint level, const GLenum internalFormat, const glm::ivec2 & size, const GLint border, const GLsizei imageSize, const GLvoid * data)
@@ -230,7 +236,7 @@ void Texture::compressedImage2D(const GLint level, const GLenum internalFormat,
230
236
231
237
void Texture::subImage2D (const GLint level, const GLint xOffset, const GLint yOffset, const GLsizei width, const GLsizei height, const GLenum format, const GLenum type, const GLvoid * data)
232
238
{
233
- implementation ().subImage2D (this , level, xOffset, yOffset, width, height, format, type, data);
239
+ bindlessImplementation ().subImage2D (this , level, xOffset, yOffset, width, height, format, type, data);
234
240
}
235
241
236
242
void Texture::subImage2D (const GLint level, const glm::ivec2& offset, const glm::ivec2& size, const GLenum format, const GLenum type, const GLvoid * data)
@@ -240,7 +246,7 @@ void Texture::subImage2D(const GLint level, const glm::ivec2& offset, const glm:
240
246
241
247
void Texture::image3D (const GLint level, const GLenum internalFormat, const GLsizei width, const GLsizei height, const GLsizei depth, const GLint border, const GLenum format, const GLenum type, const GLvoid* data)
242
248
{
243
- implementation ().image3D (this , level, internalFormat, width, height, depth, border, format, type, data);
249
+ bindlessImplementation ().image3D (this , level, internalFormat, width, height, depth, border, format, type, data);
244
250
}
245
251
246
252
void Texture::image3D (const GLint level, const GLenum internalFormat, const glm::ivec3 & size, const GLint border, const GLenum format, const GLenum type, const GLvoid* data)
@@ -250,7 +256,7 @@ void Texture::image3D(const GLint level, const GLenum internalFormat, const glm:
250
256
251
257
void Texture::compressedImage3D (const GLint level, const GLenum internalFormat, const GLsizei width, const GLsizei height, const GLsizei depth, const GLint border, const GLsizei imageSize, const GLvoid * data)
252
258
{
253
- implementation ().compressedImage3D (this , level, internalFormat, width, height, depth, border, imageSize, data);
259
+ bindlessImplementation ().compressedImage3D (this , level, internalFormat, width, height, depth, border, imageSize, data);
254
260
}
255
261
256
262
void Texture::compressedImage3D (GLint level, GLenum internalFormat, const glm::ivec3 & size, GLint border, GLsizei imageSize, const GLvoid * data)
@@ -260,7 +266,7 @@ void Texture::compressedImage3D(GLint level, GLenum internalFormat, const glm::i
260
266
261
267
void Texture::subImage3D (const GLint level, const GLint xOffset, const GLint yOffset, const GLint zOffset, const GLsizei width, const GLsizei height, const GLsizei depth, const GLenum format, const GLenum type, const GLvoid * data)
262
268
{
263
- implementation ().subImage3D (this , level, xOffset, yOffset, zOffset, width, height, depth, format, type, data);
269
+ bindlessImplementation ().subImage3D (this , level, xOffset, yOffset, zOffset, width, height, depth, format, type, data);
264
270
}
265
271
266
272
void Texture::subImage3D (const GLint level, const glm::ivec3& offset, const glm::ivec3& size, const GLenum format, const GLenum type, const GLvoid * data)
@@ -270,7 +276,7 @@ void Texture::subImage3D(const GLint level, const glm::ivec3& offset, const glm:
270
276
271
277
void Texture::image2DMultisample (const GLsizei samples, const GLenum internalFormat, const GLsizei width, const GLsizei height, const GLboolean fixedSamplesLocations)
272
278
{
273
- implementation ().image2DMultisample (this , samples, internalFormat, width, height, fixedSamplesLocations);
279
+ bindlessImplementation ().image2DMultisample (this , samples, internalFormat, width, height, fixedSamplesLocations);
274
280
}
275
281
276
282
void Texture::image2DMultisample (const GLsizei samples, const GLenum internalFormat, const glm::ivec2 & size, const GLboolean fixedSamplesLocations)
@@ -280,7 +286,7 @@ void Texture::image2DMultisample(const GLsizei samples, const GLenum internalFor
280
286
281
287
void Texture::image3DMultisample (const GLsizei samples, const GLenum internalFormat, const GLsizei width, const GLsizei height, const GLsizei depth, const GLboolean fixedSamplesLocations)
282
288
{
283
- implementation ().image3DMultisample (this , samples, internalFormat, width, height, depth, fixedSamplesLocations);
289
+ bindlessImplementation ().image3DMultisample (this , samples, internalFormat, width, height, depth, fixedSamplesLocations);
284
290
}
285
291
286
292
void Texture::image3DMultisample (const GLsizei samples, const GLenum internalFormat, const glm::ivec3 & size, const GLboolean fixedSamplesLocations)
@@ -290,12 +296,12 @@ void Texture::image3DMultisample(const GLsizei samples, const GLenum internalFor
290
296
291
297
void Texture::storage1D (const GLsizei levels, const GLenum internalFormat, const GLsizei width)
292
298
{
293
- implementation ().storage1D (this , levels, internalFormat, width);
299
+ storageImplementation ().storage1D (this , levels, internalFormat, width);
294
300
}
295
301
296
302
void Texture::storage2D (const GLsizei levels, const GLenum internalFormat, const GLsizei width, const GLsizei height)
297
303
{
298
- implementation ().storage2D (this , levels, internalFormat, width, height);
304
+ storageImplementation ().storage2D (this , levels, internalFormat, width, height);
299
305
}
300
306
301
307
void Texture::storage2D (const GLsizei levels, const GLenum internalFormat, const glm::ivec2 & size)
@@ -305,7 +311,7 @@ void Texture::storage2D(const GLsizei levels, const GLenum internalFormat, const
305
311
306
312
void Texture::storage3D (const GLsizei levels, const GLenum internalFormat, const GLsizei width, const GLsizei height, const GLsizei depth)
307
313
{
308
- implementation ().storage3D (this , levels, internalFormat, width, height, depth);
314
+ storageImplementation ().storage3D (this , levels, internalFormat, width, height, depth);
309
315
}
310
316
311
317
void Texture::storage3D (const GLsizei levels, const GLenum internalFormat, const glm::ivec3 & size)
@@ -320,12 +326,12 @@ void Texture::textureView(const GLuint originalTexture, const GLenum internalFor
320
326
321
327
void Texture::texBuffer (const GLenum internalFormat, Buffer * buffer)
322
328
{
323
- implementation ().texBuffer (this , internalFormat, buffer);
329
+ bindlessImplementation ().texBuffer (this , internalFormat, buffer);
324
330
}
325
331
326
332
void Texture::texBufferRange (const GLenum internalFormat, Buffer * buffer, const GLintptr offset, const GLsizeiptr size)
327
333
{
328
- implementation ().texBufferRange (this , internalFormat, buffer, offset, size);
334
+ bindlessImplementation ().texBufferRange (this , internalFormat, buffer, offset, size);
329
335
}
330
336
331
337
void Texture::clearImage (const GLint level, const GLenum format, const GLenum type, const void * data)
@@ -401,12 +407,12 @@ void Texture::unbindImageTexture(const GLuint unit)
401
407
402
408
void Texture::generateMipmap ()
403
409
{
404
- implementation ().generateMipMap (this );
410
+ bindlessImplementation ().generateMipMap (this );
405
411
}
406
412
407
413
void Texture::cubeMapImage (gl::GLint level, gl::GLenum internalFormat, gl::GLsizei width, gl::GLsizei height, gl::GLint border, gl::GLenum format, gl::GLenum type, const gl::GLvoid * data)
408
414
{
409
- implementation ().cubeMapImage (this , level, internalFormat, width, height, border, format, type, data);
415
+ bindlessImplementation ().cubeMapImage (this , level, internalFormat, width, height, border, format, type, data);
410
416
}
411
417
412
418
void Texture::cubeMapImage (gl::GLint level, gl::GLenum internalFormat, const glm::ivec2 & size, gl::GLint border, gl::GLenum format, gl::GLenum type, const gl::GLvoid * data)
@@ -431,7 +437,7 @@ TextureHandle Texture::textureHandle(Sampler * sampler) const
431
437
432
438
void Texture::pageCommitment (const GLint level, const GLint xOffset, const GLint yOffset, const GLint zOffset, const GLsizei width, const GLsizei height, const GLsizei depth, const GLboolean commit) const
433
439
{
434
- implementation ().pageCommitment (this , level, xOffset, yOffset, zOffset, width, height, depth, commit);
440
+ bindlessImplementation ().pageCommitment (this , level, xOffset, yOffset, zOffset, width, height, depth, commit);
435
441
}
436
442
437
443
void Texture::pageCommitment (const GLint level, const glm::ivec3& offset, const glm::ivec3& size, const GLboolean commit) const
0 commit comments