daniel@transgaming.com | f8b58a0 | 2010-03-26 04:08:45 +0000 | [diff] [blame] | 1 | // |
Nicolas Capens | 8d62bcc | 2014-07-25 15:08:21 -0400 | [diff] [blame] | 2 | // Copyright (c) 2002-2014 The ANGLE Project Authors. All rights reserved. |
daniel@transgaming.com | f8b58a0 | 2010-03-26 04:08:45 +0000 | [diff] [blame] | 3 | // Use of this source code is governed by a BSD-style license that can be |
| 4 | // found in the LICENSE file. |
| 5 | // |
| 6 | |
daniel@transgaming.com | 8fd34bd | 2011-02-18 02:52:14 +0000 | [diff] [blame] | 7 | // IndexDataManager.cpp: Defines the IndexDataManager, a class that |
daniel@transgaming.com | f8b58a0 | 2010-03-26 04:08:45 +0000 | [diff] [blame] | 8 | // runs the Buffer translation process for index buffers. |
| 9 | |
Geoff Lang | 2b5420c | 2014-11-19 14:20:15 -0500 | [diff] [blame] | 10 | #include "libANGLE/renderer/d3d/IndexDataManager.h" |
Corentin Wallez | 2e62a9a | 2015-07-03 14:13:50 -0700 | [diff] [blame] | 11 | |
Geoff Lang | 2b5420c | 2014-11-19 14:20:15 -0500 | [diff] [blame] | 12 | #include "libANGLE/renderer/d3d/BufferD3D.h" |
| 13 | #include "libANGLE/renderer/d3d/IndexBuffer.h" |
Geoff Lang | 2b5420c | 2014-11-19 14:20:15 -0500 | [diff] [blame] | 14 | #include "libANGLE/Buffer.h" |
| 15 | #include "libANGLE/formatutils.h" |
daniel@transgaming.com | f8b58a0 | 2010-03-26 04:08:45 +0000 | [diff] [blame] | 16 | |
daniel@transgaming.com | 3124048 | 2012-11-28 21:06:41 +0000 | [diff] [blame] | 17 | namespace rx |
daniel@transgaming.com | f8b58a0 | 2010-03-26 04:08:45 +0000 | [diff] [blame] | 18 | { |
| 19 | |
Corentin Wallez | 2e62a9a | 2015-07-03 14:13:50 -0700 | [diff] [blame] | 20 | static void ConvertIndices(GLenum sourceType, GLenum destinationType, const void *input, |
| 21 | GLsizei count, void *output) |
daniel@transgaming.com | f8b58a0 | 2010-03-26 04:08:45 +0000 | [diff] [blame] | 22 | { |
Nicolas Capens | 8d62bcc | 2014-07-25 15:08:21 -0400 | [diff] [blame] | 23 | if (sourceType == GL_UNSIGNED_BYTE) |
daniel@transgaming.com | 8392138 | 2011-01-08 05:46:00 +0000 | [diff] [blame] | 24 | { |
Nicolas Capens | 8d62bcc | 2014-07-25 15:08:21 -0400 | [diff] [blame] | 25 | ASSERT(destinationType == GL_UNSIGNED_SHORT); |
daniel@transgaming.com | 8392138 | 2011-01-08 05:46:00 +0000 | [diff] [blame] | 26 | const GLubyte *in = static_cast<const GLubyte*>(input); |
| 27 | GLushort *out = static_cast<GLushort*>(output); |
daniel@transgaming.com | f8b58a0 | 2010-03-26 04:08:45 +0000 | [diff] [blame] | 28 | |
daniel@transgaming.com | 8392138 | 2011-01-08 05:46:00 +0000 | [diff] [blame] | 29 | for (GLsizei i = 0; i < count; i++) |
| 30 | { |
| 31 | out[i] = in[i]; |
| 32 | } |
| 33 | } |
Nicolas Capens | 8d62bcc | 2014-07-25 15:08:21 -0400 | [diff] [blame] | 34 | else if (sourceType == GL_UNSIGNED_INT) |
daniel@transgaming.com | 8392138 | 2011-01-08 05:46:00 +0000 | [diff] [blame] | 35 | { |
Nicolas Capens | 8d62bcc | 2014-07-25 15:08:21 -0400 | [diff] [blame] | 36 | ASSERT(destinationType == GL_UNSIGNED_INT); |
daniel@transgaming.com | 8392138 | 2011-01-08 05:46:00 +0000 | [diff] [blame] | 37 | memcpy(output, input, count * sizeof(GLuint)); |
| 38 | } |
Nicolas Capens | 8d62bcc | 2014-07-25 15:08:21 -0400 | [diff] [blame] | 39 | else if (sourceType == GL_UNSIGNED_SHORT) |
daniel@transgaming.com | 8392138 | 2011-01-08 05:46:00 +0000 | [diff] [blame] | 40 | { |
Nicolas Capens | 8d62bcc | 2014-07-25 15:08:21 -0400 | [diff] [blame] | 41 | if (destinationType == GL_UNSIGNED_SHORT) |
| 42 | { |
| 43 | memcpy(output, input, count * sizeof(GLushort)); |
| 44 | } |
| 45 | else if (destinationType == GL_UNSIGNED_INT) |
| 46 | { |
| 47 | const GLushort *in = static_cast<const GLushort*>(input); |
| 48 | GLuint *out = static_cast<GLuint*>(output); |
| 49 | |
| 50 | for (GLsizei i = 0; i < count; i++) |
| 51 | { |
| 52 | out[i] = in[i]; |
| 53 | } |
| 54 | } |
| 55 | else UNREACHABLE(); |
daniel@transgaming.com | 8392138 | 2011-01-08 05:46:00 +0000 | [diff] [blame] | 56 | } |
| 57 | else UNREACHABLE(); |
| 58 | } |
| 59 | |
Corentin Wallez | 2e62a9a | 2015-07-03 14:13:50 -0700 | [diff] [blame] | 60 | static gl::Error StreamInIndexBuffer(IndexBufferInterface *buffer, const GLvoid *data, |
| 61 | unsigned int count, GLenum srcType, GLenum dstType, |
| 62 | unsigned int *offset) |
| 63 | { |
| 64 | const gl::Type &dstTypeInfo = gl::GetTypeInfo(dstType); |
| 65 | |
| 66 | if (count > (std::numeric_limits<unsigned int>::max() >> dstTypeInfo.bytesShift)) |
| 67 | { |
| 68 | return gl::Error(GL_OUT_OF_MEMORY, |
| 69 | "Reserving %u indices of %u bytes each exceeds the maximum buffer size.", |
| 70 | count, dstTypeInfo.bytes); |
| 71 | } |
| 72 | |
| 73 | unsigned int bufferSizeRequired = count << dstTypeInfo.bytesShift; |
| 74 | gl::Error error = buffer->reserveBufferSpace(bufferSizeRequired, dstType); |
| 75 | if (error.isError()) |
| 76 | { |
| 77 | return error; |
| 78 | } |
| 79 | |
| 80 | void *output = nullptr; |
| 81 | error = buffer->mapBuffer(bufferSizeRequired, &output, offset); |
| 82 | if (error.isError()) |
| 83 | { |
| 84 | return error; |
| 85 | } |
| 86 | |
| 87 | ConvertIndices(srcType, dstType, data, count, output); |
| 88 | |
| 89 | error = buffer->unmapBuffer(); |
| 90 | if (error.isError()) |
| 91 | { |
| 92 | return error; |
| 93 | } |
| 94 | |
| 95 | return gl::Error(GL_NO_ERROR); |
| 96 | } |
| 97 | |
Jamie Madill | fd1bf4e | 2015-03-31 09:46:02 -0400 | [diff] [blame] | 98 | IndexDataManager::IndexDataManager(BufferFactoryD3D *factory, RendererClass rendererClass) |
| 99 | : mFactory(factory), |
| 100 | mRendererClass(rendererClass), |
| 101 | mStreamingBufferShort(nullptr), |
| 102 | mStreamingBufferInt(nullptr) |
daniel@transgaming.com | f8b58a0 | 2010-03-26 04:08:45 +0000 | [diff] [blame] | 103 | { |
daniel@transgaming.com | f8b58a0 | 2010-03-26 04:08:45 +0000 | [diff] [blame] | 104 | } |
| 105 | |
Jamie Madill | 2b97681 | 2014-08-25 15:47:49 -0400 | [diff] [blame] | 106 | IndexDataManager::~IndexDataManager() |
daniel@transgaming.com | f8b58a0 | 2010-03-26 04:08:45 +0000 | [diff] [blame] | 107 | { |
Jamie Madill | 2b97681 | 2014-08-25 15:47:49 -0400 | [diff] [blame] | 108 | SafeDelete(mStreamingBufferShort); |
| 109 | SafeDelete(mStreamingBufferInt); |
daniel@transgaming.com | 8392138 | 2011-01-08 05:46:00 +0000 | [diff] [blame] | 110 | } |
daniel@transgaming.com | f8b58a0 | 2010-03-26 04:08:45 +0000 | [diff] [blame] | 111 | |
Corentin Wallez | 2e62a9a | 2015-07-03 14:13:50 -0700 | [diff] [blame] | 112 | // This function translates a GL-style indices into DX-style indices, with their description |
| 113 | // returned in translated. |
| 114 | // GL can specify vertex data in immediate mode (pointer to CPU array of indices), which is not |
| 115 | // possible in DX and requires streaming (Case 1). If the GL indices are specified with a buffer |
| 116 | // (Case 2), in a format supported by DX (subcase a) then all is good. |
| 117 | // When we have a buffer with an unsupported format (subcase b) then we need to do some translation: |
| 118 | // we will start by falling back to streaming, and after a while will start using a static translated |
| 119 | // copy of the index buffer. |
| 120 | gl::Error IndexDataManager::prepareIndexData(GLenum srcType, GLsizei count, gl::Buffer *glBuffer, |
| 121 | const GLvoid *indices, TranslatedIndexData *translated, |
| 122 | SourceIndexData *sourceData) |
daniel@transgaming.com | 8392138 | 2011-01-08 05:46:00 +0000 | [diff] [blame] | 123 | { |
Jamie Madill | b48e8b0 | 2015-04-15 14:26:37 -0400 | [diff] [blame] | 124 | // Avoid D3D11's primitive restart index value |
| 125 | // see http://msdn.microsoft.com/en-us/library/windows/desktop/bb205124(v=vs.85).aspx |
| 126 | bool primitiveRestartWorkaround = mRendererClass == RENDERER_D3D11 && |
Corentin Wallez | 2e62a9a | 2015-07-03 14:13:50 -0700 | [diff] [blame] | 127 | translated->indexRange.end == 0xFFFF && |
| 128 | srcType == GL_UNSIGNED_SHORT; |
Jamie Madill | b48e8b0 | 2015-04-15 14:26:37 -0400 | [diff] [blame] | 129 | |
Corentin Wallez | 2e62a9a | 2015-07-03 14:13:50 -0700 | [diff] [blame] | 130 | const GLenum dstType = (srcType == GL_UNSIGNED_INT || primitiveRestartWorkaround) ? |
| 131 | GL_UNSIGNED_INT : GL_UNSIGNED_SHORT; |
| 132 | |
| 133 | const gl::Type &srcTypeInfo = gl::GetTypeInfo(srcType); |
| 134 | const gl::Type &dstTypeInfo = gl::GetTypeInfo(dstType); |
| 135 | |
Corentin Wallez | bc3b5e6 | 2015-07-07 10:08:05 -0700 | [diff] [blame] | 136 | BufferD3D *buffer = glBuffer ? GetImplAs<BufferD3D>(glBuffer) : nullptr; |
| 137 | |
Corentin Wallez | 2e62a9a | 2015-07-03 14:13:50 -0700 | [diff] [blame] | 138 | translated->indexType = dstType; |
| 139 | if (sourceData) |
Jamie Madill | b48e8b0 | 2015-04-15 14:26:37 -0400 | [diff] [blame] | 140 | { |
Corentin Wallez | bc3b5e6 | 2015-07-07 10:08:05 -0700 | [diff] [blame] | 141 | sourceData->srcBuffer = buffer; |
| 142 | sourceData->srcIndices = indices; |
Corentin Wallez | 2e62a9a | 2015-07-03 14:13:50 -0700 | [diff] [blame] | 143 | sourceData->srcIndexType = srcType; |
| 144 | sourceData->srcCount = count; |
Jamie Madill | b48e8b0 | 2015-04-15 14:26:37 -0400 | [diff] [blame] | 145 | } |
| 146 | |
Corentin Wallez | 2e62a9a | 2015-07-03 14:13:50 -0700 | [diff] [blame] | 147 | // Case 1: the indices are passed by pointer, which forces the streaming of index data |
| 148 | if (glBuffer == nullptr) |
shannon.woods@transgaming.com | a1229a3 | 2013-02-28 23:08:40 +0000 | [diff] [blame] | 149 | { |
Corentin Wallez | 2e62a9a | 2015-07-03 14:13:50 -0700 | [diff] [blame] | 150 | translated->storage = nullptr; |
Corentin Wallez | 2e62a9a | 2015-07-03 14:13:50 -0700 | [diff] [blame] | 151 | return streamIndexData(indices, count, srcType, dstType, translated); |
daniel@transgaming.com | 3e4c600 | 2010-05-05 18:50:13 +0000 | [diff] [blame] | 152 | } |
Nicolas Capens | 8d62bcc | 2014-07-25 15:08:21 -0400 | [diff] [blame] | 153 | |
Corentin Wallez | 2e62a9a | 2015-07-03 14:13:50 -0700 | [diff] [blame] | 154 | // Case 2: the indices are already in a buffer |
Corentin Wallez | 2e62a9a | 2015-07-03 14:13:50 -0700 | [diff] [blame] | 155 | unsigned int offset = static_cast<unsigned int>(reinterpret_cast<uintptr_t>(indices)); |
| 156 | ASSERT(srcTypeInfo.bytes * static_cast<unsigned int>(count) + offset <= buffer->getSize()); |
| 157 | |
| 158 | bool offsetAligned; |
| 159 | switch (srcType) |
Nicolas Capens | 8d62bcc | 2014-07-25 15:08:21 -0400 | [diff] [blame] | 160 | { |
Corentin Wallez | 2e62a9a | 2015-07-03 14:13:50 -0700 | [diff] [blame] | 161 | case GL_UNSIGNED_BYTE: offsetAligned = (offset % sizeof(GLubyte) == 0); break; |
| 162 | case GL_UNSIGNED_SHORT: offsetAligned = (offset % sizeof(GLushort) == 0); break; |
| 163 | case GL_UNSIGNED_INT: offsetAligned = (offset % sizeof(GLuint) == 0); break; |
| 164 | default: UNREACHABLE(); offsetAligned = false; |
| 165 | } |
| 166 | |
Corentin Wallez | 2e62a9a | 2015-07-03 14:13:50 -0700 | [diff] [blame] | 167 | // Case 2a: the buffer can be used directly |
| 168 | if (offsetAligned && buffer->supportsDirectBinding() && |
| 169 | dstType == srcType && !primitiveRestartWorkaround) |
| 170 | { |
| 171 | translated->storage = buffer; |
| 172 | translated->indexBuffer = nullptr; |
| 173 | translated->serial = buffer->getSerial(); |
| 174 | translated->startIndex = (offset >> srcTypeInfo.bytesShift); |
| 175 | translated->startOffset = offset; |
| 176 | buffer->promoteStaticUsage(count << srcTypeInfo.bytesShift); |
| 177 | return gl::Error(GL_NO_ERROR); |
| 178 | } |
| 179 | else |
| 180 | { |
| 181 | translated->storage = nullptr; |
| 182 | } |
| 183 | |
| 184 | // Case 2b: use a static translated copy or fall back to streaming |
| 185 | StaticIndexBufferInterface *staticBuffer = buffer->getStaticIndexBuffer(); |
| 186 | |
| 187 | bool staticBufferInitialized = staticBuffer && staticBuffer->getBufferSize() != 0; |
| 188 | bool staticBufferUsable = staticBuffer && |
| 189 | offsetAligned && staticBuffer->getIndexType() == dstType; |
| 190 | |
| 191 | if (staticBufferInitialized && !staticBufferUsable) |
| 192 | { |
| 193 | buffer->invalidateStaticData(); |
| 194 | staticBuffer = nullptr; |
| 195 | } |
| 196 | |
| 197 | if (staticBuffer == nullptr || !offsetAligned) |
| 198 | { |
Corentin Wallez | bc3b5e6 | 2015-07-07 10:08:05 -0700 | [diff] [blame] | 199 | const uint8_t *bufferData = nullptr; |
| 200 | gl::Error error = buffer->getData(&bufferData); |
| 201 | if (error.isError()) |
| 202 | { |
| 203 | return error; |
| 204 | } |
| 205 | ASSERT(bufferData != nullptr); |
| 206 | |
Corentin Wallez | 94d0e3e | 2015-07-22 14:22:05 -0700 | [diff] [blame] | 207 | error = streamIndexData(bufferData + offset, count, srcType, dstType, translated); |
Geoff Lang | c9e69b1 | 2014-09-08 16:06:25 -0400 | [diff] [blame] | 208 | if (error.isError()) |
Geoff Lang | 1c134e6 | 2014-09-08 15:32:18 -0400 | [diff] [blame] | 209 | { |
Geoff Lang | c9e69b1 | 2014-09-08 16:06:25 -0400 | [diff] [blame] | 210 | return error; |
Geoff Lang | 1c134e6 | 2014-09-08 15:32:18 -0400 | [diff] [blame] | 211 | } |
Corentin Wallez | 2e62a9a | 2015-07-03 14:13:50 -0700 | [diff] [blame] | 212 | } |
| 213 | else |
| 214 | { |
| 215 | if (!staticBufferInitialized) |
daniel@transgaming.com | 8392138 | 2011-01-08 05:46:00 +0000 | [diff] [blame] | 216 | { |
Corentin Wallez | bc3b5e6 | 2015-07-07 10:08:05 -0700 | [diff] [blame] | 217 | const uint8_t *bufferData = nullptr; |
| 218 | gl::Error error = buffer->getData(&bufferData); |
| 219 | if (error.isError()) |
| 220 | { |
| 221 | return error; |
| 222 | } |
| 223 | ASSERT(bufferData != nullptr); |
| 224 | |
Cooper Partin | c5cf9bc | 2015-08-06 10:46:48 -0700 | [diff] [blame^] | 225 | unsigned int convertCount = |
| 226 | static_cast<unsigned int>(buffer->getSize()) >> srcTypeInfo.bytesShift; |
Corentin Wallez | bc3b5e6 | 2015-07-07 10:08:05 -0700 | [diff] [blame] | 227 | error = StreamInIndexBuffer(staticBuffer, bufferData, convertCount, |
| 228 | srcType, dstType, nullptr); |
Geoff Lang | c8d297a | 2014-09-19 11:09:08 -0400 | [diff] [blame] | 229 | if (error.isError()) |
| 230 | { |
| 231 | return error; |
| 232 | } |
| 233 | } |
Corentin Wallez | 2e62a9a | 2015-07-03 14:13:50 -0700 | [diff] [blame] | 234 | ASSERT(offsetAligned && staticBuffer->getIndexType() == dstType); |
daniel@transgaming.com | 1e3a804 | 2012-12-20 21:09:55 +0000 | [diff] [blame] | 235 | |
Corentin Wallez | 2e62a9a | 2015-07-03 14:13:50 -0700 | [diff] [blame] | 236 | translated->indexBuffer = staticBuffer->getIndexBuffer(); |
| 237 | translated->serial = staticBuffer->getSerial(); |
| 238 | translated->startIndex = (offset >> srcTypeInfo.bytesShift); |
| 239 | translated->startOffset = (offset >> srcTypeInfo.bytesShift) << dstTypeInfo.bytesShift; |
daniel@transgaming.com | 78624ca | 2011-04-22 04:17:57 +0000 | [diff] [blame] | 240 | } |
| 241 | |
Geoff Lang | c9e69b1 | 2014-09-08 16:06:25 -0400 | [diff] [blame] | 242 | return gl::Error(GL_NO_ERROR); |
daniel@transgaming.com | f8b58a0 | 2010-03-26 04:08:45 +0000 | [diff] [blame] | 243 | } |
| 244 | |
Corentin Wallez | 2e62a9a | 2015-07-03 14:13:50 -0700 | [diff] [blame] | 245 | gl::Error IndexDataManager::streamIndexData(const GLvoid *data, unsigned int count, GLenum srcType, |
| 246 | GLenum dstType, TranslatedIndexData *translated) |
| 247 | { |
| 248 | const gl::Type &dstTypeInfo = gl::GetTypeInfo(dstType); |
| 249 | |
| 250 | IndexBufferInterface *indexBuffer = nullptr; |
| 251 | gl::Error error = getStreamingIndexBuffer(dstType, &indexBuffer); |
| 252 | if (error.isError()) |
| 253 | { |
| 254 | return error; |
| 255 | } |
| 256 | ASSERT(indexBuffer != nullptr); |
| 257 | |
| 258 | unsigned int offset; |
| 259 | StreamInIndexBuffer(indexBuffer, data, count, srcType, dstType, &offset); |
| 260 | |
| 261 | translated->indexBuffer = indexBuffer->getIndexBuffer(); |
| 262 | translated->serial = indexBuffer->getSerial(); |
| 263 | translated->startIndex = (offset >> dstTypeInfo.bytesShift); |
| 264 | translated->startOffset = offset; |
| 265 | |
| 266 | return gl::Error(GL_NO_ERROR); |
| 267 | } |
| 268 | |
| 269 | gl::Error IndexDataManager::getStreamingIndexBuffer(GLenum destinationIndexType, |
| 270 | IndexBufferInterface **outBuffer) |
Geoff Lang | 1c134e6 | 2014-09-08 15:32:18 -0400 | [diff] [blame] | 271 | { |
| 272 | ASSERT(outBuffer); |
| 273 | if (destinationIndexType == GL_UNSIGNED_INT) |
| 274 | { |
| 275 | if (!mStreamingBufferInt) |
| 276 | { |
Jamie Madill | fd1bf4e | 2015-03-31 09:46:02 -0400 | [diff] [blame] | 277 | mStreamingBufferInt = new StreamingIndexBufferInterface(mFactory); |
Corentin Wallez | 2e62a9a | 2015-07-03 14:13:50 -0700 | [diff] [blame] | 278 | gl::Error error = mStreamingBufferInt->reserveBufferSpace(INITIAL_INDEX_BUFFER_SIZE, |
| 279 | GL_UNSIGNED_INT); |
Geoff Lang | c9e69b1 | 2014-09-08 16:06:25 -0400 | [diff] [blame] | 280 | if (error.isError()) |
Geoff Lang | 1c134e6 | 2014-09-08 15:32:18 -0400 | [diff] [blame] | 281 | { |
| 282 | SafeDelete(mStreamingBufferInt); |
Geoff Lang | c9e69b1 | 2014-09-08 16:06:25 -0400 | [diff] [blame] | 283 | return error; |
Geoff Lang | 1c134e6 | 2014-09-08 15:32:18 -0400 | [diff] [blame] | 284 | } |
| 285 | } |
| 286 | |
| 287 | *outBuffer = mStreamingBufferInt; |
Geoff Lang | c9e69b1 | 2014-09-08 16:06:25 -0400 | [diff] [blame] | 288 | return gl::Error(GL_NO_ERROR); |
Geoff Lang | 1c134e6 | 2014-09-08 15:32:18 -0400 | [diff] [blame] | 289 | } |
| 290 | else |
| 291 | { |
| 292 | ASSERT(destinationIndexType == GL_UNSIGNED_SHORT); |
| 293 | |
| 294 | if (!mStreamingBufferShort) |
| 295 | { |
Jamie Madill | fd1bf4e | 2015-03-31 09:46:02 -0400 | [diff] [blame] | 296 | mStreamingBufferShort = new StreamingIndexBufferInterface(mFactory); |
Corentin Wallez | 2e62a9a | 2015-07-03 14:13:50 -0700 | [diff] [blame] | 297 | gl::Error error = mStreamingBufferShort->reserveBufferSpace(INITIAL_INDEX_BUFFER_SIZE, |
| 298 | GL_UNSIGNED_SHORT); |
Geoff Lang | c9e69b1 | 2014-09-08 16:06:25 -0400 | [diff] [blame] | 299 | if (error.isError()) |
Geoff Lang | 1c134e6 | 2014-09-08 15:32:18 -0400 | [diff] [blame] | 300 | { |
| 301 | SafeDelete(mStreamingBufferShort); |
Geoff Lang | c9e69b1 | 2014-09-08 16:06:25 -0400 | [diff] [blame] | 302 | return error; |
Geoff Lang | 1c134e6 | 2014-09-08 15:32:18 -0400 | [diff] [blame] | 303 | } |
| 304 | } |
| 305 | |
| 306 | *outBuffer = mStreamingBufferShort; |
Geoff Lang | c9e69b1 | 2014-09-08 16:06:25 -0400 | [diff] [blame] | 307 | return gl::Error(GL_NO_ERROR); |
Geoff Lang | 1c134e6 | 2014-09-08 15:32:18 -0400 | [diff] [blame] | 308 | } |
| 309 | } |
| 310 | |
daniel@transgaming.com | f8b58a0 | 2010-03-26 04:08:45 +0000 | [diff] [blame] | 311 | } |