Author Topic: Blitz 3D Direct x 9 Userlib  (Read 5457 times)

0 Members and 1 Guest are viewing this topic.

Offline Hotshot

  • DBF Aficionado
  • ******
  • Posts: 2114
  • Karma: 91
    • View Profile
Blitz 3D Direct x 9 Userlib
« on: October 28, 2013 »
One guy called Ploppy who made Blitz 3D Directx 9!

Well I've hit a bit of a snag with my very ambitious project Chipmunk, so I've decided to put it on hold. It just needs more maniability that I can't get out of Direct x 7 (resident in Blitz). So to remidiate this problem I'm having, I have decided to do something as equally ambitious, to create a direct x 9 userlib that will replace the blitz commands. I only begun ten days ago, but have come very far already with 85 commands under my belt. This userlib is incomplete, you will only be able to do a certain amount of things, but am releasing this first version to show where I am with it. I intend to continue with this project and cover as many blitz commands as possible, keeping with each commands parameter number, order and type so as to maximize compatibility. I also intend to release further free (no strings attached at all) versions of this on the blitzbasic site (hoping to be able to complete it, I have already come pretty far). I know there is a lot of demand amongst us blitz users since many a year, so I wish to share it with you all to keep blitz alive. I think blitz3d deserves a DX9 version, will give it a new lease of life I personally think. Love to know your opinion.

Please note that any commands that have optional parameters in the original blitz3d version are obligitory. Otherwize, things remain the same. For example EntityX#(entity,[global]) become dEntityX#(entity,global).

All directx9 commands are preceded by a d.

Command list available in this version....

dCountGfxDrivers%() - Fully functional
dGraphics3D%(width%,height%,depth%,mode%,vsync%) - Vsync is a new parameter, not yet implmented but will choose if vsync on or off
dEndGraphics()- Fully functional
dShowMouse()- Fully functional
dHideMouse()- Fully functional
dKeyDown%(key%)- Fully functional
dMouseDown%(button%)- Fully functional
dGetMouse%()- Fully functional
dMouseHit%(button%)- Fully functional
dWaitMouse()- Fully functional
dMouseX%()- Fully functional
dMouseY%()- Fully functional
dMouseZ%()- Fully functional
dMoveMouse(x%,y%)- Fully functional
dFlushMouse()- Fully functional
dMouseXSpeed%()- Fully functional
dMouseYSpeed%()- Fully functional
dMouseZSpeed%()- Fully functional
dKeyHit%(key%)- Fully functional
dFlushKeys()- Fully functional
dWaitKey()- Fully functional
dLoadFont%(filename$,height,bold,italic,underline) - doesn't do much for the moment but wont crash out
dCls()- Fully functional
dClsColor(red#,green#,blue#)- Fully functional
dFlip(vsync%)- Fully functional
dFrontBuffer%() - don't use, does nothing for the moment
dBackBuffer%()- don't use, does nothing for the moment
dColor(red%,green%,blue%)- Fully functional
dPlot(x%,y%)- don't use, does nothing for the moment
dCreateMesh%()- works but render system will not show yet
dCreateCamera%()-Fully functional
dPositionEntity(entity%,x#,y#,z#,global%)-Functions only with global position for moment
dCreateTeapot%() - New command, taken from directx function - self explanatory
dRenderWorld(tween%) - tween bit don't work for the moment
dAddVertex%(surface,x#,y#,z#,u#,v#,w#) - works but won't render for the moment
dCreateSurface%(mesh) -ditto
dCountVertices%(surface%) -fully functional
dVertexColor(surface,index,red#,green#,blue#,alpha#)-fully functional
dVertexRed%(surface,index) -fully functional
dVertexGreen%(surface,index)-fully functional
dVertexBlue%(surface,index)-fully functional
dVertexAlpha#(surface,index)-fully functional
dVertexTexCoords(surface,index,texture_u#,texture_v#,texture_w#,coord_set)-fully functional
dVertexNormal(surface,index,x_normal#,y_normal#,z_normal#)-fully functional
dVertexX#(surface,index)-fully functional
dVertexY#(surface,index)-fully functional
dVertexZ#(surface,index)-fully functional
dVertexNX#(surface,index)-fully functional
dVertexNY#(surface,index)-fully functional
dVertexNZ#(surface,index)-fully functional
dVertexU#(surface,index)-fully functional
dVertexV#(surface,index)-fully functional
dVertexW#(surface,index)-fully functional
dCountSurfaces%(mesh)-fully functional
dClearSurface(surface,vertices,triangles) - needs some work
dAddTriangle%(surface,vertex_1,vertex_2,vertex_3)-fully functional but of course wont render for the moment
dCountTriangles%(surface)-fully functional
dTriangleVertex%(surface,triangle_index,corner)-fully functional
dCameraViewport%(camera,x,y,width,height)-fully functional
dCameraClsColor(camera,red,green,blue)-fully functional
dCameraProjMode(camera,projection_mode)-fully functional
dCameraRange(camera,near#,far#)-fully functional
dCameraClsMode(camera,cls_color,z_buffer)-needs a bit of work yet but almost there
dCameraAspect(camera,aspect_ratio#)- new commands, can now control screen aspect ratio for funky fx (default=screen w/screen h)
dAutoCameraAspect(camera)- will set aspect ratio to default
dCameraFOV(camera,focus#)-another new command, set camera's field of view angle
dGetCameraFOV#(camera) - retrieve current FOV value for camera
dGetCameraAspect#(camera) - get cam's aspect ratio
dCreateTorus%(inner_radius#,outer_radius#,sides,rings) - -fully functional
dCreateCube%()-fully functional
dCreateCylinder%(radius1#,radius2#,length#,slices,stacks)-fully functional
dCreateSphere%(radius#,slices%,stacks%)-fully functional
dFreeEntity(entity%)-fully functional
dEntityParent(entity%,parent%)-fully functional
dCountChildren%(entity%)-fully functional
dGetChild%(entity%,index%)-fully functional
dEntityClass$(entity%)-fully functional
dGetParent%(entity%)-fully functional
dNameEntity(entity%,name$)-fully functional
dEntityName$(entity%)-fully functional
dEntityX#(entity%,global%)-only works with global param set to true for the moment
dEntityY#(entity%,global%)-only works with global param set to true for the moment
dEntityZ#(entity%,global%)-only works with global param set to true for the moment
dRotateEntity(entity%,pitch#,yaw#,roll#,global%) --only works with global param set to true for the moment
GetMatElement#(entity%,row%,column%) -fully functional
dCreateTexture%(width%,height%,flags%,frames%) - fully functional but renderer will not yet show texture so for the moment a little bit useless
dTurnEntity(entity%,pitch#,yaw#,roll#,global%) - works in global mode
dMoveEntity(entity%,x#,y#,z#) - glitchy, won't crash but needs work
dTranslateEntity(entity,x#,y#,z#,global) - work in global mode
dEntityRed%(entity%) - new command, get red element of entity color
dEntityGreen%(entity%) - same as above but for green element
dEntityBlue%(entity%) - yup, you've guessed it...!
dEntityColor(entity%,red%,green%,blue%) - fully functional
dAmbientLight(red%,green%,blue%)- fully functional

Offline Pot Noodle

  • Sponsor
  • Amiga 1200
  • *******
  • Posts: 271
  • Karma: 15
  • Computers have lots of memory but no imagination
    • View Profile
Re: Blitz 3D Direct x 9 Userlib
« Reply #1 on: October 30, 2013 »
Nice HotShot, I don't use Blitz myself but i am sure the guys over there will love this.  :goodpost:

Keep up the good work, O'ya XJ220 is coming along well.

Karma + 1

Offline antarman

  • ZX 81
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Re: Blitz 3D Direct x 9 Userlib
« Reply #2 on: September 20, 2014 »
This don't work in XP!