rasterizer_state_description.h
1 /*
2 ** UICore
3 ** Copyright (c) 1997-2015 The UICore 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 UICore 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 
33 namespace uicore
34 {
35  class RasterizerStateDescription_Impl;
36 
39  {
40  public:
43 
44  bool culled() const;
45  bool enable_line_antialiasing() const;
46  CullMode face_cull_mode() const;
47  FillMode face_fill_mode() const;
48  FaceSide front_face() const;
49  bool enable_scissor() const;
50 
51  bool antialiased() const;
52  bool offset_point() const;
53  bool offset_line() const;
54  bool offset_fill() const;
55  void polygon_offset(float &out_factor, float &out_units) const;
56  float point_size() const;
57  float point_fade_treshold_size() const;
58  bool is_point_size() const;
60 
62  void set_culled(bool value);
63 
65 
66  void enable_line_antialiasing(bool enabled);
67 
69  void set_face_cull_mode(CullMode value);
70 
72  void set_face_fill_mode(FillMode value);
73 
75  void set_front_face(FaceSide value);
76 
78  void enable_scissor(bool enabled);
79 
81  void enable_antialiased(bool value);
82 
84  void enable_offset_point(bool value);
85 
87  void enable_offset_line(bool value);
88 
90  void enable_offset_fill(bool value);
91 
93  void set_polygon_offset(float factor, float units);
94 
96  void set_point_size(float);
97 
99  void set_point_fade_treshold_size(float);
100 
102  void enable_point_size(bool enable);
103 
106 
107  bool operator==(const RasterizerStateDescription &other) const;
108  bool operator<(const RasterizerStateDescription &other) const;
109 
110  private:
111  std::shared_ptr<RasterizerStateDescription_Impl> impl;
112  };
113 }
void set_culled(bool value)
Enables/disables polygon cull clipping.
Rasterizer state description.
Definition: rasterizer_state_description.h:38
void enable_offset_fill(bool value)
Enables/disables polygon offsetting.
void set_point_size(float)
The default value is 1.0 (uicoreGL only)
FaceSide
Front face modes.
Definition: graphic_context.h:88
FillMode
Polygon filling modes.
Definition: graphic_context.h:80
void set_face_cull_mode(CullMode value)
Sets the polygon cull clipping mode.
void enable_antialiased(bool value)
Enables/disables anti-aliasing. (uicoreGL only)
void polygon_offset(float &out_factor, float &out_units) const
void enable_offset_point(bool value)
Enables/disables point offsetting.
bool operator<(const RasterizerStateDescription &other) const
RasterizerStateDescription clone() const
PointSpriteOrigin point_sprite_origin() const
bool operator==(const RasterizerStateDescription &other) const
void enable_offset_line(bool value)
Enables/disables line offsetting.
void set_point_fade_treshold_size(float)
Alpha fade point once minimum size treshold reached. Requires multisampling to be enabled...
void set_polygon_offset(float factor, float units)
Sets the offset factor.
void set_point_sprite_origin(PointSpriteOrigin origin)
Sets the origin of texture point sprites. (uicoreGL only)
CullMode
Polygon culling modes.
Definition: graphic_context.h:72
void set_front_face(FaceSide value)
Sets which side is the front side of a face.
PointSpriteOrigin
Point Sprite Origin.
Definition: graphic_context.h:216
void set_face_fill_mode(FillMode value)
Sets the filling mode for polygons.
Definition: Application/application.h:35
void enable_point_size(bool enable)
Enables if points sizes is set by the vertex shader. (uicoreGL only)