Forum Replies Created
-
AuthorPosts
-
cool, thanks mark
(just why I dislike c++
)
while it works, the Rectangle destructor is never called ?
I’ve tried assigning multiple instances to the same local in a function called 1000’s of times while calling GCCollect() in the loop calling the function assigning the classes….
November 18, 2016 at 1:49 pm in reply to: how to get an extern class that extends bbObject and not void? #5200the destructor is commented out?
if there needs to be code in the destructor do you have to
what should I do if I need to have code in the “Foo” destructor ?
the bodies are still live they should be on some list inside the world object, okay the wrapper might have to keep a shadow list to keep them live, but I think you should see the principle…
while bullet objects aint bbObjects could another (wrapper) class extend both the bullet object and bbObject ? – could possibly even be an actual MX2 class integrated with the bullet object
There are pro’s and con’s to every approach but I think its worth considering long and hard before abandoning the advantages of having a GC…
a little more like this? (text would need to be filled in if you want a smaller version)
Attachments:
oh sure allow the user to remove bodies from a world of course – just deleting it without removing it from a “world” would probably be a crash anyhow!
what I was meaning is if someone does
abody = createBody()
the old abody should get cleared up (and hard luck if they didn’t properly remove it from the world first…) but its more things like collision shapes / motion states and alsorts of misc junk that could leak when someone initialises a new level for example…
I’ve just had a big array like
Monkey12345global boxVerts:Float[] = New Float[]('// vert // UV-0.5, -0.5, -0.5, 0.0, 0.0,...snip...-0.5, -0.5, -0.5, 0.0, 0.0)just tidy it away in another file and import it
failing that you could just load the data png etc via the appropriate module see: http://monkey2.monkey-x.com/mx2-docs/std-std-graphics-pixmap-load/#comment-158
Do you have a (much) larger version of the monkey circle, I could have a crack at it if you like?
Get your point about borders and backgrounds…
I am a little unhappy in that you have to compile the library separately then the module links to it
Not being able to set defines can be a pain on larger projects
On Linux glfw is usually found as an (installable) system library, could I dynamically link to is some how
I *think* glfw3 has emscripten support but couldn’t get the C tests to compile, any ideas?
awe shucks, thanks Mark! do feel free to link to it
Happy to receive ideas or requests for future topics, from anyone…
funny didn’t think it was that important till I started donating, please can I have my heart !
how about a competition !
(svg looks better this got a bit munged – svg’s pose a security risk aparently!)
Attachments:
…well, I must have tried that 5 or 6 different ways! lol (horrible feeling I might have been trying to use a relative path)
thanks Mark
much appreciated.
thx, repo here for lower level stuff (which is basically done, but Linux only and undocumented) https://github.com/chriscamacho/glfw-MX2
yeah – thanks, that is basically what I’m doing and checking the generated code afaict its doing what I’d have done using C
I assume you realise you don’t need the ci pointer, ie
Monkey1234Local ip:Int Ptrip = Cast<int Ptr>(Factorial(4))Print ip[0]looking at a different example
Monkey1Local pos:float ptr = Cast<float ptr>(dGeomGetPosition(geom)) '// redraw sphere at new locationgets you
Monkey1bbFloat* l_pos=((bbFloat*)(dGeomGetPosition(g_default_geom)));Which looks sane to me!
I tried that but it choked any time it hit the like of
#include <foo/bar.h>
for the time being I’ve symlinked all the includes into the root of the module as it happens to have the same name as the include directory… (the -I into the modules directory then allows the other includes to loaded by an include)
-
AuthorPosts


