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.

DLL Talk / D3D Extras for DBPro DLL

Author
Message
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 13th Jun 2005 04:54
Tis a good idea

My Website:
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 13th Jun 2005 04:59
It is a good idea. Documentation is not my strongest point , I'll knock up something simple and when I get time I'll try to go into a bit more detail.

Cloggy
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 13th Jun 2005 08:25 Edited at: 13th Jun 2005 08:26
D3Dfunc.dll - Reference Information

Initialising dll

InitD3D
This must be run before you can use any of the dll's functions

Text Functions

Set Font Font Number,Name,Size,Bold,Italic
Font Number - Valid values 1-20
Name - The windows font name
Size - Size of font in pixels
Bold - 0=normal,1=bold
Italic - 0=normal,1=italic

Draw Color Red,Green,Blue,Alpha
Red - Red Component
Green - Green Component
Blue - Blue Component
Alpha - Alpha Component

Text AA Font Number,X,Y,Alignment,Text
Font Number - Valid values 1-20
X - Screen X position
Y - Screen Y position
Alignment - 0=Left aligned
1=Centered
2=Right Aligned
Text - Text to print

Text3D Filename,Text,Depth,Quality,Alignment
Filename - Where the text mesh will be saved to
Text - Text to convert to a mesh
Depth - ZDepth of the mesh
Quality - 0=Low poly count
1=Medium poly count
2=High poly count
Alignment - Object Center
0=Left of text
1=Center
2=Right
3=Font Default (hard to explain)

StartText
Begin Antialiased text drawing operations. This command starts a set of Text AA commands.

EndText
End Antialiased text drawing operations. This command completes a set of Text AA commands, and actually draws the text to screen.

Please note that performing any other drawing operations between a start and end text will cause the text to display incorrectly.

eg


Will not work correctly, whereas


will work fine. You can have multiple text AA commands in a set and the fewer 'StartText' 'EndText' pairs you have in your game loop, the more fps you will gain.

Try to keep all text operations together for the biggest speed improvements over the native text command.

Line3D x1#,y1#,z1#,x2#,y2#,z2#
Draw Line between x1#,y1#,z1# and x2#,y2#,z2# in the current draw colour.

Set View Left,Top,Right,Bottom
Parameters exactly the same as 'set camera view command'. This command should be used when the camera view is changed. It is used by the 'Line3D' command.

Example Program

Here is the updated Dark Basic Pro project to reflect these new changes. The call to find the Direct3d pointer is now included in the dll finally thans to everyone who help with that.



Also attached is the new dll.

Cheers,

Cloggy

Attachments

Login to view attachments
Scilynt
22
Years of Service
User Offline
Joined: 13th Nov 2002
Location: .-#-.
Posted: 13th Jun 2005 09:40
Just my little contribution to this great DLL, a set of help files and keywords file. Download and extract to your root DBP folder eg. (C:\Program Files\Dark Basic Software\Dark Basic Professional\) The files are in the same style as the default DBP help docs.

Few other things though:

1) In the Text3D command, which way round are the quality values? In the example 0 is high, 2 to low whereas in your help it's the opposite.

2) The Text3D doesn't seem to work in the example you gave.

3) Set View doesn't seem to be working.

Attachments

Login to view attachments
Eddie B
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location:
Posted: 13th Jun 2005 15:49 Edited at: 13th Jun 2005 15:54
Cloggy, Nice man

SilentS, Thanks. I am adding then dbpro background and jazzing them up a bit for you cloggy

DirectX in the learning
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 13th Jun 2005 16:19
SilentS,

Thanks for that. You are right 0=High poly 3=low poly.

I've tested everything this morning and it all seems ok. I'll repost the dll just in case I've changed anything.

Eddie B,

cheers. I hope you find this useful. I'll check out the help files when I get to work.

Cloggy

Attachments

Login to view attachments
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 13th Jun 2005 17:16
SilentS,

Just checked out your help files. Great job!

I appreciate the help as documentation is most definately my weak point.

I am looking to change the 3D text to create a dark basic object rather than a .x file. Once this is done I think everything will be finished and I will create a zip file with everything included and shove it in program announcements.

Once again thanks to everyone who has given me help and encouragement on this project.

Cheers,

Cloggy
Scilynt
22
Years of Service
User Offline
Joined: 13th Nov 2002
Location: .-#-.
Posted: 14th Jun 2005 03:33 Edited at: 14th Jun 2005 07:50
@Eddie B: How do you mean adding the DBP background? It already has the one used in the help files.

They should look like this:



I fixed up the HTML a little bit, the stuff used in the current help is a bit dodgy, but I didn't want to change the style used by all the official DBP help.

Attachments

Login to view attachments
Eddie B
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location:
Posted: 14th Jun 2005 04:00
ahh lol, ha ha I wasnt viewing them in pro lol. I was viewing them as they are

DirectX in the learning
Scilynt
22
Years of Service
User Offline
Joined: 13th Nov 2002
Location: .-#-.
Posted: 14th Jun 2005 07:50 Edited at: 4th Oct 2005 21:48
Ah, I made them so they used the same images the DBP help files use since they will more than likely be put in the default help folder and the paths will be correct. Saves doubling up aswell, even though the image isn't that large (34.6KB).

Just noticed I typed your username wrong aswell, missing the space .
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 4th Oct 2005 11:05
Sorry to raise a thread from the dead - but has any work been done on this or is it finished?

My Website:
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 7th Oct 2005 15:57
Nicholas,

Due to work commitments I'm unable to do any more with this at the moment.

However I have posted to full source here http://forum.thegamecreators.com/?m=forum_view&t=55836&b=5. It is a slightly newer version and the commands are all prefixed with d3d_ now. But it is the latest working version.

Cheers,

Cloggy

Login to post a reply

Server time is: 2024-11-25 00:02:39
Your offset time is: 2024-11-25 00:02:39