Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] 3D Text and Teapot without Plugin

Author
Message
Jukuma
21
Years of Service
User Offline
Joined: 18th Nov 2003
Location: Germany
Posted: 8th Jun 2009 23:09
The Code creates a 3d Text Mesh over the D3D-Device from DBP.

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 9th Jun 2009 01:06
That's awesome!
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 9th Jun 2009 02:57 Edited at: 9th Jun 2009 02:57
Wow that's awesome I have no idea how you did that .

<-- Spell based team dueling game!
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 9th Jun 2009 20:28
I've got to agree with the others - awesome. I had no idea you could do that:

Sure could be useful.

Jukuma
21
Years of Service
User Offline
Joined: 18th Nov 2003
Location: Germany
Posted: 11th Jun 2009 20:28 Edited at: 11th Jun 2009 20:50
Here is a new and revised version. There are some Functions have been added.



Function List

InitD3D()
Call this first to get the DBP Direct3D Device.

FreeD3D()
Cleans all the D3D and global stuff.

MakeObjectTeapot(object)
Creats a teapot object.


Set3DTextFont(font$, bold, italic, charset)
Sets the font and the look of it.
charset: 0 = ansi / 1 = default / 2 = symbol

MakeObject3DText(object, text$, deviation, extrusion)
Creats the 3D-Text object.
deviation: Maximum chordal deviation from TrueType font outlines.
extrusion: Extrude text in the negative z-direction.


MakeObjectTorus(object, radius1#, radius2#, sides, rings)
Creats a torus object.
radius1#: inner radius / radius2#: outer radius


MakeObjectCylinder(object, radius1#, radius2#, length#, slices, stacks)
Creats a cylinder or cone object.


MakeObjectPolygon(object, length#, sides)
Creats a polygone or plain object.


MakeObjectBox(object, width#, height#, depth#)
The same as the DBP function.

MakeObjectSphere(object, radius#, slices, stacks)
The same as the DBP function.
Francis
15
Years of Service
User Offline
Joined: 24th Nov 2008
Location: London, England.
Posted: 12th Jun 2009 11:04
Wow! Brilliant Work!
Dr Tank
15
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Southampton, UK
Posted: 13th Jun 2009 05:47
Good grief! This really is quite brilliant! Nice tidy code too.

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 16th Jun 2009 16:28
Looks like some really useful stuff has been right under our noses all the time. Looking forward to playing with some of this.

Thanks for some very nice examples.

Login to post a reply

Server time is: 2024-11-22 01:42:53
Your offset time is: 2024-11-22 01:42:53