abakobo

Forum Replies Created

Viewing 15 posts - 421 through 435 (of 455 total)
  • Author
    Posts
  • in reply to: some issues with external abstract method #4242

    abakobo
    Participant

    can we now pass by reference to externals? I have some const& that are passing fine now though I tought I would have to remove them from c++ code!

    edit: it was not an abstract method so that must be the point.

    in reply to: extending structs #4150

    abakobo
    Participant

    I could extend struct in the extern section…

    didn’t try in public section.

    in reply to: you can't have a field in an extend of 'external extends void' #4032

    abakobo
    Participant

    I decided to use the good old global sharing, not elegant but should do the job. And I had better perfs compared to “canvas ptr”…

    If you are interested into having a sight on the approach, you can see full code on github: https://github.com/abakobo/Box2D_for_monkey2

    thx for the suggestions

    in reply to: you can't have a field in an extend of 'external extends void' #4018

    abakobo
    Participant

    using a pointer to the global/Field sticked to canvas

    [/crayon]

    gives the folowing error:
    -for Field:
    no known conversion for argument 1 from ‘bbGCVar<t_mojo_graphics_Canvas>*’ to ‘t_mojo_graphics_Canvas**’
    -for global:
    no known conversion for argument 1 from ‘bbGCRootVar<t_mojo_graphics_Canvas>*’ to ‘t_mojo_graphics_Canvas**’

    but maybe doing the following would “save” the canvas too?

    [/crayon]
    in reply to: you can't have a field in an extend of 'external extends void' #4013

    abakobo
    Participant

    My aim is to pass the canvas passed to OnRender to my box2D debugdraw.

    Is there any chance the gc could reallocate the canvas while OnRender is processing?

    If not the pointer to canvas should be way more convenient than a handle. My tests worked fine. I pass the varptr canvas to my debugdraw object just before I ask for a draw. Never had any memory violation or visual incoherence.

    Actually I don’t see how to create handles. Would I need to call gcnew myself on the cpp side and understand how gc works?

    in reply to: Box2D #4004

    abakobo
    Participant

    @Simon Armstrong:

    What tools did you use to machine pass/translate the API? I have no idea how it can be done. I’ve had a look at docxygen and clang but it’s very blury to me…

    in reply to: Ted2 not repainting window contents #3995

    abakobo
    Participant

    same problem here

    in reply to: external "nameless" enums #3953

    abakobo
    Participant

    Just tried it..

    first suggestion works if I use:
    b2Draw_ext.SetFlags(b2Draw.e_shapeBit | b2Draw.e_jointBit) for example
    or
    b2Draw_ext.SetFlags(b2Draw_ext.e_shapeBit | b2Draw_ext.e_jointBit)

    just e_shapeBit alone won’t work but it’s sufficient for me. May be work on that a bit more but if all goes well like that I’ll keep it so.

    thanks!


    abakobo
    Participant

    now running in debug mode with latest github download…


    abakobo
    Participant

    I’ve checked twice (w7 and 10) and the src/tanslator_cpp.monkey2 is the new one (line 584 is modified with old code in comment). Rebuildall and dbEmit error.. May be some other modified files are on your side? On the github commit I just see that file marked as modified. (Commit 9e7c7a56)

    I can’t try the actual git master as ted2 won’t launch (new issue with w7 and w10). Have not tried on osx with latest git.

    Should it work with 1.0.4 with just that modified translator_cpp  replaced?


    abakobo
    Participant

    It is still giving an error..

    W7 message

    [/crayon]

    osx message

    [/crayon]
    in reply to: Vector additions #3608

    abakobo
    Participant

    When I experimented optimization I saw that struct properties are slower than fields.
    And I thought the same. in vec2, X and Y properties shouldn’t be there because some people will slow down their loops by choosing (unuselfull)properties instead of field in their calculation.

    in reply to: monkey2 modules in progress #3584

    abakobo
    Participant

    I had forked the repo at the time!

    Played a bit with it (box2d) and managed to get a circle bouncing on another! (no gfx…text only for now)

    Since the github/nitrologic/m2/modules has disapeared I created a special repo on my github just for the box2d module: https://github.com/abakobo/Box2D_for_monkey2.
    @nitrologic: Have you moved your box2d module or has it been cleared? If you moved it i’ll be happy to see what you did and be a volunteer!

    in reply to: monkey2 modules in progress #3551

    abakobo
    Participant

    @nitrologic: I just wanted to look at some box2d examples but there’s no more box2d on your repo… have you moved it?
    Anyone has some little examples that runs?

    in reply to: linux build #3379

    abakobo
    Participant

    thx for the infos dawlane

    I did the following on a fresh install of mint 17 and it worked (had to add sdl2-dev to the libs.

    open terminal
    go to the parent dir of monkey2-master
    then type following commands

    [/crayon]

    On mint 18 I’ve had problems with “sofware source->cd-rom” that had to be disabled. and I made the apt update because of that thinking it would solve the problem.

    I suppose doing a:

    [/crayon]

    before all that would have been better!

Viewing 15 posts - 421 through 435 (of 455 total)