Create Module

This topic contains 3 replies, has 3 voices, and was last updated by  cocon 2 years, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #6502

    Yue
    Participant

    Hello, I would like to know the process to create a module and export the functions of a 3d library.

    I understand the process of creating modules, but the problem I have is that I do not know how to bring the functions of the library to be used with Monkey 2.

    I appreciate any suggestions.

    #6506

    APC
    Participant

    Yue,

     

    When I import a module like Pyro 2 into monkey 2 I use:

    Check the docs Modules and Applications and Namespaces and Using http://monkey2.monkey-x.com/monkey2-docs/

    #6507

    Yue
    Participant

    What I need to know is how to get the function of the library to use it in Mono 2. In BlitzMax, I find the name of the function like this “_Graphics3D @ 20” And the idea is to take that function that is in the library to be able to use it in Mono 2. I have reference to BlitzMax in the creation of modules. But I do not know how to do it in Mono 2.

    #6509

    cocon
    Participant

    You can study the “modules” of Monkey2 to see. For example in “libc” you can include the source files directly (header+source). In the “gles2” you include the compiled library (header+library).

    Check the documentation for more info: Monkey2 > Language reference > Integration with native code

    Personally, I have not tried it yet to explain how it works, but this would be the way how its done.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.