PDA

View Full Version : I need a graphics API


Stalin55
2006.07.04, 03:12 AM
Several years ago I was working on a 2d isometric graphics engine using Carbon C and basic quickdraw routines. I am now starting to program again and I am just getting aquainted with some of the changes which I am forced to face(QuickDraw is deprecated and I can no longer use CodeWarrior).

Well my intent now is to program a relatively simple 2d isometric rpg engine and since I can't use QuickDraw, my understanding is that my remaining two options are Quartz or OpenGL(I do not want to use any kind of third party engine).

I am not very familiar with Quartz but I do have a little bit of experience with OpenGl. Now keep in mind that my engine will be 2D and fairly simplistic.

I guess what I'm getting at is can anyone offer me any insight or advice as to which route I should be pursuing, if either(BTY, I am progamming in Carbon C if it makes any difference)?

unknown
2006.07.04, 03:48 AM
Carbon and C means you should use OpenGL.
If you choose to use Cocoa then Quartz is an ok option.

OneSadCookie
2006.07.04, 04:16 AM
Quartz is generally too slow (or at least, too hard to make fast ;) for any kind of animated content. Go with OpenGL.

I don't really agree with unknown -- Quartz is pretty much equally miserable regardless of whether you're using the C or ObjC APIs, and you quite often need to dip into the C APIs from ObjC anyway :)

Taxxodium
2006.07.04, 04:17 AM
If you choose to use Cocoa then Quartz is an ok option.

Quartz is slow in systems before 10.4. You should use OpenGL, no matter what since it's the defacto standard.

unknown
2006.07.04, 04:33 AM
I was actually quite able to make a decent isometric tile based editor using Quartz only. I dont know what the complaints about speed are from, probably from updating the entire window instead of only the required parts.
Also didn't hooptie use Quartz for all its graphics (pre 10.4).

OneSadCookie
2006.07.04, 05:48 AM
yes, and was too slow to be playable on most machines at the time ^_^

Stalin55
2006.07.04, 02:24 PM
Is all of QuickDraw deprecated, including CopyBits() or is it just certain functions? Also, does anyone know where I can find a list of the deprecated functions?

Stalin55
2006.07.04, 04:47 PM
Another question I forgot to include in my last post was also about the same thing. Basically I have an old and fairly simple 2d isometric engine written in Carbon C which uses GWorlds to store tile and character pics and then assembles them all to another GWorld and then copies them to the screen(all done using copybits).

Since this engine of mine is fairly simple I would love to update it(if possible) and create a game with it.

Short of creating an entiely new engine from scratch I could not really use OpenGL with this previous engine. So I guess what I'm getting at is, is there some kind of API or library which has similar routines to QuickDraw for copying and creating offscreen buffers so that I could simply replace all of my QuickDraw calls?

OneSadCookie
2006.07.04, 06:48 PM
Yes, all of QuickDraw is deprecated, including some bits that are still necessary to work with non-deprecated QuickTime APIs :blink:

You can read the header if you need to know about a specific function.

You should be able to replace GWorlds with OpenGL textures or PBuffers/FBOs, and CopyBits with "drawing a textured quad" pretty close to one-to-one -- I wouldn't expect you to need to radically change your engine.