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_Direct3DVertexDeclaration8_hpp
16#define D3D8_Direct3DVertexDeclaration8_hpp
17
18#include "Unknown.hpp"
19
20#include <d3d8.h>
21
22namespace D3D8
23{
24	class Direct3DDevice8;
25
26	class Direct3DVertexDeclaration8 : protected Unknown
27	{
28	public:
29		Direct3DVertexDeclaration8(Direct3DDevice8 *device, const unsigned long *vertexElements);
30
31		~Direct3DVertexDeclaration8() override;
32
33		// IUnknown methods
34		long __stdcall QueryInterface(const IID &iid, void **object) override;
35		unsigned long __stdcall AddRef() override;
36		unsigned long __stdcall Release() override;
37
38		// Internal methods
39		const unsigned long *getDeclaration() const;
40
41	private:
42		// Creation parameters
43		Direct3DDevice8 *const device;
44		unsigned long *declaration;
45	};
46}
47
48#endif   // D3D8_Direct3DVertexDeclaration8_hpp