Page 1 of 1

Video and true type font libraries

Posted: Fri May 11, 2007 5:35 pm
by Kalda
Hello.
I created 2 dynamic link libraries for easy video playback and drawing TTF font in Direct 3D 9 driver in Irrlicht. It uses DirectShow and Overlay.

Download here.

TTF Library:

Code: Select all


Font_SetDevice((LPVOID)driver->getExposedVideoData().D3D9.D3DDev9); //At first you must call this function

//load a Font
CIrrDXFont font("Trajan Pro",24);
//draw text
font.Draw("Some text",0,0,640,100,0xFF00CCFF);//text,x,y,w,h,color(0xAABBGGRR)

Video library:

Code: Select all


SExposedVideoData evd = driver->getExposedVideoData();
LPVOID cinHandle = PlayMovie((HWND)evd.D3D9.HWnd,"movie.avi",TRUE,evd.D3D9.D3D9,evd.D3D9.D3DDev9);

if(!cinHandle) return 0;

PauseMovie(cinHandle,FALSE); //starts playback

SetForegroundWindow((HWND)evd.D3D9.HWnd);

while(device->run())
{
	if(!OnFrame(cinHandle))
		break;

}

FreeMovie(cinHandle);


Posted: Fri May 11, 2007 11:49 pm
by Ico
Imo you should do all those casts within your functions. If the passed driver isn't D3D9 throw some error and you're done. :)

Posted: Sat May 12, 2007 8:29 am
by Kalda
Ok. It's only for D3D9. You cannot select other driver, but you're right. I'll add it into DLLs.

And please, send me info about all crashes and bugs.

P.S.: You can use this:

Code: Select all

LPVOID cinHandle = PlayMovie(hWnd,"movie.avi",FALSE,NULL,NULL);
//This create new internal D3D9 device and destroy it when playing is complete

Posted: Tue Jul 07, 2009 7:57 pm
by christianclavet
The download link is down. Is there a way to retrieve this?

link dead

Posted: Thu Sep 17, 2009 4:54 pm
by stash
Really! The link is dead.. please, see this..

Posted: Wed Apr 27, 2011 4:40 pm
by Grumpy
Bump.... link is still dead, Jim....