port from perforce
This commit is contained in:
87
evoke-64k/ev10/shader.h
Normal file
87
evoke-64k/ev10/shader.h
Normal file
@@ -0,0 +1,87 @@
|
||||
#pragma once
|
||||
|
||||
/***********************************************************************************/
|
||||
/** \file Shader.h
|
||||
** \brief Header File zur Klasse Shader
|
||||
*************************************************************************************
|
||||
** Autor: Christian Roesch
|
||||
*************************************************************************************
|
||||
** _tut nichts_
|
||||
**
|
||||
*//*********************************************************************************/
|
||||
|
||||
#ifndef _Shader_H
|
||||
#define _Shader_H
|
||||
|
||||
// includes
|
||||
#include <d3dx9.h>
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#ifdef EXTRACODE
|
||||
#include <string>
|
||||
#endif
|
||||
|
||||
// Klassen-Deklaration
|
||||
extern IDirect3DDevice9 *g_d3d_device;
|
||||
|
||||
/***********************************************************************************/
|
||||
/** \brief Shader _tut nichts_
|
||||
*************************************************************************************
|
||||
** Genau genommen _tut dies nichts_
|
||||
**
|
||||
*//*********************************************************************************/
|
||||
|
||||
class Shader
|
||||
{
|
||||
public:
|
||||
void Init();
|
||||
|
||||
void DeInit();
|
||||
|
||||
void Release();
|
||||
|
||||
void CompileVS(const char* pShaderCode, const char* pEntryPoint );
|
||||
void CompilePS(const char* pShaderCode, const char* pEntryPoint );
|
||||
|
||||
void SetTextureStageSettings(
|
||||
int iTextureStage,
|
||||
int iTextureIndex= -1,
|
||||
int iTextureSettings= -1 );
|
||||
|
||||
void Activate();
|
||||
|
||||
static void Deactivate();
|
||||
|
||||
static void SetShaderConstants();
|
||||
static void SetShaderTransform(const D3DXMATRIX &mWorld, const D3DXMATRIX &mWorldInverse);
|
||||
private:
|
||||
void Compile(
|
||||
const char* pShaderCode,
|
||||
const char* pEntryPoint,
|
||||
const char* ShaderModel,
|
||||
ID3DXBuffer** tmp );
|
||||
|
||||
IDirect3DVertexShader9* m_pVSShader;
|
||||
IDirect3DPixelShader9* m_pPSShader;
|
||||
|
||||
static const int m_iMaxTextureStageCount= 2;
|
||||
int m_iUsedTextureStageCount;
|
||||
int m_iTextureIndices[ m_iMaxTextureStageCount ];
|
||||
int m_iTextureSettings[ m_iMaxTextureStageCount ];
|
||||
|
||||
#ifdef EXTRACODE
|
||||
std::string m_strPSCode;
|
||||
std::string m_strVSCode;
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
#endif//_Shader_H
|
||||
|
||||
class Shader;
|
||||
|
||||
|
||||
/************************************************************************************
|
||||
** Ende der Datei: Shader.h
|
||||
************************************************************************************/
|
||||
Reference in New Issue
Block a user