Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Error excecuting?
Index -> Programming, C++ -> C++ Help
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
wtd




PostPosted: Thu Nov 10, 2005 7:26 pm   Post subject: (No subject)

Flikerator wrote:
Also can't you access the graphics card with C++?


Theoretically. Do you think you can write better code than the people who wrote the drivers for the card?
Sponsor
Sponsor
Sponsor
sponsor
md




PostPosted: Thu Nov 10, 2005 8:38 pm   Post subject: (No subject)

wtd wrote:
Flikerator wrote:
Also can't you access the graphics card with C++?


Theoretically. Do you think you can write better code than the people who wrote the drivers for the card?


In practicality your program runs in it's own virtual memory, and no matter how hard you try you simply can't write to the real video memory without a lot of work (ei. implementing your own driver). It's by far simpler to use a graphics library to do any outputting.

Also Flikerator, although there is a sort function in the standard libraries it is not by any means part of the language; language and library are a key distinction.
Flikerator




PostPosted: Fri Nov 11, 2005 4:57 pm   Post subject: (No subject)

Im a little confused. Whats the point of a graphics card if you can't use it to run games??? I thought you could write code that draws on your graphics card to handle the pictures, 3D models, ext instead of your RAM doing it Question
wtd




PostPosted: Fri Nov 11, 2005 5:18 pm   Post subject: (No subject)

Flikerator wrote:
Im a little confused. Whats the point of a graphics card if you can't use it to run games??? I thought you could write code that draws on your graphics card to handle the pictures, 3D models, ext instead of your RAM doing it Question


And so you can.

By calling functions from libraries that do that for you.

Here's the real question: why should you be concerned about where the execution takes place? Shouldn't you just write the logic of your program and let the libraries decide where the execution should take place?
rizzix




PostPosted: Fri Nov 11, 2005 6:31 pm   Post subject: (No subject)

Flikerator wrote:
Im a little confused. Whats the point of a graphics card if you can't use it to run games??? I thought you could write code that draws on your graphics card to handle the pictures, 3D models, ext instead of your RAM doing it Question


OpenGL / directx libraries usually automatically interact with your graphics card.. through the installed vendor-drivers
Flikerator




PostPosted: Fri Nov 11, 2005 7:00 pm   Post subject: (No subject)

Well yah thats what I meant by using the graphics card, through the libraries in Dev. Thats why I was a little confused Confused
wtd




PostPosted: Fri Nov 11, 2005 7:07 pm   Post subject: (No subject)

Flikerator wrote:
Well yah thats what I meant by using the graphics card, through the libraries in Dev. Thats why I was a little confused Confused


You'll have to forgive us. When you said that C and C++ could access the graphics card and treated it like something special, we naturally thought you meant something veyr low-level, since OpenGL programs can be written in many languages.
md




PostPosted: Fri Nov 11, 2005 10:03 pm   Post subject: (No subject)

wtd wrote:
Flikerator wrote:
Well yah thats what I meant by using the graphics card, through the libraries in Dev. Thats why I was a little confused Confused


You'll have to forgive us. When you said that C and C++ could access the graphics card and treated it like something special, we naturally thought you meant something veyr low-level, since OpenGL programs can be written in many languages.

In the good old days of DOS in order to take advantage of different video cards you really did have to write you own drivers, and one for every card you wanted to support too. Great fun! Now thanks to OpenGL and DirectX things are actually mostly painless and fairly standardized over all graphics cards.

If you're really interested in how video cards render things in 3d, C++ and C are both really good for writing your own renderer in (thanks to the ease of pointer manipulation); the only hard part is that you need to use other libraries to draw the final image in the end.
Sponsor
Sponsor
Sponsor
sponsor
wtd




PostPosted: Fri Nov 11, 2005 10:07 pm   Post subject: (No subject)

Pointers aren't necessary. Such things can be done in languages which don't have user-accessible pointers.
md




PostPosted: Fri Nov 11, 2005 10:59 pm   Post subject: (No subject)

Yes, I didn't say you couldn't do it without pointers... only that pointers make certain things really nice and quick. Dynamically allocated arrays are also nice (although I'm sure they are available in these other languages too)
Flikerator




PostPosted: Sat Nov 12, 2005 10:46 am   Post subject: (No subject)

Thats one of the reasons I switched from turing because it couldn't use the graphics card. Im still a long way from that though, I still havn't used vectors, or pointers ext..[/b]
Display posts from previous:   
   Index -> Programming, C++ -> C++ Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 2  [ 26 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: