|
This thread is locked; no one can reply to it. |
1
2
|
Another screen update API |
Richard Phipps
Member #1,632
November 2001
|
23 doesn't see the need for a DRS system in a screen update library. I am not sure myself if it's only going to be used in certain specialised situations. |
clovekx
Member #3,479
April 2003
|
I disagree to have this hi-level API in Allegro library. It should be an addon. Why to use so complex screen update API? Anybody can write his own or download only what he really needs. Why to have a triple buffering or DRS possibility if you don't want to use it? --- |
Mandrake Root Produc
Member #300
April 2000
|
right, that's what I said, make an add-on lib. |
ReyBrujo
Moderator
January 2001
|
I would prefer joining the blits instead of preprocessing them, but that is up to you. -- |
axilmar
Member #1,204
April 2001
|
Quote: I am not sure myself if it's only going to be used in certain specialised situations. Lot's of 2d non-scrolling games need it. Quote: Why to use so complex screen update API? It's about 3 functions to use. Why do you think it is complex? Quote: Anybody can write his own I seriously doubt that. Quote: or download only what he really needs. I seriously doubt that too. You have to know that such an update method exists, in order to search for it. Most newbies don't. Quote: Why to have a triple buffering or DRS possibility if you don't want to use it? Allegro has many many things that are not used 99% of the time...and it lacks the one thing that 100% of its users need, and that is the screen update method. Add-on or not, such a piece of code is really needed. |
Marcello
Member #1,860
January 2002
|
Marcello |
Richard Phipps
Member #1,632
November 2001
|
Not quite:
So still done in 3 parts. |
Thomas Fjellstrom
Member #476
June 2000
|
shouldn't that be:
Less overhead. split in horizontal strips, should even blit faster. -- |
Gideon Weems
Member #3,925
October 2003
|
Richard Phipps
Member #1,632
November 2001
|
No, the routine I described would scan down and find one large unbroken rectange upon finding the corner of 1. It wouldn't check each row completely and stop if the row started earlier or finished later than the one above. Thomas, that method would be faster in this case, but slower in others. EDIT: Er.. I'm talking about the routine I made. Not about other methods. Wasn't that Marcello's question? |
Gideon Weems
Member #3,925
October 2003
|
Richard Phipps
Member #1,632
November 2001
|
Not as far as I know. You'd have to talk to Axilmar about that one.. |
clovekx
Member #3,479
April 2003
|
Quote: I seriously doubt that too. You have to know that such an update method exists, in order to search for it. Most newbies don't. If they don't know about it and they also do something, then they don't probably need it. They can just read the example. Quote: and it lacks the one thing that 100% of its users need, and that is the screen update method. I don't. You don't need that kind of API if you don't want to have more than one update method. --- |
23yrold3yrold
Member #1,134
March 2001
|
Quote: 23 doesn't see the need for a DRS system in a screen update library. I am not sure myself if it's only going to be used in certain specialised situations. To clarify, I don't see why it can't be seperate. A DRS API and my screen update API, both of which can be used seperately or together, would be kick-arse. I'm pretty much calling my API done, so if someone wants to build a DRS that works with it, go ahead. I have no need for a DRS and no knowledge of how to even make one, so I wash my hands of that. -- |
axilmar
Member #1,204
April 2001
|
Quote: Not as far as I know. You'd have to talk to Axilmar about that one.. You can do anything with the piece of code I posted. Quote: If they don't know about it and they also do something, then they don't probably need it. What if they later find out they need it? Quote: They can just read the example. I don't think the Allegro's example DRS is a good solution. It can be improved in so many ways, as it has been shown in this thread. Quote: I don't. You don't need that kind of API if you don't want to have more than one update method. I don't have use for compiled sprites either, or midi, or streaming, or FLI etc...but that's hardly an argument. Furthermore, all games make use of a screen update method; so why should't a screen update API be there out of the box? Quote: To clarify, I don't see why it can't be seperate It can be separate, but the point is to offer a complete solution. DRS is only a few lines of code...does it really worth the hassle of a separate download? especially since the context is the same? |
Evert
Member #794
November 2000
|
Quote: Furthermore, all games make use of a screen update method; so why should't a screen update API be there out of the box? Having a common, transparent screen update API that handles triple buffering, page flipping or double buffering is something that IMO has a place in Allegro. It was also part of the original Allegro 5 draft, as I remember. Quote: DRS is only a few lines of code...does it really worth the hassle of a separate download? I see no reason a DRS couldn't be included with the update API. Someone needs to write it though. |
X-G
Member #856
December 2000
|
I second Evert/axilmar on both accounts. Just, you know, in case. -- |
clovekx
Member #3,479
April 2003
|
Quote: I don't have use for compiled sprites either, or midi, or streaming, or FLI etc...but that's hardly an argument. It's not supposed to be. But you said: Quote: thing that 100% of its users need Allegro HAS screen update API. What about to add all the addons you can find in resource directory. Or we could also add pathfinding. It's also very useful. O, and it's not there yet. Quote: or streaming Do you mean audiostreaming? --- |
axilmar
Member #1,204
April 2001
|
Quote: It's not supposed to be. Then why you said it then? Quote: Allegro HAS screen update API. What do you mean? it does not. If it did, neither 23, nor me or any other person would make one. Quote: What about to add all the addons you can find in resource directory. Or we could also add pathfinding. It's also very useful. O, and it's not there yet. A screen update API is something used by 100% of games, and therefore need to be in the core Allegro library. Path finding or any other functionality is not. |
Richard Phipps
Member #1,632
November 2001
|
I agree with Axilmar on this one. Something like Chris's lib should be merged with Allegro. A DRS system (if short) would be not too much extra work for the potential gain for some users. |
Korval
Member #1,538
September 2001
|
I agree that giving the API control over screen updating is good. I disagree that having a DRS system in the API is a good idea. Here's one reason: a DRS system requires that the underlying system support a specific kind of buffering: copy-based buffering. OpenGL, however, supports arbitrary buffering; that is, they specifically tell you that the contents of the back buffer after a swap are undefined. They could be what the front buffer was (flip), it could retain the back buffer data (copy). It could copy random garbage from an arbitrary piece of video memory into the back buffer, and it will still comply with the OpenGL specification. If GL-based 2D is at all a priority, then you cannot put something in the API that directly conflicts with it. BTW, I am aware that, in theory, you can create copy-based rendering in OpenGL (using intermediate textures or render targets). However, this is needlessly slow. Lastly, DRS, in and of itself, is a pretty outdated technology. If you're running a TNT2 or better, you can easily render an entire screen's worth of 2D data (including strings, etc) at well over 30 (if not 60)fps. It sounds very efficient, and it is, but if you're relying on hardware acceleration, it is efficiency that you will never use. [edit] However, after thinking about it a bit, I wouldn't be adverse to having AllegroPro provide optional support for a DRS-style framebuffer update mechanism. Because AllegroPro is designed to allow drivers to opt-in/out of various framebuffer update mechanisms, it's no problem to have drivers that can actually support it use it, and the GL driver (among others) not. |
Evert
Member #794
November 2000
|
Quote: I agree with Axilmar on this one. Something like Chris's lib should be merged with Allegro. I have Chris's merged with my local tree here in a draft for a new graphics API. Works beautifully. I'll see about merging Chris's current version with the 4.1 code branch. Quote: Here's one reason: a DRS system requires that the underlying system support a specific kind of buffering: copy-based buffering. OpenGL, however, supports arbitrary buffering; that is, they specifically tell you that the contents of the back buffer after a swap are undefined. The DRS system could simply fail to initialize on OpenGL - just as the tripple buffering system fails to initialize on drivers that don't support it (ie, X11 - although I see no real reason why it couldn't be made to work there). The main problem with a DRS that I see is that you either need to manually mark rectangles as dirty (as user), or have each draw operation to the screen mark an area as dirty. |
23yrold3yrold
Member #1,134
March 2001
|
Quote: I have Chris's merged with my local tree here in a draft for a new graphics API. Works beautifully. I'll see about merging Chris's current version with the 4.1 code branch. Hey; cool! Hope you're using the newest version; found a bad bug last night ... -- |
Bob
Free Market Evangelist
September 2000
|
Quote: I disagree that having a DRS system in the API is a good idea. The DRs can simply be hints to the API. -- |
|
1
2
|