ULRE/inc/hgl/graph/RenderState.h

56 lines
1.5 KiB
C
Raw Normal View History

2019-03-10 22:44:24 +08:00
#ifndef HGL_RENDER_STATE_INCLUDE
#define HGL_RENDER_STATE_INCLUDE
2018-11-30 17:46:58 +08:00
#include<hgl/type/Color4f.h>
#include<hgl/CompOperator.h>
namespace hgl
{
enum DEPTH_TEST_FUNC
{
DEPTH_TEST_NEVER=0,
DEPTH_TEST_LESS,
DEPTH_TEST_EQUAL,
DEPTH_TEST_LEQUAL,
DEPTH_TEST_GREATER,
DEPTH_TEST_NOTEQUAL,
DEPTH_TEST_GEQUAL,
DEPTH_TEST_ALWAYS
};//
struct DepthStatus
{
float near_depth =0,
far_depth =1;
bool depth_mask =true;
float clear_depth =far_depth;
DEPTH_TEST_FUNC depth_func =DEPTH_TEST_LESS;
bool depth_test;
public:
CompOperatorMemcmp(struct DepthStatus &);
};//
/**
*
*/
2019-03-10 22:44:24 +08:00
struct RenderState
2018-11-30 17:46:58 +08:00
{
bool color_mask[4];
Color4f clear_color;
DepthStatus depth;
2019-01-10 13:48:41 +08:00
// uint draw_face; ///<绘制的面
// uint fill_mode; ///<填充方式
//
// uint cull_face; ///<裁剪面,0:不裁(双面材质),FACE_FRONT:正面,FACE_BACK:背面
//
// bool depth_test; ///<深度测试
// uint depth_func; ///<深度处理方式
// bool depth_mask; ///<深度遮罩
2019-03-10 22:44:24 +08:00
};//class RenderState
2018-11-30 17:46:58 +08:00
}//namespace hgl
2019-03-10 22:44:24 +08:00
#endif//HGL_RENDER_STATE_INCLUDE