Page 1 of 1

Someone who knows VB please help

Posted: Wed Sep 01, 2004 12:54 am
by Moonshine
Im trying to convert something from VB over to PB, theres a line that reads

Code: Select all

Public Engine          As New R3D_Engine
Now my guess is that this creates a new R3D_Engine object called "Engine". But then what do I know. Point is, how does this translate to PB? im using interfaces to a DLL and I need to obtain a pointer to interfaces, but it seems this is how its done in the VB version...

In the C++ verson of similar code it reads

Code: Select all

R3D_Engine	*Engine		= new R3D_Engine;
So, can anyone help me? Cheers :)

Posted: Wed Sep 01, 2004 6:27 am
by LarsG

Code: Select all

Global Engine.R3D_Engine
:?: :?: :?:

Posted: Wed Sep 01, 2004 3:56 pm
by ivory
My guess is that R3D_Engine is defined elsewhere in the program, possibly an active-x component.

Public Engine As New R3D_Engine is creating a new instance of that object, and making it global.

I don't know if there is a true translation for this, since the first thing you would need would be R3D_Engine.

Posted: Wed Sep 01, 2004 7:20 pm
by Shannara
R3D engine, Revolution3D is a known illegal engine based off of the TV3D engine (TrueVision3D). When TrueVision was open source, some kid took the sourcen and "created" his own engine out of it, titled it Revolution3D. This was a very very long time ago, since then both engines have supposily recoded their engines to be quite different "under the hood".

So if your using it, you should know of its illegal background :D

Anyways... to answer the question...

Since R3D_Engine is an activex class, in order to use that in VB, you MAY be lucky enough to use a proggie caled Activex2DLL, look in the Announcement forums. The only very very bad thing about using the above, is that it is SLOW since it uses scripting....

Until then, Ive heard rumors about PB's ability to use ActiveX, but so far NOBODY on the forums have been able to give a real fully working example. Last I heard it takes as many lines of code to craete an interface and functions to use an activex controls, as it does to create Windows XP....

Good luck.

Posted: Wed Sep 01, 2004 9:07 pm
by Moonshine
Thanks everyone, and thanks Shannara. Anyways, turns out I had the same trouble getting this to work as i did with TV3D. So Im going back to the good old "sack it, I'll do it myself" method.

Turning my attention swiftly back to the DX9 3d engine I started in PB (at least that works properly). Plus I wont have to wait for updates or bugfixes...heh :)

Cheers everyone :)