V
Vincent R
Hi,
When trying to compile the following code I get an error with MS
compiler error C2514: 'GlyphTexCoords' : class has no constructors
/* Forward declarations */
struct Vector2f;
struct GlyphPosition;
struct GlyphTexCoords;
struct GlyphColors;
/////////////////////////////////////////////////////////////////////
// class OpenGLFont
//
class OpenGLFont
{
public:
vector<GlyphTexCoords> TextureCoordinates;
void SetFont(CFont font)
{
...
float uStart = x / fSquareDim;
float uEnd = (x + CharacterWidths) / fSquareDim;
float vEnd = (y + myHeight) / fSquareDim;
TextureCoordinates = GlyphTexCoords(uStart, vStart, uEnd, vEnd);
}
}; //OpenGLFont
struct GlyphTexCoords
{
Vector2f BottomLeft;
Vector2f TopLeft;
Vector2f BottomRight;
Vector2f TopRight;
GlyphTexCoords()
{}
GlyphTexCoords(float left, float top, float right, float bottom)
{
TopLeft.X = BottomLeft.X = left;
TopLeft.Y = TopRight.Y = top;
TopRight.X = BottomRight.X = right;
BottomLeft.Y = BottomRight.Y = bottom;
}
};
Don't understand becaue there is a constructor...
When trying to compile the following code I get an error with MS
compiler error C2514: 'GlyphTexCoords' : class has no constructors
/* Forward declarations */
struct Vector2f;
struct GlyphPosition;
struct GlyphTexCoords;
struct GlyphColors;
/////////////////////////////////////////////////////////////////////
// class OpenGLFont
//
class OpenGLFont
{
public:
vector<GlyphTexCoords> TextureCoordinates;
void SetFont(CFont font)
{
...
float uStart = x / fSquareDim;
float uEnd = (x + CharacterWidths) / fSquareDim;
float vEnd = (y + myHeight) / fSquareDim;
TextureCoordinates = GlyphTexCoords(uStart, vStart, uEnd, vEnd);
}
}; //OpenGLFont
struct GlyphTexCoords
{
Vector2f BottomLeft;
Vector2f TopLeft;
Vector2f BottomRight;
Vector2f TopRight;
GlyphTexCoords()
{}
GlyphTexCoords(float left, float top, float right, float bottom)
{
TopLeft.X = BottomLeft.X = left;
TopLeft.Y = TopRight.Y = top;
TopRight.X = BottomRight.X = right;
BottomLeft.Y = BottomRight.Y = bottom;
}
};
Don't understand becaue there is a constructor...