Charrua Posted December 26, 2015 Share Posted December 26, 2015 Hi i'm trying to connect Leadwerks to a gui, which development has stopped, but that i used and use at present with other engines (albalynx). One of the firsts steps consist in passing pointers of the window's window and the graphics device (openGL i guess), albalynx is supposed to support DirecX9,10,11 and OpenGL 4 I found some functions and properties like: Context* context->getCurrent(); Window* window->getCurrent(); window->whnd; i readed about Window:GetHandle() http://www.leadwerks.com/werkspace/topic/10381-requested-features-and-improvements/page__st__40#entry76787 but seems to not exists. any help is appreciated! thank's in advance jio Quote Paren el mundo!, me quiero bajar. Link to comment Share on other sites More sharing options...
Ma-Shell Posted December 27, 2015 Share Posted December 27, 2015 Hi, for the window, "window->whnd" should do the trick. For the context you will need a typecast: "((OpenGL4Context*) context)->hrc" Quote Link to comment Share on other sites More sharing options...
Charrua Posted December 27, 2015 Author Share Posted December 27, 2015 Hey, thank's for you fast response:) the first step seemed to be the easiest one and... i'm stuck on it! Transfer functions to AlbaLynx [C++] If you are using C++, then the easiest way is to create a derived class based on cALInput: class cInput : public cALInput { public: // Implementation of abstract methods virtual int MouseX() { … } … virtual void FlushMouse() { … } }; In the constructor of the base class (cALInput) a pointer to an instance of this class is written in a static variable, so that the GUI can refer to it. Before initializing the GUI, simply create an instance of this class: // Connect AlbaLynx to input system cInput input; but when i call the init function the message isn't about window o graphics pointers ... is about that the pointer to input is null. so... i'll keep trying Quote Paren el mundo!, me quiero bajar. Link to comment Share on other sites More sharing options...
Charrua Posted December 27, 2015 Author Share Posted December 27, 2015 ok solved the init errors.. (most my fault)! now, i think i get lost forever, when i try to update the gui, then: Unhandled exception at 0x0F2B5C8D (AlbaLynx.dll) in jio.debug.exe: 0xC0000005: Access violation reading location 0x00000000. i tested version 1060 and 1110, 1060 do not pass the initiate function version 1110 pass the init (initiate is deprecated in this new version) so some checks like valid window and graphics devices are passed. i can call many of the functions to create and set parameters, just update seems to fail Quote Paren el mundo!, me quiero bajar. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.