Hi ! I just want to start a collection of DirectX8-examples here. So I offer the source of my little intro which is shipped with the latest version of my dx8-includes.

Get it here !

(I think, you have to redispose some files to get it assembled but who cares about ?)

Greetings, CALEB
Posted on 2001-09-23 19:06:12 by Caleb
No graphics on Win2k - only sound.

Can't wait to see it. :)
Posted on 2001-09-23 19:56:47 by bitRAKE
Uups ! I don't have it, but I wonder !?!
Posted on 2001-09-24 02:18:57 by Caleb
I have installed DX8, but your file (better: windows) states:
"D3DX8D.DLL" not found. What am I missing?
Posted on 2001-09-24 03:55:08 by beaster
Oh yes - you will find the dll in the entire dx8-sdk from microsoft or get it here together with the masm includes for d3dx8, d3d8 and ddraw.

Greetings, CALEB
Posted on 2001-09-24 04:47:52 by Caleb
D3D8 initialization failed!
surely i am the stupid but what is the problem?:stupid:
Posted on 2001-09-26 09:48:31 by piel
Same here Caleb:

The Stars
D3D8-Initialization failed !
Posted on 2001-09-26 15:43:01 by gscundiff
Hi Folks !

If you take a look at the D3DInit-procedure then you will see that the selected graphics-mode is set to (800 * 600, 32 Bit). Your GFX-Card should be capable of this mode.
Secondly I select the D3DCREATE_HARDWARE_VERTEXPROCESSING mode, so if you don't have a card which is capable of T&L then you should change this to D3DCREATE_SOFTWARE_VERTEXPROCESSING.

OK I know that the initialization isn't flexible at all, but that was not my aim really.
Posted on 2001-09-27 04:33:53 by Caleb
ok Caleb, I get the point... I have a Voodoo Banshee, and it does not support 32 bit color depth. :(
have I any chances to run some examples?:confused:
Posted on 2001-09-27 07:00:14 by piel
Well, try to change it to 24 bit. I do not know much about the banshee-card but it should be able to render transparent surfaces so it must support alpha-blending with surfaces. Changing the vertext-processing to software, the star-intro should run.

Greetings, CALEB

P.S.: Are there some others who want to offer their examples ?
(This was my basic intention here in this thread ...)
Posted on 2001-09-27 07:23:45 by Caleb
Well, I converted the first DX8 tut to spasm... Later I will actually code something cool in DX8, but this is an EXCELLENT start for me :)
Posted on 2001-09-27 14:02:51 by Kenny
Good stuff Kenny, but can we get into the habit of including sourcecode in our zips? I mean we'd rather see sourcecode than a binary any day !!! Not that a binary is a Bad Thing, its just not useful to anybody wanting to avoid reinventing the wheel :)


<Known to be Inventively Lazy>
Posted on 2001-09-29 15:35:23 by Evil Homer
Good stuff Kenny, but can we get into the habit of including sourcecode in our zips? I mean we'd rather see sourcecode than a binary any day !!! Not that a binary is a Bad Thing, its just not useful to anybody wanting to avoid reinventing the wheel :)


<Known to be Inventively Lazy>
Posted on 2001-09-29 15:42:37 by Evil Homer
Well, that's just the thing, the source is included. If you wish to view it, just open up the exe file in your favorite text editor to see the source, or you can go to http://betov.free.fr/SpAsm.html to get spasm, and open the exe to see the source and also compile the program.

If you're a newbie, I wouldn't recommend this source because, well, it's not the easiest to read, but rather go to http://www16.brinkster.com/scronty/ and download some tuts for MASM, because those about 10 times easier to read because MASM clears the stack for you, and in SpAsm, you have to know enough of what you're doing to clear the stack yourself. (sucks, but it's part of working with MS stuff)
Posted on 2001-09-30 01:15:13 by Kenny
Hello to everyone ...

At last I finished to install Win2K (Prof.) on my PC (still a K6-II at 500 Mhz and a Geforce 256 Pro graphicsadapter) with SP2 and the official DirectX8 for it. And the example runs !

Greetings, CALEB !
Posted on 2001-10-04 18:53:00 by Caleb
Yeah, I could have told you that :)
Posted on 2001-10-04 20:30:52 by Kenny
Afternoon, All.

I've attached a *Triangle-Strip* example.
If you need the *includes* for it, get them <Here >.

It creates a square using a triangle-strip. There are *garbage-vertices* being created at the end of each row, however the only way to do it properly is to use a Triangle-List.

Thanks go to Walter for the initial creation code.

Cheers,
Scronty
Posted on 2001-10-25 17:23:33 by Scronty
Originally posted by Scronty

It creates a square using a triangle-strip. There are *garbage-vertices* being created at the end of each row, however the only way to do it properly is to use a Triangle-List.

Thanks go to Walter for the initial creation code.


Thanks!

Anyway, I've been working on an example based on your design -- So I can give you the same credit :)

This example creates an isometric grid using a triangle-strip to combat the problem of now termed *garbage verticies*. The code is *not* optimized, but it should work. It may or may not be very helpful, but it will give you can example of another way to represent a grid.

So anyway, go ahead and modify the program and see what turns up...
Posted on 2001-10-26 02:14:36 by Sliver
Could you explain your isometric code sliver? I went over the code 3 times now and I can't figure out how you don't have ANY garbage vertexes... I can't see it yet...
Posted on 2001-10-27 15:35:26 by Kenny
Afternoon, Sliver :p.

The *Triangle-Strip* gets created like this:


2 4 6
/ \ / \ / \
/ \ / \ / etc ...
1 3 5


My code does this:


2 2 2
| \ | \ | \
| \ | \ | etc ...
1 1 1

... until it reaches the end of a row.
Then it does this:


2 2 2
/ | / | / |
... | / | / |
1 1 1<
2 2 2^(move up one row)
| \ | \ |
| \ | \ |
1 1 1

The *garbage vertices* get created between the *last* vertice on current row, and the *first* vertice on the next row (where the little arrows are).
They can't be seen because they are using the same vertice for the position (i.e. they use the same point coordinates).

Your code seems to be doing this:


2 2
/ | 4 / | 4 etc ...
1 | / 1 | /
3 3

As you can see, the vertices of *1* and *4* are the same. There are *garbage vertices* being created at *3,4,1* and *4,1,2*. However, they're on the same *line*, so you can't see them (just like at the end of the rows in my code).

Hope this clears it up a bit.

Cheers,
Scronty
Posted on 2001-10-27 23:35:45 by Scronty