Original Post
When I am trying to crreate my font i receive this compile error.
error C2664: ''D3DXCreateFontIndirectA'' : cannot convert parameter 2 from ''struct tagLOGFONTA *'' to ''const struct _D3DXFONT_DESCA *''
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Here is my code.
ID3DXFont *mFont=NULL;
LOGFONT defaultFont = {
18, //height
0, //width
0, //lfEscapement
0, //lfOrientation
FW_BOLD, //lfWeight
FALSE, //lfItalic
FALSE, //lfUnderline
FALSE, //lfStrikeOut
DEFAULT_CHARSET, //lfCharSet
OUT_DEFAULT_PRECIS, //lfOutPrecision
CLIP_DEFAULT_PRECIS, //lfClipPrecision
NONANTIALIASED_QUALITY, //lfQuality
DEFAULT_PITCH, //lfPitchAndFamily
"Courier New" //lfFaceName[LF_FACESIZE]
};
// Create the Font
D3DXCreateFontIndirect(oIDirect3DDevice9,&defaultFont,&mFont);
/code]