aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_line.h
blob: 0e5d8078dcaa1539291dc2ffb8f094d519d74093 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef __EVAS_DIRECT3D_OBJECT_LINE_H__
#define __EVAS_DIRECT3D_OBJECT_LINE_H__

#include "evas_engine.h"

#include "ref.h"
#include "array.h"

#include "evas_direct3d_object.h"

class D3DObjectLine : public D3DObject
{
public:
   D3DObjectLine();

   static void BeginCache();
   virtual void Draw(D3DDevice *d3d);
   static void EndCache(D3DDevice *d3d);

   void Setup(FLOAT x1, FLOAT y1, FLOAT x2, FLOAT y2, DWORD color);

private:
   FLOAT _x1, _y1, _x2, _y2;
   DWORD _color;

private:
   struct Vertex
   {
      FLOAT x, y;
      DWORD color;
   };

   static TArray<Vertex> _cache;
   static bool _cache_enabled;
};

#endif  // __EVAS_DIRECT3D_OBJECT_LINE_H__