Mercurial > fife-parpg
comparison engine/core/view/renderers/genericrenderer.i @ 482:16c2b3ee59ce
* Merged the view performance branch back into trunk. fixes[ticket:419]
author | helios2000@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Thu, 29 Apr 2010 13:51:45 +0000 |
parents | f855809822cf |
children | 47b49b9b0c0a |
comparison
equal
deleted
inserted
replaced
481:1f37adc9a685 | 482:16c2b3ee59ce |
---|---|
63 Instance* getInstance(); | 63 Instance* getInstance(); |
64 Location* getLocation(); | 64 Location* getLocation(); |
65 Layer* getLayer(); | 65 Layer* getLayer(); |
66 Point getPoint(); | 66 Point getPoint(); |
67 | 67 |
68 Point getCalculatedPoint(Camera* cam, Layer* layer, std::vector<Instance*>& instances); | 68 Point getCalculatedPoint(Camera* cam, Layer* layer); |
69 private: | 69 private: |
70 Instance* m_instance; | 70 Instance* m_instance; |
71 Location* m_location; | 71 Location* m_location; |
72 Layer* m_layer; | 72 Layer* m_layer; |
73 Point m_point; | 73 Point m_point; |
74 }; | 74 }; |
75 class GenericRendererElementInfo { | 75 class GenericRendererElementInfo { |
76 public: | 76 public: |
77 virtual void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool) {}; | |
78 virtual ~GenericRendererElementInfo() {}; | 77 virtual ~GenericRendererElementInfo() {}; |
79 }; | 78 }; |
80 | 79 |
81 class GenericRendererLineInfo : public GenericRendererElementInfo { | 80 class GenericRendererLineInfo : public GenericRendererElementInfo { |
82 public: | 81 public: |
83 void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool); | |
84 GenericRendererLineInfo(GenericRendererNode n1, GenericRendererNode n2, uint8_t r, uint8_t g, uint8_t b); | 82 GenericRendererLineInfo(GenericRendererNode n1, GenericRendererNode n2, uint8_t r, uint8_t g, uint8_t b); |
85 virtual ~GenericRendererLineInfo() {}; | 83 virtual ~GenericRendererLineInfo() {}; |
86 private: | 84 private: |
87 GenericRendererNode m_edge1; | 85 GenericRendererNode m_edge1; |
88 GenericRendererNode m_edge2; | 86 GenericRendererNode m_edge2; |
90 uint8_t m_green; | 88 uint8_t m_green; |
91 uint8_t m_blue; | 89 uint8_t m_blue; |
92 }; | 90 }; |
93 class GenericRendererPointInfo : public GenericRendererElementInfo { | 91 class GenericRendererPointInfo : public GenericRendererElementInfo { |
94 public: | 92 public: |
95 void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool); | |
96 GenericRendererPointInfo(GenericRendererNode n, uint8_t r, uint8_t g, uint8_t b); | 93 GenericRendererPointInfo(GenericRendererNode n, uint8_t r, uint8_t g, uint8_t b); |
97 virtual ~GenericRendererPointInfo() {}; | 94 virtual ~GenericRendererPointInfo() {}; |
98 private: | 95 private: |
99 GenericRendererNode m_anchor; | 96 GenericRendererNode m_anchor; |
100 uint8_t m_red; | 97 uint8_t m_red; |
101 uint8_t m_green; | 98 uint8_t m_green; |
102 uint8_t m_blue; | 99 uint8_t m_blue; |
103 }; | 100 }; |
104 class GenericRendererQuadInfo : public GenericRendererElementInfo { | 101 class GenericRendererQuadInfo : public GenericRendererElementInfo { |
105 public: | 102 public: |
106 void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool); | |
107 GenericRendererQuadInfo(GenericRendererNode n1, GenericRendererNode n2, GenericRendererNode n3, GenericRendererNode n4, uint8_t r, uint8_t g, uint8_t b); | 103 GenericRendererQuadInfo(GenericRendererNode n1, GenericRendererNode n2, GenericRendererNode n3, GenericRendererNode n4, uint8_t r, uint8_t g, uint8_t b); |
108 virtual ~GenericRendererQuadInfo() {}; | 104 virtual ~GenericRendererQuadInfo() {}; |
109 private: | 105 private: |
110 GenericRendererNode m_edge1; | 106 GenericRendererNode m_edge1; |
111 GenericRendererNode m_edge2; | 107 GenericRendererNode m_edge2; |
113 GenericRendererNode m_edge4; | 109 GenericRendererNode m_edge4; |
114 uint8_t m_red; | 110 uint8_t m_red; |
115 uint8_t m_green; | 111 uint8_t m_green; |
116 uint8_t m_blue; | 112 uint8_t m_blue; |
117 }; | 113 }; |
118 | |
119 class GenericRendererVertexInfo : public GenericRendererElementInfo { | 114 class GenericRendererVertexInfo : public GenericRendererElementInfo { |
120 public: | 115 public: |
121 void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool); | |
122 GenericRendererVertexInfo(GenericRendererNode center, int size, uint8_t r, uint8_t g, uint8_t b); | 116 GenericRendererVertexInfo(GenericRendererNode center, int size, uint8_t r, uint8_t g, uint8_t b); |
123 virtual ~GenericRendererVertexInfo() {}; | 117 virtual ~GenericRendererVertexInfo() {}; |
124 private: | 118 private: |
125 GenericRendererNode m_center; | 119 GenericRendererNode m_center; |
126 int m_size; | 120 int m_size; |
127 uint8_t m_red; | 121 uint8_t m_red; |
128 uint8_t m_green; | 122 uint8_t m_green; |
129 uint8_t m_blue; | 123 uint8_t m_blue; |
130 }; | 124 }; |
131 | |
132 class GenericRendererImageInfo : public GenericRendererElementInfo { | 125 class GenericRendererImageInfo : public GenericRendererElementInfo { |
133 public: | 126 public: |
134 void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool); | |
135 GenericRendererImageInfo(GenericRendererNode n, int image); | 127 GenericRendererImageInfo(GenericRendererNode n, int image); |
136 virtual ~GenericRendererImageInfo() {}; | 128 virtual ~GenericRendererImageInfo() {}; |
137 private: | 129 private: |
138 GenericRendererNode m_anchor; | 130 GenericRendererNode m_anchor; |
139 int m_image; | 131 int m_image; |
140 }; | 132 }; |
141 class GenericRendererAnimationInfo : public GenericRendererElementInfo { | 133 class GenericRendererAnimationInfo : public GenericRendererElementInfo { |
142 public: | 134 public: |
143 void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool); | |
144 GenericRendererAnimationInfo(GenericRendererNode n, int animation); | 135 GenericRendererAnimationInfo(GenericRendererNode n, int animation); |
145 virtual ~GenericRendererAnimationInfo() {}; | 136 virtual ~GenericRendererAnimationInfo() {}; |
146 private: | 137 private: |
147 GenericRendererNode m_anchor; | 138 GenericRendererNode m_anchor; |
148 int m_animation; | 139 int m_animation; |
149 }; | 140 }; |
150 class GenericRendererTextInfo : public GenericRendererElementInfo { | 141 class GenericRendererTextInfo : public GenericRendererElementInfo { |
151 public: | 142 public: |
152 void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool); | |
153 GenericRendererTextInfo(GenericRendererNode n, AbstractFont* font, std::string text); | 143 GenericRendererTextInfo(GenericRendererNode n, AbstractFont* font, std::string text); |
154 virtual ~GenericRendererTextInfo() {}; | 144 virtual ~GenericRendererTextInfo() {}; |
155 private: | 145 private: |
156 GenericRendererNode m_anchor; | 146 GenericRendererNode m_anchor; |
157 AbstractFont* m_font; | 147 AbstractFont* m_font; |