FBXL - Simple DirectX Library

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

FBXL - Simple DirectX Library

Postby ~EXIS~ » Jan 21, 2008 18:30

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: 7825
Joined: May 28, 2005 3:28

Postby D.J.Peters » Jan 21, 2008 19:38

nice no fun with OpenGL for Lin and Win ?

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

Postby 1000101 » Jan 22, 2008 4:44

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:

Postby KristopherWindsor » Jan 22, 2008 6:46

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

Postby ~EXIS~ » Jan 22, 2008 6:51

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

Postby Antoni » Jan 22, 2008 9:42

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

Postby JohnB » Jan 22, 2008 11:16

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: 773
Joined: Jul 28, 2005 13:56
Location: Brazil, Santa Catarina, Indaial (ouch!)
Contact:

Postby Mysoft » Jan 22, 2008 15:49

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

Postby Antoni » Jan 22, 2008 19:30

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

Postby ~EXIS~ » Jan 23, 2008 14:47

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: 773
Joined: Jul 28, 2005 13:56
Location: Brazil, Santa Catarina, Indaial (ouch!)
Contact:

Postby Mysoft » Jan 23, 2008 19:14

~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:

Postby KristopherWindsor » Jan 23, 2008 19:21

...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:

Postby sir_mud » Jan 24, 2008 1:01

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

Postby ~EXIS~ » Jan 25, 2008 21:16

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.
D.J.Peters
Posts: 7825
Joined: May 28, 2005 3:28

Postby D.J.Peters » Jan 25, 2008 22:18


Return to “Windows”

Who is online

Users browsing this forum: No registered users and 1 guest