I don't know of anyone who has done Directx8, though that is exactly what I am looking for. I may have the old directx7 sdk if that is of any interest to you. By all means let me know when you are finished :alright:
Posted on 2001-07-18 18:27:36 by [=CC=]AMBUSH
Posted on 2001-07-18 19:00:08 by Aaro
Aaro thank you!!!! :)
Posted on 2001-07-18 19:26:33 by [=CC=]AMBUSH
Afternoon, Aaro.

Thanks for the 'include' files.

Your '*.inc' files are almost identical to mine (no wonder - there aren't too many different ways to translate them).:alright:

I noticed that you've commented out a few of the 'enum's, however I don't know yet if they're important (I'm probably nit-picking).;)

I'm almost finished with the 'd3d8types.inc' file anyway, so I might as well carry on with the translation so that people will have a choice (I'm using the 'STDMETHOD' macro from Bizzare Creations) . I'll then start on the d3dx8 headers.:eek:

After that, we may finally get more samples on D3d programming from translating the samples in the Platform SDK.

Cheers,
Scronty
Posted on 2001-07-18 21:11:54 by Scronty
Afternoon, Aaro.

Could you post your copy of 'OAIDL.inc' so that I can check your Dx8 include files?:alright:

I don't have it.:(

Cheers,
Scronty
Posted on 2001-07-18 22:12:25 by Scronty
Get MASM32 v6 service pack1 . It's part of Ernies COM library for MASM32.

Some of the enums are commented out because I don't know how to translate them to masm syntax.
Example:


typedef enum _D3DVSD_TOKENTYPE
{
D3DVSD_TOKEN_NOP = 0, // NOP or extension
D3DVSD_TOKEN_STREAM, // stream selector
D3DVSD_TOKEN_STREAMDATA, // stream data definition (map to vertex input memory)
D3DVSD_TOKEN_TESSELLATOR, // vertex input memory from tessellator
D3DVSD_TOKEN_CONSTMEM, // constant memory from shader
D3DVSD_TOKEN_EXT, // extension
D3DVSD_TOKEN_END = 7, // end-of-array (requires all DWORD bits to be 1)
D3DVSD_FORCE_DWORD = 0x7fffffff,// force 32-bit size enum
} D3DVSD_TOKENTYPE;


What value give to fields that have no equals sign after them?:confused:
Posted on 2001-07-19 05:04:01 by Aaro
Afternoon, Aaro.

What value give to fields that have no equals sign after them?


I was under the impression that during enumeration, the number increments by one unless it's given a new value.

e.g.


D3DVSD_TOKEN_NOP EQU 0
D3DVSD_TOKEN_STREAM EQU 1
D3DVSD_TOKEN_STREAMDATA EQU 2
D3DVSD_TOKEN_TESSELLATOR EQU 3
D3DVSD_TOKEN_CONSTMEM EQU 4
D3DVSD_TOKEN_EXT EQU 5
D3DVSD_TOKEN_END EQU 7 ;<--new value
D3DVSD_FORCE_DWORD EQU 7fffffffh
D3DVSD_TOKENTYPE TYPEDEF DWORD


Cheers,
Scronty
Posted on 2001-07-19 05:49:17 by Scronty
Thanks Scronty.
I have updated the file just download it from the same location.
If there's more "bugs" in the files let me know.

Btw. OpenGL kicks *ss =)
Posted on 2001-07-19 07:19:14 by Aaro
Is the CLSID for D3D8 in here anywhere? I would rather invoke an instance of it throught the OS than link with Directx8 dll (this would defeat the primary advantage of COM).

BTW I happen to love OpenGL (even been to SGI OpenGL training thanks to my company), however I want to program games and games (popular ones that make money) in DirectX (except ID Software games). Other wise I would write games for Linux in OpenGL :)
Posted on 2001-07-19 17:22:22 by [=CC=]AMBUSH
Programming in openGL does not make you an amateur or pro. Quake has proved that fast openGL implementations exist today. I have program in both (started with Direc3D then I went for openGL). And I must say that Direct3D took me a month to learn and with openGL I was programming in 2 days. OpenGL was a cleaner API than Direct3D back then. Now with DX8, Direct3D is getting to be very similar to openGL.

Programming in openGL does not force you to not use DirectSound, DirectPlay etc. Whats make a good sales game is: gameplay, graphics, audio, story, good publicity, but not the API.

Users (usually) dont care about the api or language you use. As long as your program works and dont crashes.
Posted on 2001-07-19 18:23:22 by dxantos
Afternoon, Ambush.

The IDs are near the top of the 'D3D8.inc' file.
Aaro and I seem to have the same idea of keeping the '*.inc' files as similar as possible to the original '*.h's. This will make it easier to follow the info in the Platform SDK, as well as tracking down errors.;)

Cheers,
Scronty
Posted on 2001-07-19 20:17:11 by Scronty
You misunderstood me. I LOVE openGL and believe that it is a very superior API (and pretty cross platform with the help of GLUT). But if I want a job programming games (which I do), I stand a far better chance (in today's market) with DirectX experience. The integration of sound , peripherials and 3D in one group of interfaces is hard to beat for writing games.
Posted on 2001-07-20 16:37:53 by [=CC=]AMBUSH
True, having experience in more than one API is a valuable asset.
Posted on 2001-07-20 17:38:04 by dxantos
Afternoon, all

Can anyone help me translate this:

;    VOID* pVertices;

; if( FAILED( g_pVB->Lock( 0, sizeof(g_Vertices), (BYTE**)&pVertices, 0 ) ) )
; return E_FAIL;


I don't understand the '(BYTE**)&pVertices' bit.:mad:

I've set 'pVertices' as:
LOCAL pVertices:PTR

Any help appreciated.

Cheers,
Scronty
Posted on 2001-07-20 23:54:29 by Scronty
Afternoon, Scronty.

Use:
LOCAL pVertices:PTR

mcall [g_pVB],IDirect3DVertexBuffer8_Lock, 0, sizeof g_Vertices, ADDR pVertices, 0


It works every time for me.:alright:

Cheers,
Scronty
Posted on 2001-07-21 01:15:23 by Scronty
Afternoon, all.

Has anyone had any luck including the 'd3dx8.lib'?:confused:

I've 'proto'd the functions I need from it (for the Matrices Tut), however the linker can't resolve '__finite', '__CIacos', and '__fltused'.:mad:

I've searched whole chunks of headers (plus their included headers) and I still can't find any reference to them.:eek:

Any help appreciated.

Cheers,
Scronty
Posted on 2001-07-21 06:30:12 by Scronty
Afternoon, Scronty.

I've only found the 'define' for '_finite':(, in two locations!
I only used the 'EQU' define:
;##################################

;(from 'ymath.h')
PUBLIC _finite
_finite EQU -1

;(from 'float.h')
;_CRTIMP int __cdecl _finite(double);
;##################################


In frustration ( after following ~20+ headers) I just EQUated the other unknown imports to -1:
;##################################

;(pulled out of thin air)
PUBLIC _CIacos
_CIacos EQU -1

PUBLIC _fltused
_fltused EQU -1
;##################################


It worked! :alright: (I hope they aren't important:( )

The Matrices tut (#3) is now working, and I can now carry on with the others.

Once I've finished the Tutorials, I'll post a message in this thread informing everyone where they are.

Cheers,
Scronty
Posted on 2001-07-23 20:57:07 by Scronty
I've also done these three D3D8-Includes by myself then start to
translate the D3Dx8-Samples.

The first tutorial works fine, but know i've to write some crap for
the uni ...

The reason I reply here is that at least three guys are working to translate the D3D8-Includes and my question is as follows:

What about sharing our work..?

Greetings ...

CALEB
Posted on 2001-07-24 16:29:23 by Caleb
There is also a fellow that runs http://bizarrecreations.webjump.com/
who has all the old directX headers done. We should really see if the 4 us can get together to create one centralized repository and .inc translation. In short, yes we should!

[=CC=]AmBuSh
Posted on 2001-07-24 18:16:53 by [=CC=]AMBUSH
Afternoon, all

I've posted the first 3 (of 6) Tutorials from the current Platform SDK (here).

They're pretty messy, however they do work.:)
The Tutorials still have the original 'c' code in them, so that you can see any mistakes:grin: , and hopefully learn how to translate some of the calls (like that (BYTE**)&pVertices stuff above^).

I'm (obviously) still learning how to translate this stuff myself.;)

I'd appreciate any help in the tranlation of the next Tutorial (lights).:mad:. The lighting works, however I haven't figured out the algorithm for generating the cylinder.

Is this the correct calculation for 'theta'?
;        FLOAT theta = (2*D3DX_PI*i)/(50-1);

.DATA
fpIG2xPI REAL4 6.283185308f ;(2*D3DX_PI)
fpIGDivBy49 REAL4 49.0f ;(50-1)
dwecx DWORd 0
thetaSIN REAL4 0.0f
thetaCOS REAL4 0.0f
rlneg1 REAL4 -1.0f
rl1 REAL4 1.0f
rl0 REAL4 0.0f
.CODE
push ecx
pop dwecx
fild dwecx
fmul fpIG2xPI
fdiv fpIGDivBy49 ;st(0) == theta
fsincos ;get the sin and cos of theta
fstp thetaCOS ;pop off cos(theta)
fstp thetaSIN ;pop off sin(theta)


Cheers,
Scronty
Posted on 2001-07-24 19:03:41 by Scronty