Hash :
f8b58a0c
Author :
Date :
2010-03-26T04:08:45
Support translating indices. TRAC #11393 Signed-off-by: Nicolas Capens Signed-off-by: Daniel Koch Author: Andrew Lewycky git-svn-id: https://angleproject.googlecode.com/svn/trunk@72 736b8ea6-26fd-11df-bfd4-992fa37f6226
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
//
// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// geometry/IndexDataManager.h: Defines the IndexDataManager, a class that
// runs the Buffer translation process for index buffers.
#ifndef LIBGLESV2_GEOMETRY_INDEXDATAMANAGER_H_
#define LIBGLESV2_GEOMETRY_INDEXDATAMANAGER_H_
#include <bitset>
#include <cstddef>
#define GL_APICALL
#include <GLES2/gl2.h>
#include "Context.h"
namespace gl
{
class Buffer;
class BufferBackEnd;
class TranslatedIndexBuffer;
struct FormatConverter;
struct TranslatedIndexData
{
GLuint minIndex;
GLuint maxIndex;
GLuint count;
const Index *indices;
TranslatedIndexBuffer *buffer;
GLsizei offset;
};
class IndexDataManager
{
public:
IndexDataManager(Context *context, BufferBackEnd *backend);
~IndexDataManager();
TranslatedIndexData preRenderValidate(GLenum mode, GLenum type, GLsizei count, Buffer *arrayElementBuffer, const void *indices);
private:
std::size_t spaceRequired(GLenum mode, GLenum type, GLsizei count);
Context *mContext;
BufferBackEnd *mBackend;
TranslatedIndexBuffer *mStreamBuffer;
};
}
#endif // LIBGLESV2_GEOMETRY_INDEXDATAMANAGER_H_