• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // 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 
23 namespace 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 
32 		~Direct3DVertexShader8() override;
33 
34 		// IUnknown methods
35 		long __stdcall QueryInterface(const IID &iid, void **object) override;
36 		unsigned long __stdcall AddRef() override;
37 		unsigned long __stdcall Release() override;
38 
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