Magic Library - True Type windows font

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Emil_halim
Posts: 518
Joined: Tue Mar 29, 2005 9:02 pm
Location: Alex,Egypt
Contact:

Post by Emil_halim »

this Lib comes with MSVC++ toolkit 2003 ,so what is your compiler?
Guest

Post by Guest »

Microsoft Visual C++ Express, the one they gave out for free, Well, could you supply me with that library file ??? possibly???
Guest

Post by Guest »

also, Is there any better manuals out there for magic2d...???
Guest

Post by Guest »

how about this one...

CreateDevice: identifier not found....

Anyone know why that is...?
Guest

Post by Guest »

sorry for so many post, but I'm including Magic2D in my project, and I'm in desperate need to get this figured out, I'm sure I want to use DirectX so it will be DxMagic2d, do I need to use CreateDevice with dxMagic2d or is that with the other one. Also Don't worry about the libc.lib problem. I got the standard c++ libraries for visual express, it solved the problem. actually I installed ms toolkit and ripped the libraries from that then uninstalled it.

anyways...

Right now those are the only things I need to know so ignore the other post by "Guest" above on this page.

Thanks
Emil_halim
Posts: 518
Joined: Tue Mar 29, 2005 9:02 pm
Location: Alex,Egypt
Contact:

Post by Emil_halim »

Hi Guest

i think that ,it's better to download Magic2d Library for OpenGL ,even if
you are going to use DX version,because OpenGl Version has many
Examples that you could learn a lot from.

also there is a very beta HelpFile which you could learn from it.

here is the link for the help file
http://bcxdx.spoilerspace.com/BCXGL/Magic2d_01.chm

by the way all version work the same ,so what you do in OpenGL version
you could do it with Dx Virsion,except that some function does not exist
in Dx version.

hope that will help you,feel free to ask for any thing you want.
Emil_halim
Posts: 518
Joined: Tue Mar 29, 2005 9:02 pm
Location: Alex,Egypt
Contact:

Post by Emil_halim »

Anonymous wrote:how about this one...

CreateDevice: identifier not found....

Anyone know why that is...?
if you still have this problem , redownload the DX version from here

http://bcxdx.spoilerspace.com/BCXGL/DxMagic2d.zip
Guest

Post by Guest »

#include <irrlicht.h>
#include <DxMagic2d.hpp>

using namespace irr;
using namespace core;
using namespace scene;
using namespace video;

IrrlichtDevice *device = 0;
IVideoDriver *driver = 0;
ISceneManager *smgr = 0;

int main(void)
{
device =
createDevice(EDT_DIRECT3D9,dimension2d<s32>(640,480),32,false);
bool rslt = InitMagic(device);
if(!rslt)
printf("ERROR WITH MAGIC2D!!!\n");

driver = device->getVideoDriver();
smgr = device->getSceneManager();
device->setWindowCaption(L"TEST");

driver->setTextureCreationFlag(ETCF_CREATE_MIP_MAPS, FALSE);

SMaterial splash1;
splash1.Texture1 = driver->getTexture("../splash1.bmp");

while(device->run())
{
if(device->isWindowActive())
{
driver->beginScene(true,true,SColor(0,0,0,0));
ViewOrtho();

driver->setMaterial(splash1);
SetColor(255,255,255);
DrawImage(splash1,0,0);

ViewPerspective();
smgr->drawAll();
driver->endScene();
}
}
device->drop();
return 0;
}

It compiles fine, no errors. When i run the program the console says it loads splash1.bmp...

But I'm not seeing it drawn... Whats the problem???
Emil_halim
Posts: 518
Joined: Tue Mar 29, 2005 9:02 pm
Location: Alex,Egypt
Contact:

Post by Emil_halim »

after some investigations,i found that.

with DX version you have to set a camera Scene node.

Code: Select all

for example
  
   smgr->addCameraSceneNode(0,vector3df(0,0,-1),vector3df(0,0,0));
when you want to mix 2d with 3d you have to create two cameras, one for 2d drawing just like the example above ,and the other you your 3d world, and exchange them as needed.

i will see if i could do it in the ViewOrtho & ViewPerspective in the next release of DX version.
Guest

Post by Guest »

What do you mean change them as need, I would like to just draw over the 3D... Does it work like that with the openGL version....?
Emil_halim
Posts: 518
Joined: Tue Mar 29, 2005 9:02 pm
Location: Alex,Egypt
Contact:

Post by Emil_halim »

No OpenGL does not need a camera,i do not know why it is something in
the DirectX itself.

any way the solutaion is very easy as i said.

from your post i think that you want to draw your 3D stuff, by using
smgr->drawAll() function, then you set the 2D camera then ViewOrtho()
& ViewPerspective() , after that you must return to your 3D camera.

for exchanging between the camera see RTT example that comes with Irrlicht.

here is the framework of your Irrlicht Loop

Code: Select all

      while(device->run())
	{

	      driver->beginScene(true, true, SColor(0,0,0,0));
                      
                      // draw your 3d stuff
                      smgr->drawAll();

                      //set 2d camera here

                      ViewOrtho();

                      // draw your 2d stuff here

                      ViewPerspective();
                      
                       // we have to reset blending system for correct 3d render
                       SetBlend(SOLIDBLEND);

                       // return to your 3d camera here

                      driver->endScene();
              }   
hope it is clear now.
Guest

Post by Guest »

yeah its clear, but I think I'll just use OpenGL, I'll probably make it cross platform anyways...
Emil_halim
Posts: 518
Joined: Tue Mar 29, 2005 9:02 pm
Location: Alex,Egypt
Contact:

Post by Emil_halim »

Hi All

this is the upgrading of Magic2d library, version 0.6 ,it has the source code of Amiga Zowee demo and has a new class called TCapture that allows you to capture your animations that you playing on your screen to a Divx AVI movie File.
ofcaurce you have to install DivX codecs in your system,the class allows you to capture the intire screen or part of it,also allows you to specify the duration of your capturing processes so it will automatically stop capturing when the time exceed the time you set.

you could use this class to preshowing you work as a movie for your users before they downloading your game.

also this version has some new demos.

download it from here
http://bcxdx.spoilerspace.com/BCXGL/Magic2d_06.zip

Enjoy it.
Morphing

Post by Morphing »

I want to ask :
that can i load a movie with sound with ur magic2d library or it is only posiible to load a movie without sound
Morphing

Post by Morphing »

also can i load movies with other formats also like wmv , mpeg etc
Post Reply