Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
shd7bumpdiff.h
Go to the documentation of this file.
1/*
2** Command & Conquer Generals Zero Hour(tm)
3** Copyright 2025 Electronic Arts Inc.
4**
5** This program is free software: you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation, either version 3 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19 /***********************************************************************************************
20 *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
21 ***********************************************************************************************
22 * *
23 * Project Name : WW3D *
24 * *
25 * $Archive:: /Commando/Code/ww3d2/shd7bumpdiff.h $*
26 * *
27 * $Author:: Kenny_m
28 *
29 * $Modtime:: 6/03/02 8:12a $*
30 * *
31 * $Revision:: 1 $*
32 * *
33 *---------------------------------------------------------------------------------------------*
34 * Functions: *
35 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
36
37#ifndef SHD7BUMPDIFF_H
38#define SHD7BUMPDIFF_H
39
40#ifndef SHDINTERFACE_H
41#include "shdinterface.h"
42#endif
43
44#ifndef SHDHWSHADER_H
45#include "shdhwshader.h"
46#endif
47
48
50{
51public:
53 virtual ~Shd7BumpDiffClass();
54
55 static void Init();
56 static void Shutdown();
57
58 virtual int Get_Pass_Count() { return 2; }
59
60 virtual int Get_Texture_Count() const { return 2; }
61 virtual TextureClass* Peek_Texture(int idx) const { return idx==0 ? Texture : NormalMap; }
62
63 virtual void Apply_Shared(int cur_pass, RenderInfoClass& rinfo);
64 virtual void Apply_Instance(int cur_pass, RenderInfoClass& rinfo);
65
66 virtual unsigned Get_Vertex_Stream_Count() const;
67 virtual unsigned Get_Vertex_Size(unsigned stream) const;
68 virtual bool Use_HW_Vertex_Processing() const { return Pass_0_Vertex_Shader.Is_Using_Hardware(); }
69 virtual void Copy_Vertex_Stream
70 (
71 unsigned stream,
72 void* dest_buffer,
73 const VertexStreamStruct& vss,
74 unsigned vertex_count
75 );
76
77protected:
78
81
83
86
90};
91
92#endif // SHD7BUMPDIFF_H
virtual bool Use_HW_Vertex_Processing() const
static void Init()
TextureClass * NormalMap
virtual unsigned Get_Vertex_Size(unsigned stream) const
static ShdHWVertexShader Pass_0_Vertex_Shader
static Matrix4x4 View_Projection_Matrix
Shd7BumpDiffClass(const ShdDefClass *def)
TextureClass * Texture
static ShdHWVertexShader Pass_1_Vertex_Shader
virtual int Get_Pass_Count()
virtual ~Shd7BumpDiffClass()
virtual void Copy_Vertex_Stream(unsigned stream, void *dest_buffer, const VertexStreamStruct &vss, unsigned vertex_count)
virtual void Apply_Shared(int cur_pass, RenderInfoClass &rinfo)
Apply shared states for 2 pass DX7 bump diffuse.
virtual int Get_Texture_Count() const
static void Shutdown()
virtual TextureClass * Peek_Texture(int idx) const
virtual unsigned Get_Vertex_Stream_Count() const
virtual void Apply_Instance(int cur_pass, RenderInfoClass &rinfo)
Apply per instance states for 2 pass DX7 bump diffuse.
ShdInterfaceClass(const ShdDefClass *def, int class_id)
Constructor.