1
1
forked from 0ad/0ad
0ad/source/gui/GUIRenderer.h
Ykkrosh ba0ebd6644 Renamed icon-size/icon-id to cell-size/cell-id, and allowed cell-id to be used in <icon>s.
Added <effect>s to sprites/images - currently multiply-color and
add-color, though they're far from perfect.

This was SVN commit r1525.
2004-12-18 13:32:00 +00:00

52 lines
985 B
C++

#ifndef GUIRenderer_h
#define GUIRenderer_h
#include "lib/res/handle.h"
#include "ps/Overlay.h"
#include "ps/CStr.h"
#include <vector>
struct SGUIImageEffects;
namespace GUIRenderer
{
struct Handle_rfcnt_tex
{
Handle h;
Handle_rfcnt_tex();
Handle_rfcnt_tex(Handle h_);
Handle_rfcnt_tex(const Handle_rfcnt_tex& that);
~Handle_rfcnt_tex();
Handle_rfcnt_tex& operator=(Handle h_);
};
struct SDrawCall
{
Handle_rfcnt_tex m_TexHandle;
bool m_EnableBlending;
SGUIImageEffects* m_Effects;
CRect m_Vertices;
CRect m_TexCoords;
float m_DeltaZ;
CColor m_BorderColor; // == CColor() for no border
CColor m_BackColor;
};
typedef std::vector<SDrawCall> DrawCalls;
}
#include "gui/CGUISprite.h"
namespace GUIRenderer
{
void UpdateDrawCallCache(DrawCalls &Calls, CStr &SpriteName, CRect& Size, int CellID, std::map<CStr, CGUISprite> &Sprites);
void Draw(DrawCalls &Calls);
}
#endif // GUIRenderer_h