DX7 2d/3d DLL for B3d?

Miscellaneous Forums/General Discussion/DX7 2d/3d DLL for B3d?

Would it be possible to create a Dynamic Link Library in Blitzmax using the DirectX7 driver to give Blitz3D 2d in 3d commands?

It could be done as Blitz keeps all its stuff in the runtime.dll which is just compiled into the exe on create exe. You would have to wrap everything which would be a pain in the ass though. Gman could do it! :)

Why would you want to do this? The BlitzMax 2D in 3D commands are very simple, they are just creating textured quads. You could to this natively in Blitz3d, it's very fast and very easy to do. Blitz3d also gives you greater flexibility such as camera movement and lighting, you don't get these in BMax without getting under the covers and writing your own code.

BMAX Code - What does this do? Creates a square Quad calculated with transformations (Rotation and Scaling) and textures it. Simple.
Method DrawFrame( frame:TDX7ImageFrame,x0#,y0#,x1#,y1#,tx#,ty#)
		If islost Return
		Local	uv#[]
		uv=frame.xyzuv
		uv[0]=x0*ix+y0*iy+tx
		uv[1]=x0*jx+y0*jy+ty
		uv[2]=zPosition#
		
		uv[5]=x1*ix+y0*iy+tx
		uv[6]=x1*jx+y0*jy+ty
		uv[7]=zPosition#
		
		uv[10]=x0*ix+y1*iy+tx
		uv[11]=x0*jx+y1*jy+ty
		uv[12]=zPosition#
		
		uv[15]=x1*ix+y1*iy+tx
		uv[16]=x1*jx+y1*jy+ty
		uv[17]=zPosition#
		
		SetActiveFrame frame
		device.DrawPrimitive(D3DPT_TRIANGLESTRIP,D3DFVF_XYZ|D3DFVF_TEX1,uv,4,0)
		
	End Method


Ogre3D and Newton Physics both have Win32/OSX/Linux port, I'm trying to mess them up.

Don't know if there's a cross-platform Network Library ATM, so waiting and watching.

I am using Nsprite, at the moment which uses textured quads,
Its pretty good but I just wondered if there was something faster, I dont know if it rebuilds the sprites every frame or recycles them,

@Slenkar,

To be honest you might as well rebuild every frame, we've done loads of tests and could not see an advantage of transforming vertices every frame.

Blitz3D pretty much sucks compared to Blitzmax for ease of programming flat 3D accelerated games.

Yeah But b3d has better compatibility.

nSprite 2 doesn't rebuild them every frame. Only changes texture coords. Are you having speed issues with nS2? If so, I could have a look.