speed

Started by
5 comments, last by nefthy 18 years, 9 months ago
ok.. heres the problem. i have sufficient skills in c++ to write some nice code for myself to use... BUT.. i need to draw things to the screen.. like a 3d modeler program. i know how to draw to the screen calling opengl.. but i was wondering if my program will calculate super slow without a graphics card.. or do the drawing functions (basic polygon drawing) only use cpu and dont slow program too much?
Advertisement
I'm not quite sure if I get what you mean, but hopefully I do...

What OpenGL does, is allow have your program take advantage of a graphics card. So if you have one, then it'll run better than if you didn't have one. However, if you don't have a graphics card - or the graphics card doesn't support some function - the program will still work but won't be able to use hardware acceleration.

As for whether your computer could handle the calculations without the graphics card's hardware acceleration, it should do ok as long as it's not trying to draw too many polygons. For a simple game it'll do fine I should think.

Hope I've read your question right.
Thank you.

Got what i needed to know.

Another question while im here.

If i use opengl calls with a graphics card.. will the graphics card speed up the programs drawing or do i need to add extra code to make sure the card gets told to do the work?
If accelleration is available (3d graphics card and driver are installed) the opengl will use it. If not it will fallback to software mode.

Check out the first few tutorials at nehe they explane the basic very extensive, in a step by step fashion.

Btw. you probably have some sort of 3d acceleration unless you graphics card is realy old (> 6-7 years).
The basic answer is, don't worry it's probably running using Hardware acceleration (with no work on your part).

The slightly more involved answer is that OpenGL has a core feature set (currently version 1.5) and other funky things implimented in extensions. If you are running your code on Windows you will be limited to version 1.1 with all other features only accessible as extensions (ie, to use OpenGL 1.5 you will need a graphics card that supports it, and you will need to use extensions to get access to the features).

If you limit yourself to version 1.1 you are pretty much guarenteed that everything will be hardware accelerated (unless your graphics card is really really really old).

Using extensions will allow you to get access to some rendering methods that either give you better visual quality (eg, shaders) or better rendering speed (eg, Vertex Buffer Objects - VBO's). Extensions however require additional setup before you can use them. (or use a library like glew to do the setup for you).

With extensions, if they are not supported there is no software equivalent which is really where most of the extra work will come in.

You could of course use DirectX which will always fall back on software if not supported in hardware.
Depending on what you're doing, expect hardware to be 10-1000 times faster. I would have said 100-1000 but I stumbled on a case which lowered this estimation.
If you also have a slow CPU (compared to computations you need to carry on) then maybe you'll find that hardware is as slow as standard software but I hardly believe this is a realistic case.

While transferring work to GPU does not really take so much work, sometimes is better to bake the data in different ways so, you may find the transition somewhat harder than you expected. Problems like this however are unlikely unless you're doing something complicated and I don't think this is the case.

Previously "Krohm"

Quote:Original post by RobTheBloke
(currently version 1.5)


cerrent version is 2.0 which is implemented in both NVIDIA and ATI driver. Atleast there are some beta drivers for windows with 2.0 support.

This topic is closed to new replies.

Advertisement