Hash :
8e34494f
Author :
Date :
2015-07-09T14:22:07
Share data between VertexArray and Impl. Using the same design as for the Framebuffer::Data helper, we can use a struct to share between the object and the Impl. This also gives the Impl access to the maxEnabledAttrib, and saves some duplicated storage. BUG=angleproject:1040 TEST=WebGL CTS, end2end_tests, unittests Change-Id: I55c91e8a5f3dcae302cab441182320aafd5375ef Reviewed-on: https://chromium-review.googlesource.com/283930 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
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 61 62 63 64 65 66 67 68 69
//
// Copyright 2015 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.
//
// ImplFactory.h:
// Factory interface for Impl objects.
//
#ifndef LIBANGLE_RENDERER_IMPLFACTORY_H_
#define LIBANGLE_RENDERER_IMPLFACTORY_H_
#include "libANGLE/Framebuffer.h"
#include "libANGLE/VertexArray.h"
namespace rx
{
class BufferImpl;
class CompilerImpl;
class FenceNVImpl;
class FenceSyncImpl;
class FramebufferImpl;
class ProgramImpl;
class QueryImpl;
class RenderbufferImpl;
class ShaderImpl;
class TextureImpl;
class TransformFeedbackImpl;
class VertexArrayImpl;
class ImplFactory : angle::NonCopyable
{
public:
ImplFactory() {}
virtual ~ImplFactory() {}
// Shader creation
virtual CompilerImpl *createCompiler(const gl::Data &data) = 0;
virtual ShaderImpl *createShader(GLenum type) = 0;
virtual ProgramImpl *createProgram() = 0;
// Framebuffer creation
virtual FramebufferImpl *createDefaultFramebuffer(const gl::Framebuffer::Data &data) = 0;
virtual FramebufferImpl *createFramebuffer(const gl::Framebuffer::Data &data) = 0;
// Texture creation
virtual TextureImpl *createTexture(GLenum target) = 0;
// Renderbuffer creation
virtual RenderbufferImpl *createRenderbuffer() = 0;
// Buffer creation
virtual BufferImpl *createBuffer() = 0;
// Vertex Array creation
virtual VertexArrayImpl *createVertexArray(const gl::VertexArray::Data &data) = 0;
// Query and Fence creation
virtual QueryImpl *createQuery(GLenum type) = 0;
virtual FenceNVImpl *createFenceNV() = 0;
virtual FenceSyncImpl *createFenceSync() = 0;
// Transform Feedback creation
virtual TransformFeedbackImpl *createTransformFeedback() = 0;
};
}
#endif // LIBANGLE_RENDERER_IMPLFACTORY_H_