Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: DirectX programming  (Read 2288 times)

0 Members and 1 Guest are viewing this topic.

screaming

  • Sweet! I'mma go make me some popovers!
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2124
  • Last login:August 14, 2019, 03:15:34 pm
  • Registered lUser
    • shift eight (*) generation
DirectX programming
« on: March 13, 2006, 01:49:30 pm »
Anybody out there with any DirectX programming experience willing to give me a hand getting started? I have a project ready to go, but I spent the better half of last weekend and (quite literally) the entire weekend trying to get my sprites, textured triangle lists, and text to display properly. I have a framework in place but it seems I'm still missing some vital information that's just not sinking in.

PM me, shoot me off an email, or IM me.

Thanks!

-Steve.

screaming

  • Sweet! I'mma go make me some popovers!
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2124
  • Last login:August 14, 2019, 03:15:34 pm
  • Registered lUser
    • shift eight (*) generation
Re: DirectX programming
« Reply #1 on: March 14, 2006, 09:24:42 am »
Why can't I send attachments through a PM?

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 12:27:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: DirectX programming
« Reply #2 on: March 14, 2006, 06:53:45 pm »
I know directx very well, but you haven't really posted enough data for anyone to help you. 

What version of directx?  What coding language are you using to interface with it?  What video card are you using on your test rig (tremendously important if you are coding in dx8 or higher)?


I can help with small things, but in all honesty dx is a hard language to learn and doing just what you are doing (coding stuff for practice) is the best way to learn. 


Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: DirectX programming
« Reply #3 on: March 15, 2006, 05:18:10 am »
Try searching for some tutorials...I used a good one before, but I cannot find it now :(

screaming

  • Sweet! I'mma go make me some popovers!
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2124
  • Last login:August 14, 2019, 03:15:34 pm
  • Registered lUser
    • shift eight (*) generation
Re: DirectX programming
« Reply #4 on: March 15, 2006, 09:10:54 am »
Yeah I've been through about 3000 tutorials and I ended up with that screenshot above ;)

Because I like to torture myself, I'm using DirectX9 with the beta version of MDX for .Net 2.0. The API is pretty close to what you'd get with C++ but OO. If I can wrap my head around this then I can be confident that I "understand 3D programming", so that's why I started with this setup.

Actually, I'm pretty close to understanding it.  I just need practice and to fill in a few small gaps (obviously).

That screenshot above is the result of a TransformTextured quad with the h/w set to the dimensions of the bitmap (the blue area with yellow rectangle is actually a bitmap).  For some reason it's coming out deformed and not to 1:1 scale.  Since it's already transformed, no view, projection, or world transformations are applying to it so I don't understand why it's not coming out with the proper dimensions :(

There are a couple other small things that i don't quite understand yet, but if I can at least get something workkable I think it will just fall in line.

-Steve.
« Last Edit: March 15, 2006, 12:55:15 pm by screaming »

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: DirectX programming
« Reply #5 on: March 15, 2006, 10:37:10 am »
Graphically, I've only touched on DirectDraw (7 I think)...under VB6...

Typically I started a small game and never finished it.  I did get a bitmap for the background, and had an animated sprite (with transparencies) which you could move with the mouse.  Collision was next...I should really have another go at that.

screaming

  • Sweet! I'mma go make me some popovers!
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2124
  • Last login:August 14, 2019, 03:15:34 pm
  • Registered lUser
    • shift eight (*) generation
Re: DirectX programming
« Reply #6 on: March 15, 2006, 12:55:39 pm »
You should :)

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 12:27:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: DirectX programming
« Reply #7 on: March 15, 2006, 06:58:05 pm »
Dx9 isn't such a strange choice, but I would stick to a programming language that somebody has actually heard of.  ;)

One of the problems with px9 that you have to keep in mind is that even now, most cards aren't fully dx9 complaint, meaning half of those nifty effects they've added won't render unless they are in software mode. 


I don't know dx9 mostly because I HATE anything .net and that's all it'll run on.  And I can't really help you with syntax because I've never heard of mdx. 

Sorry.

screaming

  • Sweet! I'mma go make me some popovers!
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2124
  • Last login:August 14, 2019, 03:15:34 pm
  • Registered lUser
    • shift eight (*) generation
Re: DirectX programming
« Reply #8 on: March 15, 2006, 07:34:42 pm »
Meh.  MDX = Managed DirectX. "DirectX.NET" if you want to think about it that way.  Give me some D3D (not DD) code in C, C++, or VB and I'll translate it to C# (it's pretty easy, actually).

I have an image on disk that I want to load into a textured quad with the full height and width of the original image (so, basically, a skybar but using a TransformedTexure, because we care about the corners of the screen and the corners of the image matching up.


Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 12:27:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: DirectX programming
« Reply #9 on: March 15, 2006, 08:10:40 pm »
Well that's easy enough.

When you use the "loadtexturefromfileex" function, there is an option to send the image data back through a flag defined as a "d3dximage_info" variable type. This variable will give you the height and width, then you simply move your pre transformed poly's verticies based on those dimensions.  Pre-transformed verticies use standard pixel measurements, so its quite easy. 

BASSOFeeSH

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 255
  • Last login:May 29, 2009, 12:46:42 am
  • TD-2779
    • Trooper Armor
Re: DirectX programming
« Reply #10 on: March 16, 2006, 06:22:56 pm »
I don't know dx9 mostly because I HATE anything .net and that's all it'll run on.

DirectX9 does NOT only run on .NET.  That would be performance suicide for Microsoft.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 12:27:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: DirectX programming
« Reply #11 on: March 17, 2006, 11:22:41 pm »
That's not all it'll run on, but that's all it'll run on easily.  (Open source languages aside as they are all crap and I don't use em.)

nipsmg

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1753
  • Last login:July 11, 2025, 12:17:29 pm
  • ROONEY!! ERRGH!!
    • Arcadia
Re: DirectX programming
« Reply #12 on: March 19, 2006, 01:10:29 pm »
MDX (Managed DirectX) requires any CLR compliant language.  However, you can still program in directX 9 in unmanaged code using C++.


rdagger

Re: DirectX programming
« Reply #13 on: March 20, 2006, 02:30:04 am »
I just finished a commercial MDX program.  Microsoft's documentation is pathetic and the books are weak too.  If you go the managed route check out The Z-Buffer.  It is a great source for info and tutorials.