d3d 9 in blitzmax?

BlitzMax Forums/BlitzMax Beginners Area/d3d 9 in blitzmax?

Caton(Posted 2016) [#1]
Is there a way I can use driectx9 3d or use d3d.dll lib in blitzmax?


col(Posted 2016) [#2]
Yeah sure,

The module is already present in pub.directx. Off the top of my head I don't think this it's complete though in the sense of only the functions and interfaces to get Max2D working are finished.

There's nothing to prevent you adding in extra stuff that you would require for yourself ;-)

There's also the srs.directx11 module for d3d 11 too which you can get from my sig, should you want it.


RustyKristi(Posted 2016) [#3]
Like what Dave said, it's only for 2D stuff. If you're looking for 3D stuff in Max you only got 2 stable choices so far (OpenB3D or MiniB3d) both which are OpenGL, unless you're open to 3D engine wrapper's which do support D3D9 on some of em.


col(Posted 2016) [#4]
@RustyKristi

What I referring to in the sense of not being finished was that the D3D9 module doesn't have the complete D3D9 library ported, about 95% is there, but it does have more than enough for 3D work.

Max2D is simply using 2D over 3D using a standard orthographic matrix for a 2D projection. The underlying API is still 3D. Direct3D, OpenGL, Vulkan etc are all 3D apis - there is no 2d api in those libraries - and we have access to them already - expept Vulkan but thats not because Max can't do it, only because the module functions haven't been written and released just yet - but it will come for sure.

Due to gpus being state machines then it's very simple to change the projection matrix without modifying any module code and voila everything is in 3D, cool eh :p


RustyKristi(Posted 2016) [#5]
Yes, I got you and I'm not talking about API, I get that what I meant to say is ready to use 3d libraries. Is there one?

Sorry for the confusion but with Caton's track record of asking stuff, I thought this is what he meant by that.. the quick and easy way ;-).

http://www.blitzbasic.com/Community/posts.php?topic=105405#1283941
http://www.blitzbasic.com/Community/posts.php?topic=105419#1284086


col(Posted 2016) [#6]
Oooohhhh I see.
Yeah I hear you, I think you're right in that a library may be better than using the api itself at this stage.


@Caton
We don't know anything about yourself or your level of education however everyone has to start somewhere, and 3D apis aren't for the faint hearted and you may end up going crazy like us lot :D

As a little primer, this is not meant to scare you off of the idea but encourage you as to the road ahead if you decide to venture into the lower level api...

You need to at least fully understand what 'vectors' are, at least understand what a matrix is and how it can do things for you, what effect they have on the numbers that you use with them etc. You don't actually have to understand 'how' matrices work in order to know how use them but obviously it helps when things don't work.
You also need to understand the complete process of going from an imaginary 3d world to actually getting that world into a numerical representation, manipulating everything to go from a seemingly meaningless bunch of numbers to be seen on the 2d screen - ie the GPU pipeline.

If you're a beginner in the coder world then you may be better off doing as RustyKristi suggests... use a premade library. That will then take care of the difficult lower level api stuff. RustyKristi suggested a couple to look into.