Direct 3D
-
- Enthusiast
- Posts: 384
- Joined: Sat May 24, 2003 8:02 pm
- Location: Canada
- Contact:
Direct 3D
Someone had a example of Direct 3D (directx a while back. I think it displayed 8000 cubes ?? anyway I thought it was amazingly fast rendering it on an old machine, and it would be great to get some example code online ... Just to get a head start on accessing DirectX 8. Purebasic is very fast ...
<br>"I deliver Justice, not Mercy"
    - Codemonger, 2004 A.D.
    - Codemonger, 2004 A.D.
Here: viewtopic.php?t=6026
-
- Enthusiast
- Posts: 384
- Joined: Sat May 24, 2003 8:02 pm
- Location: Canada
- Contact:
I was hoping I wouldn't have to rewrite the wheel ... thanks for pointing out the post again. Anyway I'll start rewriting the headers, but whatever I come up with, I'll post the code online in progress, as I'm sure I'm not the only one trying to accomplish the same thing with Directx.
Thanks
Thanks
<br>"I deliver Justice, not Mercy"
    - Codemonger, 2004 A.D.
    - Codemonger, 2004 A.D.
-
- Enthusiast
- Posts: 384
- Joined: Sat May 24, 2003 8:02 pm
- Location: Canada
- Contact:
Ok ... I just played around with PureBasic & PowerRender Trial ---- a directx 9 SDK -- it uses normal Dll's (as far as I know) ... anyway this is what I came up with so far --- creating a simple fullscreen window --- it does nothing at the moment ... but I'll play around tonight with it.
Anyway this is my first app in purebasic so don't make fun of my code please ...
Anyway this is my first app in purebasic so don't make fun of my code please ...
Code: Select all
OpenLibrary(1, "PowerRender5Trial.dll")
;**************************** Initialize ************************
CallFunction(1,"PR_Initialize",1500)
CallFunction(1,"PR_DetectD3D")
CallFunction(1,"PR_InitializeD3D")
;***************************************************************
OpenWindow(1,100,150,450,200,#PB_Window_Invisible,"DirectX Test")
CallFunction(1,"PR_SetWindow",WindowID(1),0)
CallFunction(1,"PR_SetMode", 640, 480, 60)
Repeat
EventID=WaitWindowEvent()
Until EventID=#PB_EventCloseWindow
;************************ ShutDown ***************************
CallFunction(1,"PR_ShutDown")
;****************************************************************
CloseLibrary(1)
<br>"I deliver Justice, not Mercy"
    - Codemonger, 2004 A.D.
    - Codemonger, 2004 A.D.
-
- Enthusiast
- Posts: 384
- Joined: Sat May 24, 2003 8:02 pm
- Location: Canada
- Contact:
Uhmm ... I'm translating a huge amount of structures from Power Render to PureBasic ... anyway I need some help on this one ... it is pointing to a directx 9 structure (LPDIRECT3DINDEXBUFFER9).. I checked it out and the structure starts to get a little complex from here also what do I do with the:
void * next; ??
if anyone can help thanks ..
void * next; ??
Code: Select all
typedef struct
{
LPDIRECT3DINDEXBUFFER9 ib;
PR_DWORD NumVertices;
PR_DWORD NumIndices;
void * next;
} PR_LODVERTEXBUFFER;
if anyone can help thanks ..
<br>"I deliver Justice, not Mercy"
    - Codemonger, 2004 A.D.
    - Codemonger, 2004 A.D.
-
- Enthusiast
- Posts: 384
- Joined: Sat May 24, 2003 8:02 pm
- Location: Canada
- Contact:
Thanks Fred ... the *next.l is very helpfull. I'm moving along very nice. I understand if Traumatic does not want to publish the headers yet, it's lots of hard work. In the meantime this is a really good way for me to get used of programming in purebasic. I've taken to it already
BTW I'm using the power render manual to get all the information on structures,variables,constants and stuff as opposed to using the header files... It makes it much easier, and it's much better organized.
BTW I'm using the power render manual to get all the information on structures,variables,constants and stuff as opposed to using the header files... It makes it much easier, and it's much better organized.
<br>"I deliver Justice, not Mercy"
    - Codemonger, 2004 A.D.
    - Codemonger, 2004 A.D.
get the conversion of d3d.h here http://files.connection-refused.org/d3d.h.pb
and d3dcaps.h.pb here: http://files.connection-refused.org/d3dcaps.h.pb
these are for version 7
and d3dcaps.h.pb here: http://files.connection-refused.org/d3dcaps.h.pb
these are for version 7
Good programmers don't comment their code. It was hard to write, should be hard to read.