blob: 3dd3b1f426dd592bcba49f0bb8ecc72067af247a [file] [log] [blame]
Brandon Jonesc9610c52014-08-25 17:02:59 -07001//
2// Copyright (c) 2014 The ANGLE Project Authors. All rights reserved.
3// Use of this source code is governed by a BSD-style license that can be
4// found in the LICENSE file.
5//
6
7// ProgramD3D.h: Defines the rx::ProgramD3D class which implements rx::ProgramImpl.
8
9#ifndef LIBGLESV2_RENDERER_PROGRAMD3D_H_
10#define LIBGLESV2_RENDERER_PROGRAMD3D_H_
11
12#include "libGLESv2/renderer/ProgramImpl.h"
13
14namespace gl
15{
16struct LinkedUniform;
17struct VertexFormat;
18}
19
20namespace rx
21{
22
23class UniformStorage;
24
25class ProgramD3D : public ProgramImpl
26{
27 public:
28 ProgramD3D(rx::Renderer *renderer);
29 virtual ~ProgramD3D();
30
31 static ProgramD3D *makeProgramD3D(ProgramImpl *impl);
32 static const ProgramD3D *makeProgramD3D(const ProgramImpl *impl);
33
34 Renderer *getRenderer() { return mRenderer; }
35 DynamicHLSL *getDynamicHLSL() { return mDynamicHLSL; }
36
37 // D3D only
38 void initializeUniformStorage(const std::vector<gl::LinkedUniform*> &uniforms);
39
40 const UniformStorage &getVertexUniformStorage() const { return *mVertexUniformStorage; }
41 const UniformStorage &getFragmentUniformStorage() const { return *mFragmentUniformStorage; }
42
43 void reset();
44
45 private:
46 DISALLOW_COPY_AND_ASSIGN(ProgramD3D);
47
48 Renderer *mRenderer;
49 DynamicHLSL *mDynamicHLSL;
50
51 UniformStorage *mVertexUniformStorage;
52 UniformStorage *mFragmentUniformStorage;
53};
54
55}
56
57#endif // LIBGLESV2_RENDERER_PROGRAMD3D_H_