Someone who knows VB please help

Just starting out? Need help? Post your questions and find answers here.
Moonshine
Enthusiast
Enthusiast
Posts: 263
Joined: Tue May 25, 2004 12:13 am
Location: UK

Someone who knows VB please help

Post 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 :)
Mark my words, when you least expect it, your uppance will come...
LarsG
Enthusiast
Enthusiast
Posts: 713
Joined: Mon Jun 02, 2003 1:06 pm
Location: Norway
Contact:

Post by LarsG »

Code: Select all

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

AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX
ivory
User
User
Posts: 36
Joined: Fri Jun 25, 2004 2:30 am

Post 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.
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post 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.
Moonshine
Enthusiast
Enthusiast
Posts: 263
Joined: Tue May 25, 2004 12:13 am
Location: UK

Post 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 :)
Mark my words, when you least expect it, your uppance will come...
Post Reply