View Full Version : re opening arbitrarily censored thread
gringo
11-26-2005, 07:26 PM
Please note that this is a 'library free' thread, not concerning any particular library but any possible library wanted to be used as a software 2D drawing wrapper (using directdraw, sdl, clanlib or gdi if you want to):
And the other question is .. if I have all my textures in video memory, and I my two screen buffers (the true and the copy) are in video memory, then I shouldn't be making CPU copying at all. It should be all handled by the video card. Now, if I want to make a new screen and blit the surfaces on the new screen, it should be all done in video memory, and the CPU shouldn't have to work, then, shouldn't it be as fast as using direct3d or opengl in these cases?
Ricardo C
11-26-2005, 07:48 PM
Yeah, this is gonna end well.
gringo
11-26-2005, 07:53 PM
Okay, now.. we can assume then that if we're programming a game in 'ANY 2d library' ... that can handle hardware surfaces, and the user actually owns a 3D card (with enough vram I suppose), then .. under the condition that our game do not uses any rotating / scaling / alpha blending, there is no need to use dirty rects, and the game (should) run at least as fast as if it is using a 3D library, even ptk or blitzmax.
Rainer Deyke
11-26-2005, 08:35 PM
In my experience, using OpenGL is slightly faster than Direct3D and a lot faster than DirectDraw through SDL in this case. It shouldn't be, since the graphics card isn't doing any more work when working through DirectDraw, but it is. I think what it comes down to are crappy DirectDraw drivers that either waste CPU time, waste GPU time, or both. Of course the extra overhead from SDL (or any other high level wrapper library) isn't helping either, although I doubt that it makes any major difference. Keep in mind that this is just my personal observation based for the most part on a single computer, so it is probably not universally applicable.
I missed the last argument, so I appologize if this has already been said, and I appologize for beating the dead horse.
In my experience, using OpenGL is slightly faster than Direct3D and a lot faster than DirectDraw through SDL in this case.
Video card manufacturers design their hardware around Direct3D features nowaday, so that really shouldn't be possible. Unless there is some flagrent flaw in the API interface design of Direct3D that isn't the case in OpenGL, it shouldn't be the case. Not trying to sound like an ass here, but without evidence of such a flaw, you or SDL must be doing something wrong, or you're test hardware is dated.
Despite the performance gains, the cross platform nature of OpenGL is enough for me to prefer it. I don't need some sugar coated "GL is bettah" marketing or fanboy campaign to sell me.
svero
11-26-2005, 11:21 PM
There is a difference between discussions of a particular game lib and general game development questions. The idea behind not encouraging particular questions about specific platforms is that those sorts of discussions are better off left to the forums for those products or technologies. While it's not exactly off-topic, we didn't want to encourage a flood of threads here about some particular popcap engine thing or blitz 3D setup etc... Those are best discussed on popcap's forums or the Blitz forums since they aren't really of general interest to everyone making games. If I use DX in c++ do I really want to wade through 10 threads about how to animate sprites in Delphi? So it's not a completely arbitrary distinction. It may be debatable whether the thread should have been closed as maybe it did contain some posts or ideas of general interest, but there's no point in making off the cuff side-comments insulting the mods for trying to keep the board clean.
gringo: Just because all your resources are in video memory doesn't mean a CPU copy won't ever take place. A stupid example would be to lock a DDraw surface and write to the bits; there will be a CPU copy to your vram resources. Another example would be using vertex arrays in OpenGL without VBOs; you'll get a CPU copy there, too. I believe one of the OpenGL rect copy functions also involves a CPU copy. And in all of these cases you are going completely through the API.
While there are general consistencies here and there (e.g. anything with a system memory pointer is a bad sign), the only way to be sure is to study the docs you are given for your particular library and ask support if anything is unclear.
PoV: Yeah, you're pretty much spot on there. DirectX drivers get more attention than OpenGL in general. One exception however is that immediate mode rendering is generally faster in OpenGL. One example of this is with simple instancing (e.g. particles), drawing a number of particles with glVertex() calls is generally faster than issuing a bunch of glDrawArrays() calls referencing geometry in a VBO due to driver overhead. DirectX has no facility for this, making OpenGL faster at this.
svero: Your moderator work is appreciated, thanks :) (I know you don't hear it often)
vBulletin v3.6.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.