Welcome to mirror list, hosted at ThFree Co, Russian Federation.

BL_BlenderShader.h « Ketsji « gameengine « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fd52af244070dbba93537173a95a15523c283b27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

#ifndef __BL_GPUSHADER_H__
#define __BL_GPUSHADER_H__

#include "GPU_material.h"

#include "MT_Matrix4x4.h"
#include "MT_Matrix3x3.h"
#include "MT_Tuple2.h"
#include "MT_Tuple3.h"
#include "MT_Tuple4.h"

#include "RAS_IPolygonMaterial.h"

struct Material;
class BL_Material;

#define BL_MAX_ATTRIB	16

/**
 * BL_BlenderShader
 *  Blender GPU shader material
 */
class BL_BlenderShader
{
private:
	GPUMaterial		*mGPUMat;
	bool			mBound;
	int				mLightLayer;

public:
	BL_BlenderShader(struct Material *ma, int lightlayer);
	virtual ~BL_BlenderShader();

	const bool			Ok()const;
	void				SetProg(bool enable);

	int GetAttribNum();
	void SetAttribs(class RAS_IRasterizer* ras, const BL_Material *mat);
	void Update(const class KX_MeshSlot & ms, class RAS_IRasterizer* rasty);

	bool Equals(BL_BlenderShader *blshader);
};

#endif//__BL_GPUSHADER_H__