Jump to content
  • Advertisement

FGFS

Member
  • Content Count

    439
  • Joined

  • Last visited

Community Reputation

345 Neutral

About FGFS

  • Rank
    Member
  1. FGFS

    transparency OpenGL

    I do a X-Plane plugin. Disabling depth doesn't change anything. I nearly get the impressions that most of my stuff simply gets ignored. It worked in xp10 but in xp11 they added ambient shadows etc. Thanks
  2. Hi why do I get black regions foremost in the sky, less on the ground?   http://de.tinypic.com/r/2hrivza/9         /// Tell Xplane what we are doing     XPLMSetGraphicsState(0/*Fog*/, 1/*TexUnits*/, 0/*Lighting*/, 0/*AlphaTesting*/, 1/*AlphaBlending*/, 1/*DepthTesting*/, 1/*DepthWriting*/);     /// Handle day/night     glColor4f(Red, Green, Blue, AlphaR);     //glColor4f(Red, Green, Blue, 1);     glPushMatrix();     glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);     glEnable(GL_TEXTURE_2D);     XPLMBindTexture2d(textures[RAIN_TEXTURE].texIMGID, 0);     glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_MODULATE);     glBegin(GL_QUADS);                 glTexCoord2f(1, 1.0f); glVertex2f(right, bottom);    // Bottom Right Of The Texture and Quad                 glTexCoord2f(0, 1.0f); glVertex2f(left, bottom);    // Bottom Left Of The Texture and Quad                 glTexCoord2f(0, 0.0f); glVertex2f(left, top);    // Top Left Of The Texture and Quad                 glTexCoord2f(1, 0.0f); glVertex2f(right, top);    // Top Right Of The Texture and Quad     glEnd();   If I put AlphaR to 1 it's ok, but I want to fade in/out the raintexture. Many thanks  
  3. FGFS

    static linking

    whole archive gets me closer than trying individual libs:   Building target: lin.xpl Invoking: GCC C++ Linker g++  -Wl,--whole-archive /usr/lib/x86_64-linux-gnu/libcurl.a -Wl,--no-whole-archive,-Bdynamic,-rpath=. -shared -o "lin.xpl"  ./BitmapSupport.o ./main.o ./myList.o   -lopenal -lSDL -lGL Finished building target: lin.xpl   I get this runtime error: undefined symbol: GSS_C_NT_HOSTBASED_SERVICE Any idea? Probably exclude a lib somehow? Thanks   PS: got it working compiling curl to tmp while disabling lots of stuff alike: http://stackoverflow.com/questions/9648943/static-compile-of-libcurl-apps-linux-c-missing-library
  4. FGFS

    static linking

    You mean pass the *.a to the linker? That's what I've tried a long time ago without success. Should I need to pass all .a, around ten or so for curl alone, to the linker like above?   Building target: lin.xpl Invoking: GCC C++ Linker g++ /usr/lib/x86_64-linux-gnu/libcurl.a /usr/lib/x86_64-linux-gnu/libSDL.a -Wl,-Bdynamic,-rpath=. -shared -o "lin.xpl"  ./BitmapSupport.o ./main.o ./myList.o   -lopenal -lcurl -lSDL -lGL Finished building target: lin.xpl   like this it compiles but is not statically linked like ldd shows:       libcurl-gnutls.so.4 => /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4 (0x00007fbce28dd000)     libSDL-1.2.so.0 => /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0 (0x00007fbce2643000)   Thanks again
  5. Hi how to link curl and sdl statically?   Building file: ../myList.cpp Invoking: GCC C++ Compiler g++ /usr/lib/x86_64-linux-gnu/libcurl.a /usr/lib/x86_64-linux-gnu/libSDL.a -fPIC -fvisibility=hidden -static -DCURL_STATICLIB -DLIN=1 -DLWM=0 -DREF=1 -DXPLM200 -DXPLM210 -DIBM=0 -DAPL=0 -I/usr/include/GL -I/usr/include/SDL -I/home/michael/CPP64/SDK/CHeaders/XPLM -O3 -Wall -c -fmessage-length=0 -pthread -std=c++11 -MMD -MP -MF"myList.d" -MT"myList.o" -o "myList.o" "../myList.cpp" g++: warning: /usr/lib/x86_64-linux-gnu/libcurl.a: linker input file unused because linking not done g++: warning: /usr/lib/x86_64-linux-gnu/libSDL.a: linker input file unused because linking not done Finished building: ../myList.cpp   if I remove the -c I get:   Invoking: GCC C++ Compiler g++ /usr/lib/x86_64-linux-gnu/libcurl.a /usr/lib/x86_64-linux-gnu/libSDL.a -fPIC -fvisibility=hidden -static -DCURL_STATICLIB -DLIN=1 -DLWM=0 -DREF=1 -DXPLM200 -DXPLM210 -DIBM=0 -DAPL=0 -I/usr/include/GL -I/usr/include/SDL -I/home/michael/CPP64/SDK/CHeaders/XPLM -O3 -Wall -fmessage-length=0 -pthread -std=c++11 -MMD -MP -MF"BitmapSupport.d" -MT"BitmapSupport.o" -o "BitmapSupport.o" "../BitmapSupport.cpp" /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o: In function `_start': (.text+0x20): undefined reference to `main' subdir.mk:24: recipe for target 'BitmapSupport.o' failed collect2: error: ld returned 1 exit status make: *** [BitmapSupport.o] Error 1   Many thanks and regards  
  6. What I do now is erase also the last two letters (/ or \\) then get the last / or \\. Works as I know the upper directory to contain at least two letters.     InFileCopyFrom.erase (InFileCopyFrom.end()-18, InFileCopyFrom.end());   string::size_type nn = InFileCopyFrom.find_last_of("/\\:");   if (nn == string::npos) XPLMDebugString("The plugin folder is missing.\n");   InFileCopyFrom = InFileCopyFrom.substr(0, nn + 1);
  7. Hi I've a file path: std::string filepath and want to move up one directory. (win/mac/linux) In other words delete until up one directory. Many thanks  
  8. FGFS

    Statically Link Sdl

    With: Invoking: GCC C++ Linker g++ -Wl,-Bstatic -lSDL -Wl,-Bdynamic,-rpath=. -shared -o "lin.xpl"  ./main.o ./myList.o   -lopenal -lcurl -lGL Finished building target: lin.xpl   I get: dlerror:/media/michael/DATA/X-Plane_10/Aircraft/General Aviation/P4/plugins/p4/64/lin.xpl: undefined symbol: SDL_Quit   Many thanks
  9. FGFS

    Statically Link Sdl

    @sergamer I use sdl1.2 and static linking @Josh   I do with Eclipse on Ubuntu: Invoking: GCC C++ Linker g++ -Wl,-Bstatic -lSDL -Wl,-Bdynamic,-rpath=. -shared -o "lin.xpl" ./main.o ./myList.o -lopenal -lcurl -lGL Finished building target: lin.xpl without -lSDL at the end I get sdl-quit not found or alike errors. How to link statically sdl and later sdl_ttf for a X-Plane plugin. Thanks   For Ubuntu dynamic linking is ok, but I don't want to ship sdl and sdl_ttf with my app on other os.
  10. I get redirected to: http://www.findingresult.com/?dn=gamedev.net&pid=9PORPU154 for hours. only by clicking several times I got here. Please remove that. Thanks  
  11. Hi is there a bigger font.bmp to this lesson? That texture is so small, probably for 1024*768 resolution that was common 10 years ago. Thanks  
  12. FGFS

    About text in OpenGl

    Seems to need glut, freetype etc., but I don't want dependencies. I'll try to link statically sdl_ttf now.
  13. Hi I do with Eclipse on Ubuntu:   Invoking: GCC C++ Linker g++ -Wl,-Bstatic -lSDL -Wl,-Bdynamic,-rpath=. -shared -o "lin.xpl"  ./main.o ./myList.o   -lopenal -lcurl -lGL Finished building target: lin.xpl   but get sdl errors. How to link statically sdl and later sdl_ttf for a X-Plane plugin. Thanks  
  14. FGFS

    About text in OpenGl

    WiredCat now that looks easy. No additional libs like glut needed? Thanks for the code, I'll try tomorrow.
  15. FGFS

    Your Preferred Os And Why

      Yes me to and no synaptic is very easy to use. One click to install headers etc. while on Windows I thought "no it can't get worse" I was wrong. Mac is a nightmare, also Xcode is the worst IDE that I've ever used. With my C++/Eclipse/Ubuntu development I only feel sorry about people saying needing to rewrite lots of code for compiling on other os. We also get Snappy and Flatpak.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!