ive got a dx wrapper using static link library
this is the sll code
and this is how i run it in my programCode:#include <windows.h> #include <stdio.h> #include <d3d9.h> #include <d3dx9.h> #include <d3dx9core.h> void ADrawText(LPDIRECT3DDEVICE9 a,LPD3DXFONT b ) { HDC hDC= GetDC( NULL ); int nHeight= -( MulDiv( 12, GetDeviceCaps(hDC, LOGPIXELSY), 72 ) ); ReleaseDC( NULL, hDC ); HFONT hFont = CreateFont(nHeight, 0, 0, 0, 500, false, false, false, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Times New Roman" ); D3DXCreateFont( a, hFont, &b ); DeleteObject( hFont ); RECT destRect1; SetRect( &destRect1, 200, 30, 0, 0 ); b->DrawText("hi there, -1, &destRect1, DT_SINGLELINE, D3DCOLOR_XRGB(250,250,250) ); }
My question is, is it possible to just have ADrawText();Code:ADrawText(g_pd3dDevice,g_pd3dxFont);
instead of having to tell it what the devices etc are?
If so how would i go about it?


Reply With Quote
CornedBee