OpenGL Blitter for OpenTTD

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

G4
Engineer
Engineer
Posts: 26
Joined: 01 Apr 2005 18:19
Location: Kiev, Ukraine

Re: OpenGL Blitter for OpenTTD

Post by G4 »

Tiberius, what kind of file extension is that???
Hopes and dreams - just at the next station
User avatar
belugas
OpenTTD Developer
OpenTTD Developer
Posts: 1507
Joined: 05 Apr 2005 01:48
Location: Deep down the deepest blue
Contact:

Re: OpenGL Blitter for OpenTTD

Post by belugas »

G4 wrote:Tiberius, what kind of file extension is that???
If you are talking about "opengl-080711_r13691.patch" then it's a file that contains the differences between the official source code of the game and the code that Tiberius is working on.
If you do not know how to compile a program (or if you do not know what compiling means), I could suggest this sticky:Howto apply a patch/diff file, or even better :
Our Wiki who would tell you a lot more than the above link

If it is not what you are asking for, you should maybe be more precise in your question ;)
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
bokkie
Transport Coordinator
Transport Coordinator
Posts: 327
Joined: 19 Jan 2007 19:26

Re: OpenGL Blitter for OpenTTD

Post by bokkie »

Possible bug found! Look at toolbar in the upper left corner, there's a horizontal red line when a vehicle 'disappears' behind the toolbar. And to reply to all earlier benchmarks: I don't have low FPS in my own games, the coop games are just very intensive probably :).

EDIT: bug 2 found: when making buildings transparant, water doesn't get transparent. See screenshot 2.
Attachments
Schietricht Transport, 1st Feb 1976.png
Red line in toolbar
(645.67 KiB) Downloaded 415 times
Schietricht Transport, 7 Feb 1976.png
Water not transparant
(903.75 KiB) Downloaded 391 times
ccfreak2k
Engineer
Engineer
Posts: 9
Joined: 25 Jun 2008 23:01
Location: California, United States

Re: OpenGL Blitter for OpenTTD

Post by ccfreak2k »

Maybe it's just me, but it looks like the patch doesn't patch against SVN anymore.
ccfreak2k
Engineer
Engineer
Posts: 9
Joined: 25 Jun 2008 23:01
Location: California, United States

Re: OpenGL Blitter for OpenTTD

Post by ccfreak2k »

I did my best to fix up the patch to work with a little more recent SVN revision. If any of you would like to test it, here it is.

If you find any display-related bugs that aren't hilighted in the first post, check to see if such a bug exists in a opengl-free build.

EDIT: Doesn't compile; try the one below.
Attachments
opengl14400.diff
OpenGL patch for revision 14400ish.
(166.23 KiB) Downloaded 158 times
Last edited by ccfreak2k on 27 Sep 2008 14:08, edited 1 time in total.
User avatar
fonso
President
President
Posts: 945
Joined: 13 Oct 2007 08:28

Re: OpenGL Blitter for OpenTTD

Post by fonso »

actually ccfreak's patch doesn't work at all. This one halfway works for sdlgl and serves to demonstrate that opengl isn't a solution for the clipping problems in FS#119 ...
Attachments
opengl_r14405.diff
(145.52 KiB) Downloaded 213 times
The guy on the picture is not me, it's Alonso.
GreatBunzinni
Engineer
Engineer
Posts: 18
Joined: 22 Dec 2006 11:53

Re: OpenGL Blitter for OpenTTD

Post by GreatBunzinni »

So what's the state of this patch? Has it been added to the trunk? Has it died?
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: OpenGL Blitter for OpenTTD

Post by Zuu »

GreatBunzinni wrote:So what's the state of this patch? Has it been added to the trunk? Has it died?
It has not been added to trunk. You can see that your self by looking on the change log or simply downloading last nightly. Also if it would have been added or close to being added I would expect much more activity about it on the forums and/or IRC.

The least you could expect if it was added to trunk is a notice in this thread that it has been added.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
GreatBunzinni
Engineer
Engineer
Posts: 18
Joined: 22 Dec 2006 11:53

Re: OpenGL Blitter for OpenTTD

Post by GreatBunzinni »

Zuu wrote: It has not been added to trunk. You can see that your self by looking on the change log or simply downloading last nightly. Also if it would have been added or close to being added I would expect much more activity about it on the forums and/or IRC.

The least you could expect if it was added to trunk is a notice in this thread that it has been added.
It seems a bit strange not do so. Wouldn't openttd benefit from the addition of a opengl blitter?
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: OpenGL Blitter for OpenTTD

Post by Rubidium »

GreatBunzinni wrote:Wouldn't openttd benefit from the addition of a opengl blitter?
Would a Toyota Prius benefit from getting it's engine replaced by a Ferrari Formula 1 engine?
bokkie
Transport Coordinator
Transport Coordinator
Posts: 327
Joined: 19 Jan 2007 19:26

Re: OpenGL Blitter for OpenTTD

Post by bokkie »

But OpenTTD developers have experimented with this F1 engine (http://wiki.openttd.org/wiki/index.php/Blitter) so what's the reason behind that? (Your reply seems to indicate that it's useless). Some sort of filtering on zoomed-out levels would make the game look nicer IMO (look at http://www.tt-forums.net/viewtopic.php? ... &sk=t&sd=a for instance, but this blitter 'hicks' when changing zoom-level). Also, wouldn't stepless zoom be an option with OpenGL? Not really necessary but 'nice to have'. Oh well, I understand that other things have priority but one can dream ;).
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: OpenGL Blitter for OpenTTD

Post by Rubidium »

bokkie wrote:But OpenTTD developers have experimented with this F1 engine (http://wiki.openttd.org/wiki/index.php/Blitter) so what's the reason behind that? (Your reply seems to indicate that it's useless).
I was merely pointing out that making assumptions that all and any patches are beneficial for OpenTTD is strange if not stupid. Yes, there's an opengl blitter and it might be useful. But until there is a properly functioning blitter without added artefacts there is absolutely no way of saying whether it would be faster or better than the current blitters; it's often the corner cases that take the most time.

Furthermore previous attempts to do the actual blitting have shown that the really blitting doesn't take much CPU; it's a few percent faster on multi[thread|core] CPUs and more than it is faster percent slower on single core/thread CPUs. Meaning that the blitter doesn't give most people an instant performance increase of significant magnitudes. This analysis has been made on a quite populated, but not 100% CPU game, however... one can always make their statistics meet their expectations by e.g. using an unpopulated map with a few moving industries and max-zoom-out on fast-forward, but is that a realistic scenario?
User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: OpenGL Blitter for OpenTTD

Post by CommanderZ »

Furthermore previous attempts to do the actual blitting have shown that the really blitting doesn't take much CPU; it's a few percent faster on multi[thread|core] CPUs and more than it is faster percent slower on single core/thread CPUs. Meaning that the blitter doesn't give most people an instant performance increase of significant magnitudes. This analysis has been made on a quite populated, but not 100% CPU game, however... one can always make their statistics meet their expectations by e.g. using an unpopulated map with a few moving industries and max-zoom-out on fast-forward, but is that a realistic scenario?
I dare to say that these are heavily populated maps with a lot of rails, trains etc, that suffer most from blitter performance. If I load such game on my machine, performance in paused mode is quite similiar to that in unpaused mode.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: OpenGL Blitter for OpenTTD

Post by Yexo »

CommanderZ wrote:
Furthermore previous attempts to do the actual blitting have shown that the really blitting doesn't take much CPU; it's a few percent faster on multi[thread|core] CPUs and more than it is faster percent slower on single core/thread CPUs. Meaning that the blitter doesn't give most people an instant performance increase of significant magnitudes. This analysis has been made on a quite populated, but not 100% CPU game, however... one can always make their statistics meet their expectations by e.g. using an unpopulated map with a few moving industries and max-zoom-out on fast-forward, but is that a realistic scenario?
I dare to say that these are heavily populated maps with a lot of rails, trains etc, that suffer most from blitter performance. If I load such game on my machine, performance in paused mode is quite similiar to that in unpaused mode.
Why are you so sure that is due to blitter performance? Have you profiled openttd with the result of the blitter taking most of the cpu time or is it just a guess? In the latter case my guess is that the problem is not because of the blitter, but due to the pahtfinders, tile loop, etc.
User avatar
Thief^
Route Supervisor
Route Supervisor
Posts: 469
Joined: 10 Oct 2004 00:11

Re: OpenGL Blitter for OpenTTD

Post by Thief^ »

Yexo wrote:
CommanderZ wrote:I dare to say that these are heavily populated maps with a lot of rails, trains etc, that suffer most from blitter performance. If I load such game on my machine, performance in paused mode is quite similiar to that in unpaused mode.
Why are you so sure that is due to blitter performance? Have you profiled openttd with the result of the blitter taking most of the cpu time or is it just a guess? In the latter case my guess is that the problem is not because of the blitter, but due to the pahtfinders, tile loop, etc.
If the pathfinders are causing slowdown in paused mode then openttd has bigger problems.
Melt with the Shadows,
Embrace your destiny...
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: OpenGL Blitter for OpenTTD

Post by Yexo »

Thief^ wrote:If the pathfinders are causing slowdown in paused mode then openttd has bigger problems.
Indeed. I should read better next time :oops:
User avatar
nex259
Engineer
Engineer
Posts: 11
Joined: 13 Mar 2009 13:52

Re: OpenGL Blitter for OpenTTD

Post by nex259 »

I am trying to modify this patch correspond to SVN r15680 ,but it doesn't go well. :(
---
Sorry my bad English...
nex259
---
User avatar
Vaulter
Traffic Manager
Traffic Manager
Posts: 185
Joined: 21 Dec 2004 05:35
Skype: andrey-zaharov
Location: St. Petersburg, Russia
Contact:

Re: OpenGL Blitter for OpenTTD

Post by Vaulter »

any progress?
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1729
Joined: 30 Mar 2005 09:43

Re: OpenGL Blitter for OpenTTD

Post by peter1138 »

Nobody is working on this as there is simply no point. OpenGL doesn't really lend itself well to partial screen updates and "non-powers of 2" sized sprites.
He's like, some kind of OpenTTD developer.
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Re: OpenGL Blitter for OpenTTD

Post by SirkoZ »

petern wrote:..."non-powers of 2" sized sprites.
Wouldn't GL_ARB_texture_non_power_of_two help (if of course the partial updates were sorted)?
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Bing [Bot] and 11 guests