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!


FGFS

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

HI

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.

Thanks

 


arrays

08 May 2015 - 12:05 AM

Hi

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

http://www.xsquawkbox.net/xpsdk/docs/DataRefs.html

http://www.xsquawkbox.net/xpsdk/mediawiki/XPLMGetDatavf

http://www.xsquawkbox.net/xpsdk/mediawiki/XPLMSetDatavf

 

    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

Hi

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:

http://www.xsquawkbox.net/xpsdk/docs/DataRefs.html

 

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

http://www.xsquawkbox.net/xpsdk/docs/XPLMDataAccess.html

 

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

Hi

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

 

http://www.xsquawkbox.net/xpsdk/mediawiki/XPLMHandleMouseWheel_f

 

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?

Thanks

 


light up scene

05 April 2015 - 10:25 AM

Hi

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:

 

                    glBegin(GL_TRIANGLE_STRIP);
                            // 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


PARTNERS