Noel,
I am requesting this to help you and make bmax a better platform that will surpass it's competition. I want to see bmax take the crown. Be number one.
For my day job, I write highly optimized C and C++ (incl. multithreaded) code that is deployed to ten's of thousands of machines around the world. One of the many optimizations is code that reduces memory allocations and copying, by writing custom memory allocation schemes, and optimizing the layout of structures in memory. Believe me, I have many years of experience with this and do know a thing or two about what I am talking about ;-) This will make the difference of many FPS.. Isn't that what we're all going for? :)
I am not arguing that you need C structures for the code to work fine. We can certainly agree on that. You are unfortunately missing the point. It is a matter of performance and complexity. You again are proving our reasoning for requesting this - by the very fact you are required to stream the objects into some other buffer. This means overhead. Considering bmax is a gaming and graphics / media oriented development platform, I would like to think that performance is a primary consideration and goal.
My code was generalised to show examples of complex data types, not a simple 3d vertex. You are showing a simple structure. I discussed that already.
That'd be wrong -- you're still going to be passing that large amount of data, just in a slightly different format.
You are absolutely incorrect. By providing a C structured type, the memory that is used by this type in bmax is passed by reference, as a pointer to the calling library, so there is a 4 byte push onto the stack to the address of the vertex memory, rather than a complete copy to a new bank. ..and then a copy back once the vertices have been manipulated!
Also, you should be writing C code that works with BlitzMax first, not vice versa. Make any sense? Didn't think so -- that's me for you.
Not sure of your point here? I'm not talking about writing code that I want to interface to bmax. I'm talking about interfacing to the many well designed, tested and supported libraries out there that already have structured requirements for their APIs. OpenGL is one, but there are many others - physics libraries. Sound libraries. Etc..
Dreamora - I don't want that member access operator at all. It was merely a suggestion to Mark, to differenciate a bmax object type from a bmax 'structured' type, since he was concerned about confusion. I don't care one iota that bmax looks very little like C++. I write and debug software in several languages for my day job, that look nothing like C++, and I like them.
Cheers,
Stu
I am requesting this to help you and make bmax a better platform that will surpass it's competition. I want to see bmax take the crown. Be number one.
For my day job, I write highly optimized C and C++ (incl. multithreaded) code that is deployed to ten's of thousands of machines around the world. One of the many optimizations is code that reduces memory allocations and copying, by writing custom memory allocation schemes, and optimizing the layout of structures in memory. Believe me, I have many years of experience with this and do know a thing or two about what I am talking about ;-) This will make the difference of many FPS.. Isn't that what we're all going for? :)
I am not arguing that you need C structures for the code to work fine. We can certainly agree on that. You are unfortunately missing the point. It is a matter of performance and complexity. You again are proving our reasoning for requesting this - by the very fact you are required to stream the objects into some other buffer. This means overhead. Considering bmax is a gaming and graphics / media oriented development platform, I would like to think that performance is a primary consideration and goal.
My code was generalised to show examples of complex data types, not a simple 3d vertex. You are showing a simple structure. I discussed that already.
That'd be wrong -- you're still going to be passing that large amount of data, just in a slightly different format.
You are absolutely incorrect. By providing a C structured type, the memory that is used by this type in bmax is passed by reference, as a pointer to the calling library, so there is a 4 byte push onto the stack to the address of the vertex memory, rather than a complete copy to a new bank. ..and then a copy back once the vertices have been manipulated!
Also, you should be writing C code that works with BlitzMax first, not vice versa. Make any sense? Didn't think so -- that's me for you.
Not sure of your point here? I'm not talking about writing code that I want to interface to bmax. I'm talking about interfacing to the many well designed, tested and supported libraries out there that already have structured requirements for their APIs. OpenGL is one, but there are many others - physics libraries. Sound libraries. Etc..
Dreamora - I don't want that member access operator at all. It was merely a suggestion to Mark, to differenciate a bmax object type from a bmax 'structured' type, since he was concerned about confusion. I don't care one iota that bmax looks very little like C++. I write and debug software in several languages for my day job, that look nothing like C++, and I like them.
Cheers,
Stu