Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 18 of 18
ok i will look at svgalib ...dolda2000 i want to use primitive functions like putpixel,line etc without going in to the details of 3D graphics so i could first understand ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Just Joined!
    Join Date
    Feb 2003
    Location
    Wah Cantt, Pakistan.
    Posts
    8

    ok i will look at svgalib ...dolda2000 i want to use primitive functions like putpixel,line etc without going in to the details of 3D graphics so i could first understand how to handle graphics in linux...if we could do that in OpenGL and its better than svgalib than i will use that instead
    thanks for ur help
    bye

  2. #12
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    2D acceleration is also possible in OpenGL, yes. However, I haven't examined either of them, so I can't tell which one is the easiest to use. It might be worth checking out Xlib, too. If you'd care to recompile your kernel, the fbdev driver might be worth a try, too.
    svgalib has the inconvience that it has to be used as root, as I remember it.

  3. #13
    Linux Engineer
    Join Date
    Nov 2002
    Location
    Queens, NY
    Posts
    1,319

    preprocessors

    Dolda,

    Yes, that preprocessing directive would work in this case. I don't know why I haven't thought of it. Furthermore, the example should be changed to accomodate for Linux and Windows using those directives.
    The best things in life are free.

  4. $spacer_open
    $spacer_close
  5. #14
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Yes, it should accomodate both platforms, it's just that I don't know what the Windows counterpart of that definition is called.

  6. #15
    Linux Engineer
    Join Date
    Nov 2002
    Location
    Queens, NY
    Posts
    1,319
    Dolda,

    Is there any other variables like __linux__? I suppose there is a __unix__ and a __windows__. Furthermore, ido you now if this is supported by all compilers or just a few?
    The best things in life are free.

  7. #16
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    If you run "cpp -dM </dev/null", you'll see which ones are defined by default on your system. I'd guess it's supported by all (at least all ANSI compliant) compilers, but I don't know. Although it would be logical to assume that it's called __windows__ on Windows, I'm not sure about it. The easiest way to find out would probably be to test.

  8. #17
    Just Joined!
    Join Date
    Nov 2002
    Location
    USA
    Posts
    99
    The preprocessor definition __linux__ is a default when using gcc, correct? That would be compiler specific. I've used Visual C++ and there are a variety of preprocessor definitions for programming in Windows, it really depends on what type of binary you are building. Unless you are programming for 16bit Windows (Win 3.1), try this:

    #ifdef WIN32
    #include <windows.h>
    #endif

    But remember, that is specific to the Visual C++ compiler, it is not defined in ANSI. There may be a different preprocessor definition if you are using say Borland C++ or some other Windows compiler.

  9. #18
    Just Joined!
    Join Date
    Apr 2006
    Posts
    1

    windows.h

    hi bpark,
    this is madhavi
    i have the same problem what u faced already
    i am just trying to port one windows developed application to linux
    but it needs somw windows related header files like "windows.h"

    i think u solved this problem when u got that
    can u help me what i have to do to make available those files on linux
    plz help me
    madhu




    Quote Originally Posted by bpark
    Dolda,

    I'm going to take on openGL programming very soon and I'm just experiementing with sample files. Most if not all these files need the windows.h file as well as other windows file I would assume. What library can I install under the linux platform?

Page 2 of 2 FirstFirst 1 2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •