blob: 388bca02beac21418062456edc5c7e1efc050108 [file] [log] [blame]
Nicolas Capens17b29fd2016-09-15 09:32:16 -04001// Copyright 2016 The SwiftShader Authors. All Rights Reserved.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#ifndef D3D8_Direct3DVertexShader8_hpp
16#define D3D8_Direct3DVertexShader8_hpp
17
18#include "VertexShader.hpp"
19#include "Direct3DVertexDeclaration8.hpp"
20
21#include "Unknown.hpp"
22
23namespace D3D8
24{
25 class Direct3DDevice8;
26
27 class Direct3DVertexShader8 : public Unknown
28 {
29 public:
30 Direct3DVertexShader8(Direct3DDevice8 *device, const unsigned long *declaration, const unsigned long *shaderToken);
31
Nicolas Capens3b9e1ea2017-06-12 12:43:48 -040032 ~Direct3DVertexShader8() override;
Nicolas Capens17b29fd2016-09-15 09:32:16 -040033
34 // IUnknown methods
Nicolas Capens3b9e1ea2017-06-12 12:43:48 -040035 long __stdcall QueryInterface(const IID &iid, void **object) override;
36 unsigned long __stdcall AddRef() override;
37 unsigned long __stdcall Release() override;
Nicolas Capens17b29fd2016-09-15 09:32:16 -040038
39 // Internal methods
40 const sw::VertexShader *getVertexShader() const;
41 const unsigned long *getDeclaration();
42
43 private:
44 // Creation parameters
45 Direct3DDevice8 *const device;
46 Direct3DVertexDeclaration8 *declaration;
47 unsigned long *shaderToken;
48 unsigned int size;
49
50 sw::VertexShader *vertexShader;
51 };
52}
53
54#endif // D3D8_Direct3DVertexShader8_hpp