Graphics engine C++, Game in Delphi ?

Started by
7 comments, last by UnshavenBastard 22 years, 2 months ago
Hi there! I wonder if my friends, who are pure OO-Pascal programmers, and use Delphi only, could use my Graphics Engine, which is written in C++ (uses OpenGL), to make their game in Delphi. I think it''s Delphi 5. I currently use watcom c++ 11, it has a pretty good compiler, but M$'' and Borland''s IDEs are quite tempting, maybe I''ll save some money and purchase one of them. (Before this happens: this is absolutely the wrong thread for trying to convince me that the one product is better than the other. __I__ will decide. (and I am the wrong person to try this with anyway) I give this information because it could be useful for someone to give me a useful answer, about what I _could_ do if I used this one, or the other one...) thanks in advance. the unshaven bastard
Advertisement
(without reading body)
Why not?

------
Package your graphics engine with a dll, then Delphi should be able to interface with it. I''m not totally sure about the syntax /actual code /project settings involved, but a quick search on google.com should find what you need to know,

------------------------------
BCB DX Library - RAD C++ Game development for BCB
Surely Delphi can import compiled bytecode (dlls).... assuming that C++ name mangling doesn''t become an issue and you have a Delphi compatible import library.... I''m probably completely wrong, but since DLLs are already binary data, surely it can be used....
Indeed

Back in the days I programmed VB (seems centuries ago ) I made C++ DLLs all the time... although I didn''t use APIs like OpenGL or DirectX in ''em. (Did not know how to back then)
Well, you could just package your engine into a library like a DLL on Windows. That should work because the library would just be a binany file.
Either with dlls, but we are also having sucess connecting delphi and C++ builder code directly with obj files.

regards
Jindrich Kolman
regardsJindrich KolmanLibs
The easiest way is to make a DLL with standard C functions as the interface. Classes are not compatible between C++ and Delphi.

Cirion, Delphi does not use import libraries like C. You just need the unit that declares the functions.

Steve ''Sly'' Williams  Monkey Wrangler  Krome Studios
turbo game development with Borland compilers
Steve 'Sly' Williams  Monkey Wrangler  Krome Studios
turbo game development with Borland compilers
COM is the M$ technology to share binary object code between system like this. It actually works fairly well for C++->Delphi.
(So long as they have the service packa for Delphi install).

If you''re stuff isn''t OO, just use a normal dll. (The COM way is still a dll, but with some standard exports in it).
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

Ah, thanks for the replies, guys :-)


has anyone a link to a tutorial for building dlls ?
(for the case that I don''t find what I''m looking for,
however, searching now...)

This topic is closed to new replies.

Advertisement