Thread: Using Graphics card to process?

  1. #1
    Registered User
    Join Date
    Jul 2005
    Posts
    31

    Using Graphics card to process?

    Hi!

    I was just wondering if anybody has ever written code to use that makes your program interact with your graphics card. For me it would be great because i work in a university and do a lot of number crunching.

    Any ideas?

    Cheers!

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    Sure, most people use a graphics library to do most of the detailed work for them.

    There are a huge variety available, but which one you should choose depends on you first telling us which OS and Compiler you're using.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Jul 2005
    Posts
    31
    Great!


    My system:

    P4 laptop and desktop, Windows XP, Dev C++ (compiling to C NOT C++)

    What's the basic process or taking advantage of the extra processing power, do I need to change the way I programme? Or is it just a case of including the correct librarys?

    I hope to change to mac in a few months, this is why I'm programming in C: Macs natively use C and Objective-C (This is C but with the power of objects clamped on). Additonal to a graphics card Macs have a 'velocity engine' on their powerPC processors, which do graphics/vector things very well (there might be an intel version of this too, processors aren't my strong point).

    Any tips are a great help!

    Cheers.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    On one of the menu options in dev-c++, there's an option to download additional packages.

    One of these options is for "libSDL", which is the dev-c++ friendly version of http://www.libsdl.org/index.php

    From the page
    Simple DirectMedia Layer supports Linux, Windows, BeOS, MacOS Classic, MacOS X, FreeBSD, OpenBSD, BSD/OS, Solaris, IRIX, and QNX. There is also code, but no official support, for Windows CE, AmigaOS, Dreamcast, Atari, NetBSD, AIX, OSF/Tru64, RISC OS, and SymbianOS.
    If you make a really good job of your code, it seems to me that whatever you write using libSDL on the PC will also work when you port it to your Mac.

    Porting however is extremely difficult, so lots of early practice doing the same things on both platforms will teach you a lot about what to do (and not to do) to make life easier for you in the long run.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    Registered User
    Join Date
    Jul 2005
    Posts
    31
    Thanks so much for your help!

    I'll report on my progress!

    Dan.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Rolodex(information manager) =>Check my Code
    By jackfraust in forum C++ Programming
    Replies: 3
    Last Post: 04-26-2009, 03:41 AM
  2. Vector out of range program crash.
    By Shamino in forum C++ Programming
    Replies: 11
    Last Post: 01-18-2008, 05:37 PM
  3. problems installing graphics card
    By *ClownPimp* in forum Tech Board
    Replies: 6
    Last Post: 08-06-2004, 08:11 AM
  4. Cribbage Game
    By PJYelton in forum Game Programming
    Replies: 14
    Last Post: 04-07-2003, 10:00 AM