rasterizer_state_description.h
1/*
2** ClanLib SDK
3** Copyright (c) 1997-2020 The ClanLib Team
4**
5** This software is provided 'as-is', without any express or implied
6** warranty. In no event will the authors be held liable for any damages
7** arising from the use of this software.
8**
9** Permission is granted to anyone to use this software for any purpose,
10** including commercial applications, and to alter it and redistribute it
11** freely, subject to the following restrictions:
12**
13** 1. The origin of this software must not be misrepresented; you must not
14** claim that you wrote the original software. If you use this software
15** in a product, an acknowledgment in the product documentation would be
16** appreciated but is not required.
17** 2. Altered source versions must be plainly marked as such, and must not be
18** misrepresented as being the original software.
19** 3. This notice may not be removed or altered from any source distribution.
20**
21** Note: Some of the libraries ClanLib may link to may have additional
22** requirements or restrictions.
23**
24** File Author(s):
25**
26** Magnus Norddahl
27*/
28
29#pragma once
30
31#include "graphic_context.h"
32
33namespace clan
34{
37
38 class RasterizerStateDescription_Impl;
39
42 {
43 public:
46
47 bool get_culled() const;
52 bool get_enable_scissor() const;
53
54 bool get_antialiased() const;
55 bool get_offset_point() const;
56 bool get_offset_line() const;
57 bool get_offset_fill() const;
58 void get_polygon_offset(float &out_factor, float &out_units) const;
59 float get_point_size() const;
61 bool is_point_size() const;
63
65 void set_culled(bool value);
66
68
69 void enable_line_antialiasing(bool enabled);
70
73
76
79
81 void enable_scissor(bool enabled);
82
84 void enable_antialiased(bool value);
85
87 void enable_offset_point(bool value);
88
90 void enable_offset_line(bool value);
91
93 void enable_offset_fill(bool value);
94
96 void set_polygon_offset(float factor, float units);
97
99 void set_point_size(float);
100
103
105 void enable_point_size(bool enable);
106
109
110 bool operator==(const RasterizerStateDescription &other) const;
111 bool operator<(const RasterizerStateDescription &other) const;
112
113 private:
114 std::shared_ptr<RasterizerStateDescription_Impl> impl;
115 };
116
118}
Rasterizer state description.
Definition: rasterizer_state_description.h:42
void enable_offset_point(bool value)
Enables/disables point offsetting.
void set_front_face(FaceSide value)
Sets which side is the front side of a face.
void set_polygon_offset(float factor, float units)
Sets the offset factor.
void set_face_cull_mode(CullMode value)
Sets the polygon cull clipping mode.
FillMode get_face_fill_mode() const
void set_point_size(float)
The default value is 1.0 (clanGL only)
void set_point_fade_treshold_size(float)
Alpha fade point once minimum size treshold reached. Requires multisampling to be enabled....
CullMode get_face_cull_mode() const
PointSpriteOrigin get_point_sprite_origin() const
float get_point_fade_treshold_size() const
void enable_antialiased(bool value)
Enables/disables anti-aliasing. (clanGL only)
void enable_offset_fill(bool value)
Enables/disables polygon offsetting.
void enable_offset_line(bool value)
Enables/disables line offsetting.
void get_polygon_offset(float &out_factor, float &out_units) const
bool operator==(const RasterizerStateDescription &other) const
void set_face_fill_mode(FillMode value)
Sets the filling mode for polygons.
void set_culled(bool value)
Enables/disables polygon cull clipping.
void enable_point_size(bool enable)
Enables if points sizes is set by the vertex shader. (clanGL only)
void enable_line_antialiasing(bool enabled)
Setting to true enables line antialiasing.
void set_point_sprite_origin(PointSpriteOrigin origin)
Sets the origin of texture point sprites. (clanGL only)
bool operator<(const RasterizerStateDescription &other) const
void enable_scissor(bool enabled)
Enables/disables if clipping rects are used.
RasterizerStateDescription clone() const
FaceSide
Front face modes.
Definition: graphic_context.h:85
FillMode
Polygon filling modes.
Definition: graphic_context.h:77
PointSpriteOrigin
Point Sprite Origin.
Definition: graphic_context.h:213
CullMode
Polygon culling modes.
Definition: graphic_context.h:69
Definition: clanapp.h:36