3d overhaul

Help with the Ecere 3D Graphics Engine: Camera, Mesh, Object, Material, OpenGL integration, etc.
Post Reply
carver413
Posts: 8
Joined: Fri Jun 18, 2010 7:44 am

3d overhaul

Post by carver413 »

hello again jerome
I spent a good deal of time looking through the 3d classes as you said thee is alot of functionality in those classes. the problem is that most of it is in the wrong place. in your base class (object) you just about everthing but the kitchen sink in there. this is going to cause alot of unnessary bloat. to give you a few examples let's say we have a machine gun and this gun shoots a lot of bullets. there's probable someone shooting back at you so there could be a good 200 bullets fling through the air. I'm pretty sure we aren't going to try to attach a camera to those bullets and yet we will have exacty two references to the camera at a cost of 4 bytes each and a total of 1600 bytes of wasted memory. if you take a good look at what's in there I'm sure you will see that most of it is of little use to a bullet and all adds up to wasted memory. I could rebuild your 3d engine make it more efficient add features to it that don't exist now and much needed documentation. of course there would be a couple of conditions. 1. if people really like my engine and you make alot of money then you would have to give me a job. 2. you won't let people bloat it all up again as I see happen to many opensource engines. I built a cad program in delphi years ago and while it is no blender it has some cool features like printing out templates that can be pasted to a board and cut out with a bandsaw. anyway I'm going to have to do the work either way. so think it over, dont see how you have much to loose if you don't like it then you wouldn't have to use it.
jerome
Site Admin
Posts: 608
Joined: Sat Jan 16, 2010 11:16 pm

Re: 3d overhaul

Post by jerome »

Dear friend,

It goes without saying that the Object class (or any other Ecere class for that matter) is not the solution to all the world's problems. You could certainly create your own class to represent your bullets of which you will have so many. Please note that 1600 bytes of wasted memory is really nothing. There is certainly worst cases of memory usage in Ecere that you could have picked on instead. That's about 0.00004% of the memory available on today's systems. That being said, like you I am all for making things as efficient and slim as possible. So say you were to use your own Bullet class, you could use the Mesh object which is one level down from object, and reuse the same Object instance (and ideally the same Mesh that represents the bullet's shape) for calling Display methods that require an object.

About doing a 3D overhaul... The 3D engine (and a few other things in Ecere as well) would definitely benefit from an overhaul. I would like to participate in it, although lately my time is quite limited. You are welcome to work in whichever direction feels right for you, and you are welcome to contribute code under our contribution agreement which can be found at http://www.ecere.com/Contribution%20Agreement.doc. Usage of the SDK's source code is subject to its revised BSD license clauses which you can find in the SDK's package. If you do decide to contribute code, we will decide whether we like to include it within the SDK's official release. But if we end up making a lot of money with your code, it is likely that we would like to hire you (but that is no promise). However, as the SDK is provided for free I don't foresee us making so much money any time soon.

Happy Coding!

Jerome
Post Reply