Oxygine  1
2g game engine
RenderState.h
1 #pragma once
2 #include "oxygine-include.h"
3 #include "core/Renderer.h"
4 
5 namespace oxygine
6 {
7  class RState
8  {
9  public:
10  RState(): alpha(255), clip(0)
11  {
12  transform.identity();
13  }
14 
15  Color getFinalColor(const Color& clr) const
16  {
17  Color color = clr;
18  color = clr.withAlpha((int(color.a) * alpha) / 255);
19  return color;
20  }
21 
22  Transform transform;
23  unsigned char alpha;
24  const RectF* clip;
25  };
26 
27  class RenderState: public RState
28  {
29  public:
30  RenderState(): material(0) {}
31  Material* material;
32  };
33 }
Definition: Material.h:6
Definition: RenderState.h:27
–oxgl-end–!
Definition: Actor.h:14
Definition: RenderState.h:7
Definition: Color.h:8