DX7 2d/3d DLL for B3d?

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

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

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