1
0
forked from 0ad/0ad
0ad/source/gui/GUIRenderer.h
Ykkrosh a2432adad3 # GCC 4.1.1 compatibility
which is just "class C { void C::f(); }" code, which other compilers
seem to have ignored.
Also removed HAVE_PCH from GCC because our build system doesn't have
PCH. Added necessary headers to make it compile again.

This was SVN commit r4437.
2006-09-30 15:46:40 +00:00

60 lines
1021 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
{
class IGLState
{
public:
virtual ~IGLState() {};
virtual void Set(Handle tex)=0;
virtual void Unset()=0;
};
struct SDrawCall
{
SDrawCall() : m_TexHandle(0), m_Effects(NULL) {}
Handle m_TexHandle;
bool m_EnableBlending;
IGLState* m_Effects;
CRect m_Vertices;
CRect m_TexCoords;
float m_DeltaZ;
CColor m_BorderColor; // == CColor() for no border
CColor m_BackColor;
};
class DrawCalls : public std::vector<SDrawCall>
{
public:
void clear();
DrawCalls();
DrawCalls(const DrawCalls&);
const DrawCalls& operator=(const DrawCalls&);
~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