Mercurial > fife-parpg
comparison engine/core/video/opengl/glimage.cpp @ 583:47b49b9b0c0a
* Improved the floatingtextrenderer. Now you can set an alpha value for font, background quad and border. Splited quad and border into own commands.
* Added a triangle function to backends and genericrenderer, also added the functions to set an alpha value for geometric figures.
author | helios2000@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Sat, 07 Aug 2010 16:36:35 +0000 |
parents | ad1f09d954f9 |
children | 739d8a43d771 |
comparison
equal
deleted
inserted
replaced
582:5e04f6349894 | 583:47b49b9b0c0a |
---|---|
313 if (clear) { | 313 if (clear) { |
314 glClear(GL_COLOR_BUFFER_BIT); | 314 glClear(GL_COLOR_BUFFER_BIT); |
315 } | 315 } |
316 } | 316 } |
317 | 317 |
318 bool GLImage::putPixel(int x, int y, int r, int g, int b) { | 318 bool GLImage::putPixel(int x, int y, int r, int g, int b, int a) { |
319 cleanup(); | 319 cleanup(); |
320 return m_sdlimage->putPixel(x, y, r, g, b); | 320 return m_sdlimage->putPixel(x, y, r, g, b, a); |
321 } | 321 } |
322 | 322 |
323 void GLImage::drawLine(const Point& p1, const Point& p2, int r, int g, int b) { | 323 void GLImage::drawLine(const Point& p1, const Point& p2, int r, int g, int b, int a) { |
324 cleanup(); | 324 cleanup(); |
325 m_sdlimage->drawLine(p1, p2, r, g, b); | 325 m_sdlimage->drawLine(p1, p2, r, g, b, a); |
326 } | 326 } |
327 | 327 |
328 void GLImage::drawQuad(const Point& p1, const Point& p2, const Point& p3, const Point& p4, int r, int g, int b) { | 328 void GLImage::drawTriangle(const Point& p1, const Point& p2, const Point& p3, int r, int g, int b, int a) { |
329 cleanup(); | 329 cleanup(); |
330 m_sdlimage->drawQuad(p1, p2, p3, p4, r, g, b); | 330 m_sdlimage->drawTriangle(p1, p2, p3, r, g, b, a); |
331 } | 331 } |
332 | 332 |
333 void GLImage::drawVertex(const Point& p, const uint8_t size, int r, int g, int b) { | 333 void GLImage::drawQuad(const Point& p1, const Point& p2, const Point& p3, const Point& p4, int r, int g, int b, int a) { |
334 cleanup(); | 334 cleanup(); |
335 m_sdlimage->drawVertex(p, size, r, g, b); | 335 m_sdlimage->drawQuad(p1, p2, p3, p4, r, g, b, a); |
336 } | |
337 | |
338 void GLImage::drawVertex(const Point& p, const uint8_t size, int r, int g, int b, int a) { | |
339 cleanup(); | |
340 m_sdlimage->drawVertex(p, size, r, g, b, a); | |
336 } | 341 } |
337 } | 342 } |