00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00031
00032 #pragma once
00033
00034 #include "../api_display.h"
00035 #include "../../Core/System/sharedptr.h"
00036 #include "../Image/pixel_buffer.h"
00037
00038 class CL_PolygonRasterizer_Impl;
00039
00043 enum CL_CullMode
00044 {
00045 cl_cull_front,
00046 cl_cull_back,
00047 cl_cull_front_and_back
00048 };
00049
00053 enum CL_FillMode
00054 {
00055 cl_fill_point,
00056 cl_fill_line,
00057 cl_fill_polygon
00058 };
00059
00063 enum CL_FaceSide
00064 {
00065 cl_face_side_clockwise,
00066 cl_face_side_counter_clockwise
00067 };
00068
00072 class CL_API_DISPLAY CL_PolygonRasterizer
00073 {
00076
00077 public:
00079 CL_PolygonRasterizer();
00080
00081 virtual ~CL_PolygonRasterizer();
00082
00086
00087 public:
00089 bool is_antialiased() const;
00090
00092 bool is_culled() const;
00093
00095 bool is_point_offset() const;
00096
00098 bool is_line_offset() const;
00099
00101 bool is_polygon_offset() const;
00102
00104 CL_CullMode get_face_cull_mode() const;
00105
00107 CL_FillMode get_face_fill_mode_front() const;
00108
00110 CL_FillMode get_face_fill_mode_back() const;
00111
00113 float get_offset_factor() const;
00114
00116 float get_offset_units() const;
00117
00119 CL_FaceSide get_front_face() const;
00120
00124
00125 public:
00127 void set_antialiased(bool value);
00128
00130 void set_culled(bool value);
00131
00133 void set_point_offset(bool value);
00134
00136 void set_line_offset(bool value);
00137
00139 void set_polygon_offset(bool value);
00140
00142 void set_face_cull_mode(CL_CullMode value);
00143
00145 void set_face_fill_mode_front(CL_FillMode value);
00146
00148 void set_face_fill_mode_back(CL_FillMode value);
00149
00151 void set_front_face(CL_FaceSide value);
00152
00154 void set_offset_factor(float value);
00155
00157 void set_offset_units(float value);
00158
00162
00163 private:
00164 CL_SharedPtr<CL_PolygonRasterizer_Impl> impl;
00166 };
00167