One reason behind this question is something I heard from John Blow in one of his videos, that he wrote Braid in roughly 90000 lines of code. But how many characters is there in a "line of code"? and how many lines of code would it be if some other language was used (I believe Braid was written in C or C++). Because if I can write Braid in, say, 60k lines of code in Java, then that means that I could add another 30k lines of additional content if 90k lines was the launch goal I wanted to reach.
Especially this :
then that means that I could add another 30k lines of additional content if
Dude you don't have ANY limit on how many lines you can write. Also you are not taking in account how much time you have to spent understanding/writing one line. Those measurements are dumb as hell and totally pointless. + you cant write Braid in java. it wont work on xbox(for example).
And one final thing (obviously my OWN opinion) : I really like Braid and i applaud J. Blow for his huge success, but i think that his ideas for that new programming language sucks.
I'm wrapping D3D11 and GLES. And it is not that easy because:
A texture in GLES means:
a texture data + sampler state, which is directly bound able to the pipeline.
A texture in D3D11 means:
the texture resource itself without any sampler state or information how you can bind the resource to the pipeline
Another difference is the way you bind it:
in OpenGL textures are bound as if is a regular uniform(keep in mind the sampler). in D3D11 Textures are bound to a specific slot for a specific shading stage. You have to manually crate a sampler and bind it to the proper location.
My advice is :
Do not blindly try to implement an abstraction, you need to know very all all the APIs that you want to use.
XMVECTOR DOES NOT represent a mathmeatical vector (it is a coincidence that is could be used to represent a 4D vector).
When you call XMVector3Lenght for example, the functions will assume that its argument is 3D vector(in terms of mathematics). In terms of program it is a special SIMD type.
FXMVECTOR is a typedef of XMVECTOR
On some platform. Open DIrectXMath.h and see for yourself
// Fix-up for (1st-3rd) XMVECTOR parameters that are pass-in-register for x86, ARM, and Xbox 360; by reference otherwise
#if ( defined(_M_IX86) || defined(_M_ARM) || defined(_XM_VMX128_INTRINSICS_) ) && !defined(_XM_NO_INTRINSICS_)
typedef const XMVECTOR FXMVECTOR;
typedef const XMVECTOR& FXMVECTOR;
On platform A we should use XMVECTOR& because this is how its SIMD workflow works.
On platform B we should use XMVECTOR because this is how its SIMD workflow works(windows for example). There is a specific __vectorcall functions modifyer what will help you in that specific scenario.