Skip to main content
gamedev.net
🔒 Locked

How do you code hardware support?

Started by BrentBarrett 6 replies 950+ views
Original Post
BrentBarrett
BrentBarrett
DirectX is fast because it uses hardware support. This recently made me wonder, does anyone know where to begin in learning how to code hardware support in our own applications? Let's say that as a project I want to create an art program similar to 3DS Max, or something equally implausible. Can anyone recommend any resources that could get me on my way to beginning to understand how it's done? Any websites or books would be grealy appreciated.
Aldenar
Aldenar
Actually, the best thing to do is to take advantage of the fact that DirectX has hardware support and use DirectX in your applications :) (Same applies to OpenGL)

That is what MAX is doing, it has a software renderer to ensure compatibility on all systems, but they also provide hardware accelerated DX and GL renderers.

This site has some good articles and tutorials for both APIs.
Promit
Promit
Coding an actual API type thing that has hardware acceleration is...difficult, to say the least. It requires a driver component to be functional, which means you'll either have to get a hold of the Windows DDK or develop for Linux.

After that, I have no idea [lol]
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
BrentBarrett
BrentBarrett
So programs like 3DS Max, Maya, and Photoshop are built off of DirectX or OpenGL?
Pipo DeClown
Pipo DeClown
Simple answer: forget it!

Like the others said, build something on top of Direct3D/OpenGL. Software Renderers are kinda very useless at the moment, but if you have some real complex calculations to make (which vertex/pixel shaders can't even do), THEN you need Software Renderers (which use ray-tracing to calculate each pixel's output).
MaulingMonkey
MaulingMonkey
In modern operating systems, you almost NEVER have DIRECT access (and I mean completely direct) to the hardware implementation.

Pretty much, it looks like this:

+-----------------+| THE HARDWARE    |+-----------------+|  OS  &  DRIVERS |+-----------------+|      APIs       |+-----------------+|    PROGRAMS     |+-----------------+


An old "operating system" that dosn't fit with this model is DOS. It looked similar to this:

+-----------------+|   HARDWARE      |+---------+       ||  OS     |       |+---------+-------+| APIs    |       |+---------+       ||    PROGRAM(S)   |+-----------------+


Although there were some APIs layering between the hardware and the program, they ended up being compiled into the progam itself. This is why many older DOS games have support for specific pieces of hardware ("soundblaster compatable").

Now, back to the modern world:

To access any piece of hardware, you use an API - or you write some assembly code, depending on wheither you're writing an application or a driver.

The two most popular 3D "low level" APIs (to which there are often drivers for each provided by a graphics card manufacturer) are OpenGL and DirectX.

One popular sound "low level" API is DirectSound.

Just a pair of examples.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.