What does a video card do? What is DirectX and X11?

Discussion in 'NZ Computing' started by darkknight, Jan 27, 2006.

  1. darkknight

    darkknight Guest

    Hi

    What does a video card do?

    The code being executed in the main CPU (not the video card) determines
    what appears on the screen i.e. what the colour each of the one million
    or so pixels on the screen should be. Where does it put this
    information?

    What does an expensive video card do better than a cheap video card?


    What is DirectX, SDL or X11?

    If a program in the main CPU wants to draw a red rectangle on the
    screen, why can't it just write
    for (x=100; x<=200; ++x) SetPixel(x,300,red);
    for (x=100; x<=200; ++x) SetPixel(x,500,red);
    for (y=300; y<=500; ++y) SetPixel(100,y,red);
    for (y=300; y<=500; ++y) SetPixel(200,y,red);

    What do you need DirectX for?

    TIA
    --
     
    darkknight, Jan 27, 2006
    #1
    1. Advertising

  2. darkknight

    nick Guest

    Re: What does a video card do? What is DirectX and X11?

    darkknight wrote:

    > Hi
    >
    > What does a video card do?
    >
    > The code being executed in the main CPU (not the video card) determines
    > what appears on the screen i.e. what the colour each of the one million
    > or so pixels on the screen should be. Where does it put this
    > information?
    >
    > What does an expensive video card do better than a cheap video card?
    >
    >
    > What is DirectX, SDL or X11?
    >
    > If a program in the main CPU wants to draw a red rectangle on the
    > screen, why can't it just write
    > for (x=100; x<=200; ++x) SetPixel(x,300,red);
    > for (x=100; x<=200; ++x) SetPixel(x,500,red);
    > for (y=300; y<=500; ++y) SetPixel(100,y,red);
    > for (y=300; y<=500; ++y) SetPixel(200,y,red);
    >
    > What do you need DirectX for?



    Program says "draw a rectanglle, then rotate it in 3 dimensions to 45
    degrees then put a realistic texture on it"

    This can be done by the central processing unit (Cpu) or the graphics
    processing unit (Gpu), depending on the Gpu capabilites and the drivers
    used. The Gpu is designed to do graphics functions very fast, the Cpu
    will generally not be tuned to do those things fast, and also has to do
    other stuff.

    DirectX and SDL are doors to the video (and audio) hardware, they
    provide a framework for accessing the fast stuff in the Gpu.

    X11 is a graphics system which is common in unix systems (but also
    works on windows, MacOSX, IRIX, Sparc and others). It is a client
    server system, the server is the set of drivers that put stuff onto a
    display. The client is the user program that displays on a server. The
    client and the server are usually on the same machine, but don't have
    to be, which means X11 can work over networks (a program on my work
    computer can display on my home computer).

    >
    > TIA
    > --
     
    nick, Jan 27, 2006
    #2
    1. Advertising

  3. darkknight

    darkknight Guest

    Re: What does a video card do? What is DirectX and X11?

    nick wrote:

    >
    > darkknight wrote:
    >
    > > Hi
    > >
    > > What does a video card do?
    > >

    >
    > Program says "draw a rectanglle, then rotate it in 3 dimensions to 45
    > degrees then put a realistic texture on it"
    >
    > This can be done by the central processing unit (Cpu) or the graphics
    > processing unit (Gpu), depending on the Gpu capabilites and the
    > drivers used. The Gpu is designed to do graphics functions very fast,
    > the Cpu will generally not be tuned to do those things fast, and also
    > has to do other stuff.
    >
    > DirectX and SDL are doors to the video (and audio) hardware, they
    > provide a framework for accessing the fast stuff in the Gpu.
    >
    > X11 is a graphics system which is common in unix systems (but also
    > works on windows, MacOSX, IRIX, Sparc and others). It is a client
    > server system, the server is the set of drivers that put stuff onto a
    > display. The client is the user program that displays on a server. The
    > client and the server are usually on the same machine, but don't have
    > to be, which means X11 can work over networks (a program on my work
    > computer can display on my home computer).
    >



    Thanks.

    So do all video cards have the same interface and commands or does
    DirectX have to know how to drive lots of different video cards?

    Does X11 use the "extra" capabilities of the GPU or does it just send
    basic SetPixel type commands to the GPU - or is there another layer
    between X11 and the video card?

    With an application such as Windows explorer, that just draws static
    images, would the GPU be doing anything more than just accepting
    SetPixel commands?

    --
     
    darkknight, Jan 27, 2006
    #3
  4. darkknight

    nick Guest

    Re: What does a video card do? What is DirectX and X11?

    You are probably getting to the limit of my technical expertise, but
    I'll have a go. No warranty blah blah

    video cards have different commands - thats why either the manufacturer
    makes a driver, or someone reverse engineers one.

    Whether X11 implements extra capabilities depends on the state of
    driver development for that card. eg nVidia provide (closed source) X11
    drivers that implement most of the features of their cards (2d and 3d
    acceleration, XvMC, etc). Some other manufacturers will not release
    enough specs, or put the effort in, to get it working. Also X11 is a
    standard, there are more than one implementations. The popular open
    source implementation is xorg-x11 and you will now find that in most
    linux distributions. There are also commercial X11 implementations.

    As for windows explorer, i am not sure about the answer to your
    question. However it is the graphics subsystem that draws on the
    screen, not explorer. explorer tells another part of the operating
    system to draw something, and that is done in combination between the
    cpu and the gpu, quite how the system knws what stuff can (and should)
    be offloaded to the gpu, and which has to be crunched in the cpu, i do
    not know. I suspect that explorer would be written to run everywhere,
    and wouldn't be dependent on fancy graphics capabilities.
     
    nick, Jan 27, 2006
    #4
  5. darkknight

    Murray Symon Guest

    Re: What does a video card do? What is DirectX and X11?

    On Sat, 28 Jan 2006 10:44:50 +1300, darkknight wrote:

    > nick wrote:
    >
    >
    >> darkknight wrote:
    >>
    >> > Hi
    >> >
    >> > What does a video card do?
    >> >
    >> >

    >> Program says "draw a rectanglle, then rotate it in 3 dimensions to 45
    >> degrees then put a realistic texture on it"
    >>
    >> This can be done by the central processing unit (Cpu) or the graphics
    >> processing unit (Gpu), depending on the Gpu capabilites and the drivers
    >> used. The Gpu is designed to do graphics functions very fast, the Cpu
    >> will generally not be tuned to do those things fast, and also has to do
    >> other stuff.
    >>
    >> DirectX and SDL are doors to the video (and audio) hardware, they
    >> provide a framework for accessing the fast stuff in the Gpu.
    >>
    >> X11 is a graphics system which is common in unix systems (but also works
    >> on windows, MacOSX, IRIX, Sparc and others). It is a client server
    >> system, the server is the set of drivers that put stuff onto a display.
    >> The client is the user program that displays on a server. The client and
    >> the server are usually on the same machine, but don't have to be, which
    >> means X11 can work over networks (a program on my work computer can
    >> display on my home computer).
    >>
    >>

    >
    > Thanks.
    >
    > So do all video cards have the same interface and commands or does DirectX
    > have to know how to drive lots of different video cards?


    There is a driver layer between them. Each card has its own driver.
    DirectX provides an abstracted API to the application program.
    As far as I can recall, DirectX will emulate in software any functions
    that are not supported in the card's hardware.

    > Does X11 use the "extra" capabilities of the GPU or does it just send
    > basic SetPixel type commands to the GPU - or is there another layer
    > between X11 and the video card?


    Some X11 drivers support different degrees of hardware acceleration.
    Many support full 2D acceleration. X11 uses "DRI" for 3D graphics.
    refer http://xfree86.org/ and http://freedesktop.org/Software/xorg

    > With an application such as Windows explorer, that just draws static
    > images, would the GPU be doing anything more than just accepting SetPixel
    > commands?


    Yes, 2D acceleration (in the GPU) can be used for bitblit operations as
    many windows functions are operating on rectangular areas. e.g. it is more
    efficient to get the GPU to move a rectangular window from one position to
    another via a hardware-assisted bitblit than by getting the CPU to move
    each pixel on an individual basis.
    You can verify this by disabling Video Acceleration in your Windows
    settings in control panel, and observing the difference (if any).
     
    Murray Symon, Jan 28, 2006
    #5
  6. darkknight

    Gordon Guest

    On Fri, 27 Jan 2006 21:26:28 +1300, darkknight wrote:

    > What does an expensive video card do better than a cheap video card?


    Makes better (more complex) moving pictures.
     
    Gordon, Jan 28, 2006
    #6
  7. darkknight

    darkknight Guest

    Re: What does a video card do? What is DirectX and X11?

    Thanks guys.

    --
     
    darkknight, Jan 28, 2006
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul Tutle Sr. - OCC
    Replies:
    1
    Views:
    1,457
    Hamman
    Oct 1, 2004
  2. BillKirch

    add better video card to an intergrated video card??

    BillKirch, Feb 1, 2004, in forum: Computer Information
    Replies:
    4
    Views:
    2,164
    Tom Dyer
    Feb 1, 2004
  3. =?Utf-8?B?QmphY29icw==?=

    Problems installing DirectX and windows Media Player in x64

    =?Utf-8?B?QmphY29icw==?=, Jul 31, 2005, in forum: Windows 64bit
    Replies:
    7
    Views:
    578
  4. =?Utf-8?B?RGF2ZSB0aGUgQnJhdmU=?=

    DirectX and Windows Media Player?

    =?Utf-8?B?RGF2ZSB0aGUgQnJhdmU=?=, Sep 3, 2005, in forum: Windows 64bit
    Replies:
    4
    Views:
    732
    =?Utf-8?B?RGF2ZSB0aGUgQnJhdmU=?=
    Sep 3, 2005
  5. Ian

    ATI Radeon HD 5830 DirectX-11 Video Card

    Ian, Feb 25, 2010, in forum: Front Page News
    Replies:
    0
    Views:
    1,342
Loading...

Share This Page