Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 15 Mar 2013
Offline Last Active May 15 2015 06:08 AM

Topics I've Started

OpenAL rotate sound and listener

15 May 2015 - 06:07 AM


I've remarked that in some old code my speakers are inverted when being in front of a sound. Looking at the code it's such a mess, I wonder if anyone

has a simple OpenAL/C++ solution for moving listener and sounds? I have listener and sound positions in 3D and both move.




08 May 2015 - 12:05 AM


I want to read an array instrument_brightness_ratio which is float[16]





    float DimRefv[16], DimRefvMM[16];
    XPLMGetDatavf(pnlBri, DimRefv, 0, 10);
    DimRefvMM[10] = DimRefv[0]-100;
    XPLMSetDatavf(pnlBri, -(&DimRefvMM[10]), 10, 1);


and change/writeback the [10] to have the remaining %. So if [0] is for ex. 25% I want [10] to be 75%.

Many thanks for help


get string value from x-plane

17 April 2015 - 04:23 AM


how to get the string value of a x-plane dataref?


fms1 = XPLMFindDataRef ("sim/cockpit2/radios/indicators/gps_nav_id");

It says here that's a string:



but here I cannot see how to get/display a string value:



with this obviously I get errors:

    string Nfms1 = XPLMGetDataf (fms1);
    char    buff[256];
    sprintf(buff,"Current: %i\n", Nfms1);
    XPLMDrawString(color, PanelLeft1 + 70, PanelTop1 - 40, buff, NULL, xplmFont_Proportional);


Many thanks


kind of blackout...how to use a header

08 April 2015 - 12:02 AM


seems I have a kind of blackout that early in the morning. Well how to use:




included the header and try:

    XPLMHandleMouseWheel_f (FakeFenster, 1, 1, 1, 1, inRefcon);


is wrong obviously. FakeFenster is the windowid and the 1 stand for parameters I don't need? What about refcon?



light up scene

05 April 2015 - 10:25 AM


I can improve my X-Plane FPS by only drawing once instead of twice but at the cost of my texture getting darker. Seems simple but how to

light up the whole scene, can't figure it. I draw alike:


                            // draw vertex 0
                            glColor3f(rgb[0], rgb[1], rgb[2]);
                            glVertex3f(terrainMap[x][z][0], terrainMap[x][z][1], terrainMap[x][z][2]);


I tried glColor3f(rgb[0]+0.1, rgb[1]+0.1, rgb[2]+0.1);

and also added glColor3f(1.0, 1.0, 1.0); before glcolor.

Thanks in advance