🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

DirectX and Delphi

Started by
11 comments, last by Macl 24 years, 8 months ago
One Tip : For DirectX development, change to C/C++.

------------------
Skullpture Entertainment
#40842461

Graphix Coding @Skullpture Entertainmenthttp://www.skullpture.de
Advertisement
Typical !

Ofcuz, you can use DirectX in Delphi.

Hori has made a very good interface for DirectX called DelphiX, it comes with full source !
check it out. http://www.ingjapan.ne.jp/hori/index-e.html
You can also have a look at my site: http://www.microtower.com
- there you can find a link to the DelphiX Webring.
Good luck

DirectX has been developed for use with C/C++. You can use DelphiX and things like that, but you won't get the best performance out of it and you don't have all the possibilities. I personally don't like all those DX components (I worked with C++ Builder), because you have a few functions and that's it.

CU

------------------
Skullpture Entertainment
#40842461

Graphix Coding @Skullpture Entertainmenthttp://www.skullpture.de
DirectX is a collection of drivers and modules. The "performance" you see from DirectX is based on those drivers and modules and has *nothing* to do with the language or development environment used.

Are there more C/C++ resources for DirectX than Delphi resources? Yup. Does that affect "performance" either? Nope.

Use the development environment you are most productive using. DirectX will take care of itself.

------------------
DavidRM
Samu Games

It's how DirectX is implemented, C/C++ uses another structure than Delphi and DX is optimized for use with C/C++ (I read in a book on DX). That has nothing to do with the resources, just with the architecture.

And, with the performance, I originally meant using components. But that's another point.

CU

------------------
Skullpture Entertainment
#40842461

Graphix Coding @Skullpture Entertainmenthttp://www.skullpture.de
I don't mean to start a religious debate on the issue, but that source is, so far as I know, wrong. I will stand to be corrected, but whoever does so will have to demonstrate more knowledge of COM than me. =)

The DirectX architecture is COM. COM is defined similar to C++, but the marshalling that goes on "behind the scenes" in the DirectX interface is a system-level thing. Intentionally "language indenpendent." In the long run, it devolves to simply a calling an API.

Thus, how DirectX is called from one language is more or less the same as calling it from another.

------------------
DavidRM
Samu Games

I know I'm hammering this one a little, but I want people to become more aware of DirectX/Delphi Combination, especially using the Header conversions.

My site is at http://www.neoteric.force9.co.uk/

It's for delphi game programmers, I'm not a tru authority on the subject, but I'd like people to join me and build a great site.

A full game will be available for people to disect real soon.

Thanks to everyone who answered to my first message. I've learned a little from then, and managed to Blit something to the screen. There is no significant performance loss from Delphi with DirectX. Maybe using C/C++ helps on understanding the DirectX samples around the web, but everything can be translated into Delphi. Of course, COM is not language dependent.

My problem now is that most calculations are quite slow from Delphi (or maybe I am doing things wrong). So, next task is accesing the DirectX surfaces from inline assembler code. ¿Any ideas? I managed to fill a screen with colors, but I have some problems with backbuffer pointers swapping. ¿Has someone worked with some ASM stuff over DirectX surfaces?

Thanks everyone,

------------------
Signed,
macl

The Lobocom Demoworld
"fantastic world of demos"
http://www.lobocom.es/unknown

Signed,
macl

The Lobocom Demoworld
"fantastic world of demos"
http://www.lobocom.es/unknown

You can find source code for delphi & Direct X examples at : http://www.multimania.com/sanx

I wanted to make complete tutorials, but I don't have much time, so if you have some remarks or comments mail-me.

The subjects of examples are : Direct Draw, Direct 3d Immediate Mode, Direct Sound...

You can find other source code in my project (french) : http://www.multimania.com/k42

Laurent MASCHERPA ___________________________
laurent.mascherpa@epita.fr

I made a few tests and, it seems that it doesn't make any difference if you use DirectX with Delphi or with VisualC...
I can't tell which one is better. In some tests, VisualC seemed to be faster than Delphi, but in others Delphi is faster that VisualC. Ofcourse, this depends of the code you write, and how well optimized it is...

This topic is closed to new replies.

Advertisement