Brandon Jones | c9610c5 | 2014-08-25 17:02:59 -0700 | [diff] [blame^] | 1 | // |
| 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 | |
| 14 | namespace gl |
| 15 | { |
| 16 | struct LinkedUniform; |
| 17 | struct VertexFormat; |
| 18 | } |
| 19 | |
| 20 | namespace rx |
| 21 | { |
| 22 | |
| 23 | class UniformStorage; |
| 24 | |
| 25 | class 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_ |