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.

Dark GDK / Converting D3DFunc.dll to use in DGDK.Net

Author
Message
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 7th Dec 2008 21:35
I am trying to convert my dll for use in DGDK.net and am experiencing some problems.

I currently use VC++ 2003 to compile the dll. This doesn't appear to have the options required to convert for use with DGDK.net. Therefore I have downloaded VC++ 2008 and recompiled the dll adding the /clr switch.

The problem is compilation fails due to the following error:-

".\D3DFunc.rc(10) : fatal error RC1015: cannot open include file 'afxres.h'."

As I have VC++ 2008 Express I am unable to edit the .rc file.

Would somebody who knows what they are doing (not me by the looks of it!) download the current source from my website and have a look at getting this working.

I this it would benefit the community to do this. Alternatively, if they could maybe let me know exactly what is required to do this I would quite happily do the work myself.

Sorry if this sounds dumb, but I havent got a clue about this.

sydbod
16
Years of Service
User Offline
Joined: 14th Jun 2008
Location: Just look at the picture
Posted: 8th Dec 2008 03:57 Edited at: 8th Dec 2008 03:58
QUOTE FROM ANOTHER SITE:

Fatal error RC1015: cannot open include file 'afxres.h'.

Oddly enough, VC++ adds afxres.h to resource files even when you aren't using an MFC project, and yet the file may only be installed if you install MFC. This particular file isn't actually required, so to fix the error you can edit the .rc file in notepad and replace both occurrences of "afxres.h" with "winres.h" (note that there should be two of them, and you need to change both).
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 8th Dec 2008 15:09
Let me know if you need further assistance with getting the DLL into a DGDK.NET plugin. If you've looked at the example plugin provided with the toolkit, this should give you a good idea on how they need to be done.

Paul.

Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 9th Dec 2008 10:34
Paul,

I'm still having problems. Not sure if some are down to using VC++ 2008 Express.

Firstly if I try to compile your example as is I get an error as afxwin.h cannot be found.

If I take a copy of your project and remove the references to afxwin by removing stdafx.h and .c I get a problem because CWinApp is not defined.

Not sure how I can progress this. I have VS2003 but only the express edition on VC++ 2008. The company I work for have no intention of upgrading my version as they are happy with 2003 unfortunately.

Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 9th Dec 2008 11:35 Edited at: 9th Dec 2008 11:47
Well just in case it helps, I've tried to compile source code for D3DFunc v3.7, using VC++ 2008, standard edition, and I don't get the 'afxres.h' problem.
Instead I get this one:

Cannot open include file: 'sCamera.h': No such file or directory

I did a search for that file, but I cannot find it

[Edit: I managed to port a previous (and simplified) d3dfunc version into vs2005 some time ago, not to be compiled as a dll, but regular functions and headers, this is the link: https://forumfiles.thegamecreators.com/download/1259621
I hope all this helps for a DGDK version to be baked too...]
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 9th Dec 2008 12:02
I've emailed you the latest source. It no longer uses sCamera for DPB7+.

Attached is Scamera.h anyway.

Attachments

Login to view attachments
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 10th Dec 2008 16:27
Thanks, well the source you sent to me still uses that 'sCamera.h'
I dropped it in the includes path, and the project compiles in vs2008 standard. This is the output:



Please let me know if I can assist with anything else.
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 10th Dec 2008 18:50
Morcilla,

I changed the project to include managed code. You may want to take that out as it removes some of the warnings.

Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 18th Dec 2008 20:50
I have been coding my Plugin over the last few days using SlimDX for the .Net library access and having a great time doing it . Everything has been going very nicely and I have converted the Text as 2D commands successfully.

However, I have now got to the point of converting the 3d object code (Teapot, Taurus, 3DText) and I have discovered a problem. There are some functions that seem to be missing from the Basic3d library. The are the following :-



Can you point me to the right methods or are these really missing.

kBessa
18
Years of Service
User Offline
Joined: 8th Nov 2006
Location: Manaus, Amazonas, Brazil
Posted: 18th Dec 2008 21:25
Hi Cloggy,

I also noticed these functions were missing a long time ago, I asked APEXnow to add them but they were not included in this release.

About the Text commands, I just downloaded your plugin for DBPro and I think it's kind of similar to my LightText. Although I'd like to see the rest of D3DFunc available in DGDK.NET.

[center][center]
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 18th Dec 2008 23:24 Edited at: 19th Dec 2008 00:00
It's a shame. The only really useful function that is removed is the 3DText one. I suppose I could save the mesh to disk and load it into a DGDK object. A bit clumsy but it will suffice until something better comes along.

It was your plugin that pointed me to SlimDX thanks. It's tempting to write a wrapper around that to act in a similar way to DarkGDK.net. A project I may pursue in the long term

EDIT - Kbessa, could you try out the following code for me please. It seems to fall over here everytime I call the Mesh.ToXFile line. Obviously I have declare the mesh variable elsewhere. Also as you can see this is in VB.Net rather than c#. I'm just interested to know if the call crashes. Maybe a bug in SlimDX?



APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 19th Dec 2008 00:07
Cloggy,

Sorry mate, I can add those missing functions as required.

Paul.

Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 19th Dec 2008 00:21
Paul,

That would be fantastic if possible. I'm trying to get around it at the moment but as you can see I've hit a stumbling block with slimDX anyway.

Obviously I know you are very busy at the moment and I understand that it may be a little while before this would be done. I have lots of other bits to code anyway. To be honest, this release has rejuvinated my programming enthusiasm. I code all day at work, but now I really look forward to my evenings work. Thanks!

Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 20th Dec 2008 21:47
Got the 3d Object commands working. The next problem is getting the camera data using the



Command. This returns a UInteger. How do I fill a structure with the data at this return address. I'm using VB.Net. Maybe it's something I can't do. Could the method be changed to provide a CameraData structure that would defined in the DarkGDK.net class?

For example.



kBessa
18
Years of Service
User Offline
Joined: 8th Nov 2006
Location: Manaus, Amazonas, Brazil
Posted: 20th Dec 2008 22:07
Hi Cloggy, I will try that as soon as possible, I'm just finishing up some things from work.

@APEXnow: I think we should discuss some of these things that could be added. I've also wondered about the camera like Cloggy, but it would be better to have more things available directly from DGDK.NET. I might help you out if I can.

[center][center]
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 20th Dec 2008 22:56
Kbessa,

This is the code I came up with in the end. Seems to work well.



AlexI
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 21st Dec 2008 00:08
Hi,
Any chance any of you could help me make a function to create 3d text using the direct x in Dark GDK. I really need this to display the players name above them.

Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 21st Dec 2008 00:54
AlexI,

If you download the d3dfunc source from my website (click on sig) the function in there. I think someone may already have converted this for the GDK.

Login to post a reply

Server time is: 2024-11-25 09:23:08
Your offset time is: 2024-11-25 09:23:08