Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How does C++ communicate with the video card? 1

Status
Not open for further replies.

NoobOne

Programmer
Dec 14, 2004
8
US
Im new to C.

I downloaded the Microsoft DirectX 9.0 SDK update (summer 2004). Im guessing its a tool I can use, hehe.

Am I close to being on the right track?
 
Yeah, if you don't care about being cross platform, you can use DirectX. OpenGL is another option.

Don't use DirectX if you're new to C++. I couldn't understand DirectX until I'd been using C++ for over two years. I never programmed in any other language before learning C++, but still. DirectX is definately not for the inexperienced.

You might look into OpenGL, it's simpler and more straightforward. If you use GLUT, you won't even have to worry about win32. My advice is: learn C++ very well before worrying about graphics. Then learn to use OpenGL or Direct3D, and if you want to make useful applications with one of these, you'll need a good understanding of Win32 as well. Lastly, if you want to be able to do anything competently with graphics, you're going to need to understand the math behind it. Become familiar with vectors, dot and cross products, projections, matrices, matrix multiplication, linear transformations (and specific types of them), and orthographic and perspective projections. I think that's enough homework for now :).
 
Thanks timmay

What do you think about NVIDIA Cg, GPU's?

Been looking through that, looks just like C.
 
I think the point is that you should maybe learn the basics of C/C++ before venturing into any non-standard APIs.
 
Cg is a shading language. I believe it is exclusively for writing shaders, which are small programs executed entirely on the video card for modifying vertices or pixels. It's not a graphics API like DirectX, you can't use it to render a scene, and you have to use DirectX or OpenGL to load and set the shader. Shaders are pretty simple to write, although I haven't done too much with them myself, and Cg and HLSL (another shading language) are very similar to C as you mentioned. But sedj is right: don't try graphics programming until you are comfortable with the language normally.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top