Jump to content

SchneiH2

Members
  • Content count

    137
  • Joined

  • Last visited

Community Reputation

4 Neutral

1 Follower

About SchneiH2

  • Rank
    Advanced Member

Recent Profile Visitors

2,152 profile views
  1. Hi everybody Basically, there are two parts of the question: First is that I am trying to translate Ben's Gizmo64 code for the terrian map into a SDK plugin, however so far without success. My below code basically works, however, does not display a terrain texture. I am wondering, how to get the texture id of the terrian, if there is any. int efb_map_draw( XPLMDrawingPhase inPhase, int inIsBefore, void * inRefcon) { XPLMBindTexture2d(map_texture, 1); XPLMSetGraphicsState(0, 1, 0, 1, 1, 0, 0); glColor3f(0.75, 0.75, 0.75); glTranslated(64, 15, 0); glPushMatrix(); glBegin(GL_QUADS); glTexCoord2f(0, 1); glVertex3f(0, 50, 0); glTexCoord2f(0, 0); glVertex3f(0, 230, 0); glTexCoord2f(1, 0); glVertex3f(240, 230, 0); glTexCoord2f(1, 1); glVertex3f(240, 50, 0); glEnd(); glPopMatrix(); return 1; } Secondly, I am wondering whether there is a possibility to display the map from the map UI (i.e. aso differnt layers like VFR, IFR low/high) on an instrument/gauge. At least the G1000 gauge has this option. Having looked through the new map api I could not find any routine to get a texture id of the map. The map sample code on the SDK page creates to my understanding new layers in the map UI bu I do not see there any solution to display the map on an instrument on the 3d panel. Thank you up front for possible help. Best regards SHJ
  2. SchneiH2

    Strings on 3D panel

    Just to close this topic: Problem solved thanks to Ben's hint to use drawing phase xplm_Phase_Gauges. I just did not use the rght coordinates initially to display the string on the 3d panel. Thansk again for all replies and help. SHJ
  3. SchneiH2

    Strings on 3D panel

    Hi Jim Thanks for your reply. If I understand correctly than Gizmo64 acts as a kind of overlay to the SDK and uses the SDK code set/API? Using xplm_Phase_Gauges works in a way that it indeed draws the string on the 2D panel. Regarding the Gizmo64 code shown above I am a bit puzzled that to my understanding with glPushMatrix() and glPopMatrix() OpenGL is being addressed. However, adding this to the plugin code does not give any effect. Could there be a necessity to somehow 'load' the 3D panel png in the plugin code? Frankly speaking I do not fully understand the meaning of the second part of below explanantion from the SDK Thanks up front for additional comments Best regards SHJ
  4. SchneiH2

    Strings on 3D panel

    Hi guys Many thanks to all of you for your responses. Regarding your comments on the advantages of Gizmo64 I fully agree. It is indeed a very handy tool/plugin that allows also people like me with quite basic programming skills to achieve great results. Basically, I could realize almost all functionality I wanted for my a/c with this tool/plugin. However, as the plugin meanwhile became payware and can be obtained according to Ben’s post not on a standalone basis but only together with a X-A payware product it is no longer an option for my project. This because I plan to publish it once it will be ready (god knows when) on a free basis and thus people who want to use it would be forced to buy a X-A payware a/c to get the Gizmo64 plugin to run the freeware a/c they want. Please do not take the aforesaid as any criticism, it is just considering a fact. My project is a pure hobby and I am realistic enough to understand that the result will hardly be on a level that asking money for it can be justified. Therefore, I probably must do it the ‘hard way’ and will see how far I get. At least for the moment I am still more excited than frustrated. Back to the problem itself many thanks to you Ben for the hint with xplm_Phase_Gauges and PhM’s comment. Out of your comments I concluded that I perhaps gave a wrong description of my problem/aim. Basically, I would like to write on the 3D panel (instrument) and not somewhere into the 3D space. After reading your comments and again the SDK docs I suspect that there might be a difference. Please find below as example of the Gizmo64/Lua code I use to display on the EFB (which background is in the 3D panel graphic) the current weather of the destination airport. I just wanted to reproduce this option with the SDK; It might be of course again a good argument for Gizmo64 since a could realize this feature quite easily. function OnDraw_Gauges_3D() if efb_power == 1 and efb_mode ==3 then --EFB wheather gl.PushMatrix() gfx.drawString("AIRPORT ", 1820, 580) gfx.drawString(metar_apt, 1820, 560) gfx.drawString("WHEATHER ",1820, 530) gfx.drawString(metar_data1, 1820, 510) gfx.drawString(metar_data2, 1820, 490) gfx.drawString(metar_data3, 1820, 470) gfx.drawString(metar_data4, 1820, 450) gl.PopMatrix() end end I must admit that I do not know whether Gizmo64 interacts directly with XPlane independently from the SDK structure or if they are linked. In case of the latter I assume that there might be a possibility to do it similarly using the SDK? Whatsoever, many thanks already know for additional comments. Best regards SHJ
  5. SchneiH2

    Strings on 3D panel

    Hi Can somebody give some help on this topic. I have tried to find as much as possible on the web, however, the information is limited. I have also tested the example http://www.xsquawkbox.net/xpsdk/mediawiki/DrawingHook which works well with my plugin, however, frankly speaking I have a lack of understanding how to continue from this point with the 'string issue'. Although, the following code snippet is probably missing essential parts I include it just to illustrate where am I at the moment with my considerations: XPLMRegisterDrawCallback(My3DTest, xplm_Phase_FirstScene, 0, NULL); XPLMUnregisterDrawCallback(My3DTest, xplm_Phase_LastScene, 0, NULL); int My3DTest( XPLMDrawingPhase inPhase, int inIsBefore, void * inRefcon) { float color[] = { 1.0, 1.0, 1.0 }; glPushMatrix(); XPLMDrawString(color, 300, 120, "Teststring", NULL, xplmFont_Basic); glPopMatrix(); return 1; } If I understand the SDK documentaton correctly then the xplm_Phases should be correct for 3D drawing. Thank you very much for possible help and best regards SHJ
  6. SchneiH2

    Float ARRAY custom dataref in PlaneMaker

    Hi Jim Thank you very much for your reply + amended file. Now it works. Was indeed a formatting problem. However, I am still struggeling with this issue. Although, I have set the index for the engines correctly (i.e. 0, 1) and saved the file the second engine shows the value of the first one. This despite the fact that the plugin seems to work correctly, i.e. when checking the dataref values with the DRE everythng is correct. For illustration some pics are attached. I am continuing to check this issues, however, perhaps you have an idea what might be the reason. Thanks and regards SHJ
  7. SchneiH2

    Float ARRAY custom dataref in PlaneMaker

    Hi Jim Please find attached the file. Custom dataref is added at the end. Best regards SHJ DataRefs.txt
  8. SchneiH2

    Float ARRAY custom dataref in PlaneMaker

    Hi Jim First of all my best wishes to you for 2018. Thank you for your response. The described approach works fine for the part of PM, i.e. when adding the dataref (SSJ100/SD_FUEL/fuel_used float[2] y kgs custom dataref) to the DataRefs.txt the Index-field gets active and can be edited. However, it creates problems with XP11 itself, i.e. leads to a crash when loading any a/c. To avoid any file formating issues I have amended the DataRefs.txt with the normal Windows text editor. Perhaps you have an idea what might be wrong. Thank you and best regards SHJ
  9. Hi Just to be sure - I have created in my plugin for the a/c a float array custom dataref (fuel consumption per engine). Everything with the code works well. However, I have noted that when using a CUSTOM array dataref in PlaneMaker the corresponding index field is inactive (please refer to attached pic). Am I doing something wrong? Thanks for possible help and best regards SHJ
  10. SchneiH2

    SDK3 custom datarefs

    Hi Ben Thank you very much for your reply and offer. I hope not to disappoint you when saying that I got meanwhile very attracted by this pure programming stuff with the SDK and C++ and will continue this way although I guess that there are a lot of learning lessons ahead to go through. Never thought that I will somewhen start with C++ as it seemd to me very cryptic. Meanwhile, I got at least a first idea about the elegance of this programming language. I am quite optimistic that I will be able to transcribe the basic a/c functions from Gizmo/Lua quite fast, however, will probably get stuck with the 3D graphics stuff which I use for the EFB. Would be great if I could count on some help from you in future. Thank you again for your reply and all the best for 2018! Best regards SHJ
  11. SchneiH2

    SDK3 custom datarefs

    Hi PhM Thank your for your reply. There were basically two reasons for the problem (or maybe just one => ucritical copy/paste) The frst one is: XPLMUnregisterFlightLoopCallback(SysAPUFLCB, NULL); XPLMUnregisterDataAccessor(SSJ100_APU_MSw); vs XPLMUnregisterFlightLoopCallback(SysAPUFLCB, NULL); XPLMUnregisterFlightLoopCallback(SSJ100_APU_MSw); WRONG!!! => copy/paste issue The second one was uncorrect use of variable types (int vs float) in the accessor callbacks for the custom datarefs. Thank you again for your feedback and best regards SHJ
  12. SchneiH2

    SDK3 custom datarefs

    Hi everybody I am about to transcribe a Gizmo64/Lua script into a plugin. Therefore, I had to start learning C++ where I believe made some good progress on the language itself, however, feel still weak with the whole environment (MS VS2017). So far I was working with the SDK2 and just started to try working with the SDK3. All code I have generated based on the SDK2 works well. including custom datarefs (instruction an examples mainly take from here http://www.xsquawkbox.net/xpsdk/mediawiki/Main_Page. As a basis I took the 'Hello World' example and copied i my code from SDK2. Except for the custom datarefs I can compil the project without errors. When adding the custom datarefs I get a compiler error as shown in the attached picture. Woul be great if somebody could provide some help. Thanks and regards SHJ
  13. SchneiH2

    XP11 FMC (new/next issue)

    Hi I have just noticed that the download link for Gizmo64 on Gizmo64.com is now dead. Taking into account Ben's mail above it is my understanding that Gizmo64 is not (no longer?) an option for freeware projects. Good oportunity to improve C++ skills to use in future a plugin for the a/c instead of a Lua/Gismo64 script. So, probably I will be more active in future in to the Plugin Developer forum and hope for the same excellent help I got all the time here. Best regards SHJ
  14. SchneiH2

    XP11 FMC (new/next issue)

    Hi Jim Thank you again for the link/file. I have now installed it (copied the content into xplane11/resources/plugins), however, when running XP11 with my a/c I got a pop-up to enter the corresponding registration with X-Aviation. Without this registration the Gizmo64-script for the a/c does (naturally) not work. Having also checked the X-Aviation site I understand that the Gizmo64-plug-in cannot be purchased on a stand-alone basis but, in line with Ben's mail, would be part of an a/c-payware. Given this and looking at the post from Ben it is my understanding that Gizmo64 is no longer a freeware plug-in (at least the newest versions). For private use I am fine with the older versions of Gizmo64 which seem to work except perhaps the above issue. However, this would mean that a/c which would be published as freeware and using Gizmo64 would partly become payware? This is not a criticism, I just would like to understand whether Gizmo64 is a good option when moving in this direction, i.e. creating a/c as freeware. I am not sure but believe to have read somewhere (in this forum?) that there is a Gizmo64 version or set-up for either payware or freeware. I would be much grateful if you could comment on this to get a better understanding. Thank you very much and best regards SHJ P.S. some impression from WIP (still for XP10)
  15. SchneiH2

    XP11 FMC (new/next issue)

    Hi Ben Thank you very much for your response. I am a bit unsure how to understand 'official way' in your post. So far I have downloaded Gizmo64 from Gizmo64.com assuming that this is official + legal. It is absolutely not my aim to use anything on an unofficial or illegal basis. I would like to be sure in this matter since I might publish the a/c once finished as freeware. Could you perhaps also give a short example for X-A payware assuming you do not mean X Plane sim itself. Thanks again and best regards SHJ
×