FBXL - Simple DirectX Library

Windows specific questions.
~EXIS~
Posts: 21
Joined: Sep 01, 2006 18:57
Location: RUSSIA

FBXL - Simple DirectX Library

Post by ~EXIS~ »

Have Types:

XMesh - Mesh, Materials, Textures
XState - d3dmatrix of position
XObject = XMesh+XObject
XCamera - matrix of world
XWindow - hwnd
XDevice - Direct3D device

Support only one subsets Models when arrays in types not supported

Smple of program:
'------------------------------------
' FBXL Meshes application
'------------------------------------

#include once "fbxl.bas"

Dim As XWindow win
Dim As XDevice dev
Dim As XObject obj

MakeWindow(win,"Meshes example",400,400)
InitDirectX
MakeDevice(dev,win)
LoadObject(dev,obj,"tiger.x")

do while( TestOnQuitMessage() = 0 )
ClearScene(dev,RGB( 0, 0, 0 ))
XRotate(obj, timeGetTime() / 1000.0)
SetCamera(dev,0.0, 2.0,-2.0, 0.0, 0.0, 0.0)
DrawObject(dev,obj)
ShowScene(dev)
loop

FreeObject(obj)
FreeDevice(dev)
FreeDirectX
FreeWindow(win)
End 0
Download from (press link on orange line for download):
http://www.deck4.narod.ru/FBXL005.rar

http://www.deck4.narod.ru/first.jpg
Last edited by ~EXIS~ on Jan 25, 2008 21:17, edited 1 time in total.
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Post by D.J.Peters »

nice no fun with OpenGL for Lin and Win ?

Joshy
1000101
Posts: 2556
Joined: Jun 13, 2005 23:14
Location: SK, Canada

Post by 1000101 »

Pretty neat, although I'd release it as a static/dynamic library instead of including it as a module. Even if you released it as a module, you should only include the include file and compile the module as a separate module.

ie:

fbc myprogram.bas fbxl.bas
KristopherWindsor
Posts: 2428
Joined: Jul 19, 2006 19:17
Location: Sunnyvale, CA
Contact:

Post by KristopherWindsor »

This is an interesting project. ;-)
If you could make functions like the ones in FBGFX (Put, Screenlock / Screenunlock / Screensync, Line, etc.) I would like to see how fast it can go.

BTW, I cannot find the DLL file. :-/ Where can I get it?

:-)
~EXIS~
Posts: 21
Joined: Sep 01, 2006 18:57
Location: RUSSIA

Post by ~EXIS~ »

D.J.Peters wrote:nice no fun with OpenGL for Lin and Win ?

Joshy
100% OpenGL be not supported, the freebasic forum have any threads about OpenGL, and OpenGL not so strong API for programming, programms writed with DirectX have so dirty code, and need special librares for simple use.

1000101

Maybe im release it as a library, but i wont be release it as a bas files with "transparency" code for all.
Antoni
Posts: 1393
Joined: May 27, 2005 15:40
Location: Barcelona, Spain

Post by Antoni »

DX diag says i have dx9c installed but your samples complain about a missing d3dx9d.dll....
JohnB
Posts: 236
Joined: Jul 22, 2005 3:53
Location: Minnesota Arizona

Post by JohnB »

Antoni,

DX9c seem to have many versions. I recently installed Flatout 2, Gothic 3 and Silent Hunter Wolfs of the Pacific and had to install the DX9c on the disk to make them run on an XP system. I do not know if this is the problem your having. I have d3dx9_24.dll thru d3dx9_31.dll on my 98se system. If I remember there are more versions(?) on my XP system.

JohnB
Mysoft
Posts: 836
Joined: Jul 28, 2005 13:56
Location: Brazil, Santa Catarina, Indaial (ouch!)
Contact:

Post by Mysoft »

d3dx9d.dll is a stub version... MSDN says that mingw have a .a version of this (that dont need the .dll) since you need to have SDK to have this d3dx9d.dll file o.o

also your .jpg screenshot is actually a .bmp renamed =x
Antoni
Posts: 1393
Joined: May 27, 2005 15:40
Location: Barcelona, Spain

Post by Antoni »

And to get the SDK you need to validate your Windows XP....
~EXIS~
Posts: 21
Joined: Sep 01, 2006 18:57
Location: RUSSIA

Post by ~EXIS~ »

Antoni wrote:DX diag says i have dx9c installed but your samples complain about a missing d3dx9d.dll....
Rename d3dx9_??.dll to d3dx9d.dll and copy it to application directory.
Mysoft
Posts: 836
Joined: Jul 28, 2005 13:56
Location: Brazil, Santa Catarina, Indaial (ouch!)
Contact:

Post by Mysoft »

~EXIS~ wrote:
Antoni wrote:DX diag says i have dx9c installed but your samples complain about a missing d3dx9d.dll....
Rename d3dx9_??.dll to d3dx9d.dll and copy it to application directory.
CRASH
KristopherWindsor
Posts: 2428
Joined: Jul 19, 2006 19:17
Location: Sunnyvale, CA
Contact:

Post by KristopherWindsor »

...Which works especially well if you have a DLL to rename in the first place. :-P
I still don't have one, I don't think... ;-)
sir_mud
Posts: 1401
Joined: Jul 29, 2006 3:00
Location: US
Contact:

Post by sir_mud »

afaik d3dx8d.dll is the debug version of the dll, you can get it by installing the directx sdk from microsoft http://msdn2.microsoft.com/en-us/directx/default.aspx
~EXIS~
Posts: 21
Joined: Sep 01, 2006 18:57
Location: RUSSIA

Post by ~EXIS~ »

5 version of library
http://www.deck4.narod.ru/FBXL005.rar

Additionals:
Fast rotate translate object #defines.
Correct camera set.
Now for drawing not needed XCamera structure.
function TestOnQuitMessage for test on WM_QUIT message
With fuction MakeHWindow you can make windows with handler function.
Make doc documentation
Add Viewports (look sample)

Code is be more shortly without XCamera and Translate\Dispatch message look first post.

Mysoft I'm use D3DX9D_36.dll it dll from november 2007 directX sdk. But you can find another versions in C:\WINDOWS\system32 directory rename it and copy to application directory. And is variant you need install new version of DirectX.
Post Reply