OpenGL Blitter for OpenTTD
Moderator: OpenTTD Developers
Re: OpenGL Blitter for OpenTTD
This one is using 9800 PRO 128 MB
- Attachments
-
- CL.png (10.02 KiB) Viewed 5740 times
Re: OpenGL Blitter for OpenTTD
Uploaded a new binary version for ATI card users to test, please read the first post.
I may implement/fix/tweak/eat/ditch it soon (or in distant future, if at all, so don't hold your breath).
If anyone want to be the one please implement it for us all
If anyone want to be the one please implement it for us all
Re: OpenGL Blitter for OpenTTD
A glitch when drawing graphs.
This was done using the binary from the first post (hf6bcefa7M), on Vista Business and nVidia GF 8400M GS.
This was done using the binary from the first post (hf6bcefa7M), on Vista Business and nVidia GF 8400M GS.
- Attachments
-
- Unnamed, 23rd Sep 1950.png (156.92 KiB) Viewed 5601 times
Re: OpenGL Blitter for OpenTTD
The new build works on my ATI x1950pro. Now where did you zoom in? FPS in the city to the left is much lower than in the middle where there are not many buildings, and scrolling also affects FPS pretty much. What are your plans for the following future? Improving performance, adding features? Overall FPS seems to be good zoomed in and zoomed out level 1, but other levels aren't that playable yet (on my decent videocard, most OpenTTD players will have worse probably).Tiberius wrote:Apparently the bottleneck of OTTD is not at blitter, and FPS is greatly affected by 'visible sprite count'.
I think it's quite reasonable since OTTD Z-sorts sprites itself before sending them to blitter, and do many redraws assuming blitter don't have Z-testing functionality (yeah! after all they're 2D 'blitters')
I tested with #openttdcoop Public Server Game 96 extensively when implementing it, and the performance on my computer FYI:
C2D @ 2400MHz, NVIDIA 7600GT
(window size 1024x768)
zoomed in: ~230fps
zoomed out 1 level: ~180fps
zoomed out 2 levels:~120fps
zoomed out 3 levels: ~20fps (!)
(window size 1680x1050)
zoomed in: ~130fps
zoomed out 1 level: ~120fps
zoomed out 2 levels:~60fps
zoomed out 3 levels: ~15fps
EDIT: newwater doesn't look good zoomed out, see attachment
- Attachments
-
- Metropolis, 18 Sep 2201.png
- (644.05 KiB) Downloaded 284 times
Re: OpenGL Blitter for OpenTTD
Mchl:
Thanks. Will look into that issue ...
bokkie:
Thanks for your feedback. I won't add 'new features' just yet, the current priority is to stabilize performance. ATI X1950PRO seems way better than my NV 7600GT price-wise here, but as you see this blitter seems doesn't reflect the difference
Still need quite some work to know the 'taste' of ATI cards, perhaps some actions are showstoppers on ATI but not eating much performance on my GF .........
Oh, and be sure to DISABLE ANY antialiasing, texture interpolation, automatic mip-map generation things, since the scrolling is implemented as copy-to-texture -> draw a quad at new location ...
Thanks. Will look into that issue ...
bokkie:
Thanks for your feedback. I won't add 'new features' just yet, the current priority is to stabilize performance. ATI X1950PRO seems way better than my NV 7600GT price-wise here, but as you see this blitter seems doesn't reflect the difference
Still need quite some work to know the 'taste' of ATI cards, perhaps some actions are showstoppers on ATI but not eating much performance on my GF .........
Oh, and be sure to DISABLE ANY antialiasing, texture interpolation, automatic mip-map generation things, since the scrolling is implemented as copy-to-texture -> draw a quad at new location ...
I may implement/fix/tweak/eat/ditch it soon (or in distant future, if at all, so don't hold your breath).
If anyone want to be the one please implement it for us all
If anyone want to be the one please implement it for us all
-
- Transport Coordinator
- Posts: 340
- Joined: 06 Feb 2006 23:58
Re: OpenGL Blitter for OpenTTD
About the supplied patchfile:
(Toirtoise)Subversion 1.4.6 could not read it.
(Toirtoise)Subversion 1.5.0 could read it, but had some problems with "/dev/null" on windows
So i had to manually create the new files.
In case anyone else has trouble too, here is my resulting patchfile.
(GLee.h/c still need to be downloaded seperately)
(Toirtoise)Subversion 1.4.6 could not read it.
(Toirtoise)Subversion 1.5.0 could read it, but had some problems with "/dev/null" on windows
So i had to manually create the new files.
In case anyone else has trouble too, here is my resulting patchfile.
(GLee.h/c still need to be downloaded seperately)
- Attachments
-
- opengl_r13639.diff
- (96.93 KiB) Downloaded 131 times
Re: OpenGL Blitter for OpenTTD
Mmm after reading your reply I'd like to rephrase, I just didn't notice any stuttering in these two zoomlevels, as opposed to the other two zoomlevels.Tiberius wrote:Mchl:
Thanks. Will look into that issue ...
bokkie:
Thanks for your feedback. I won't add 'new features' just yet, the current priority is to stabilize performance. ATI X1950PRO seems way better than my NV 7600GT price-wise here, but as you see this blitter seems doesn't reflect the difference
Still need quite some work to know the 'taste' of ATI cards, perhaps some actions are showstoppers on ATI but not eating much performance on my GF .........
Oh, and be sure to DISABLE ANY antialiasing, texture interpolation, automatic mip-map generation things, since the scrolling is implemented as copy-to-texture -> draw a quad at new location ...
Maybe it's worthwile to provide a benchmark: the said scenario, center on 'Roelofarendsveen' and then FPS on the four zoomlevels @ 1680x1050 (windowed, unpaused): ~250 / ~210 / ~90 / ~20 FPS (on the different 4 zoomlevels). While 90 is playable, scrolling makes the FPS drop a lot so this zoomlevel isn't 'stutter-free' while playing. I'm playing at a Core 2 Duo @ 2 GHz with an Ati Radeon x1950pro (Catalyst 8.3)
Last edited by bokkie on 24 Oct 2008 15:30, edited 1 time in total.
Re: OpenGL Blitter for OpenTTD
bokkie:
Thanks for your feedback! Please try the updated binary, I think I've nailed the scrolling problem
It should make zoomed out 4x very playable, but I dunno if 8x will. Perhaps you can provide some updated benchmarks?
And actually I fixed an transparent-buildings-get-smeared-when-scrolling bug too
The updated binary/patch is at the first post.
Thanks for your feedback! Please try the updated binary, I think I've nailed the scrolling problem
It should make zoomed out 4x very playable, but I dunno if 8x will. Perhaps you can provide some updated benchmarks?
And actually I fixed an transparent-buildings-get-smeared-when-scrolling bug too
The updated binary/patch is at the first post.
I may implement/fix/tweak/eat/ditch it soon (or in distant future, if at all, so don't hold your breath).
If anyone want to be the one please implement it for us all
If anyone want to be the one please implement it for us all
- CommanderZ
- Tycoon
- Posts: 1872
- Joined: 07 Apr 2008 18:29
- Location: Czech Republic
- Contact:
Re: OpenGL Blitter for OpenTTD
It still drops to ~3 fps when max zoomed out and scrolling for me.
-
- Engineer
- Posts: 52
- Joined: 08 Mar 2004 21:14
- Location: Sunderland UK
Re: OpenGL Blitter for OpenTTD
This is now working on my RADEON 9550.
- StopRightThere
- Chief Executive
- Posts: 761
- Joined: 18 Dec 2005 20:10
- Location: United Kingdom
Re: OpenGL Blitter for OpenTTD
It's working great on Radeon 3870 here.
Bye Bye OpenBVE
Official TT-Hot young ginger Doctor Who assistant FanClub
Formerly known as AdditionalData
Official TT-Hot young ginger Doctor Who assistant FanClub
Formerly known as AdditionalData
Re: OpenGL Blitter for OpenTTD
The story isn't over yet! An OpenGL SDL video driver is HERE for those who don't play on the Win32 platform!* Check the first post.
OpenTTD runs a LOT smoother using the sdlgl/opengl driver/blitter pair than with the standard sdl/32bpp-anim pair on my desktop Slackware box. Callgrind seems to concur. Your mileage may vary.
The only known issue remaining so far is switching to a "pre-baked" resolution causing the screen to not render correctly anymore. Restarting OpenTTD fixes it. This problem may be in the opengl blitter instead of sdlgl...
* You still need SDL and OpenGL for it to work...
OpenTTD runs a LOT smoother using the sdlgl/opengl driver/blitter pair than with the standard sdl/32bpp-anim pair on my desktop Slackware box. Callgrind seems to concur. Your mileage may vary.
The only known issue remaining so far is switching to a "pre-baked" resolution causing the screen to not render correctly anymore. Restarting OpenTTD fixes it. This problem may be in the opengl blitter instead of sdlgl...
* You still need SDL and OpenGL for it to work...
Last edited by ccfreak2k on 06 Jul 2008 08:06, edited 2 times in total.
Re: OpenGL Blitter for OpenTTD
Updated the patch to include SDL OpenGL video driver hacked by ccfreak2k, please check the first post
I may implement/fix/tweak/eat/ditch it soon (or in distant future, if at all, so don't hold your breath).
If anyone want to be the one please implement it for us all
If anyone want to be the one please implement it for us all
Re: OpenGL Blitter for OpenTTD
Now it is: ~310 / ~280 / ~185 / ~20. Performance-while-scrolling is also a lot better but it still eats FPS, f.i. FPS drops from ~185 to ~90 when scrolling.bokkie wrote:the said scenario, center on 'Roelofarendsveen' and then FPS on the four zoomlevels @ 1680x1050 (windowed, unpaused): ~250 / ~210 / ~90 / ~20 FPS (on the different 4 zoomlevels).
Re: OpenGL Blitter for OpenTTD
(The updated patch is at the first post of this thread, as usual.)
Updated the patch so that MinGW/Cygwin users can build it correctly. Also it won't compile OpenGL stuff anymore while OpenGL is not enabled. Bugfix in SDLGL driver too.
The OpenGL blitter itself isn't changed much however. I was trying MSAA but didn't get very pleasant results yet ...
Updated the patch so that MinGW/Cygwin users can build it correctly. Also it won't compile OpenGL stuff anymore while OpenGL is not enabled. Bugfix in SDLGL driver too.
The OpenGL blitter itself isn't changed much however. I was trying MSAA but didn't get very pleasant results yet ...
I may implement/fix/tweak/eat/ditch it soon (or in distant future, if at all, so don't hold your breath).
If anyone want to be the one please implement it for us all
If anyone want to be the one please implement it for us all
-
- Traffic Manager
- Posts: 178
- Joined: 09 Apr 2008 01:37
Re: OpenGL Blitter for OpenTTD
Haven't tested it yet, because honestly my video card is pretty terrible (it has a terrible time rendering transparencies and particle/smoke effects in 3D).
However, I was wondering what the plan is for openTTD graphics if there's OpenGL support now. Will the 32bpp graphics somehow benefit from this?? Or is someone working on a complete 3D overhaul?
However, I was wondering what the plan is for openTTD graphics if there's OpenGL support now. Will the 32bpp graphics somehow benefit from this?? Or is someone working on a complete 3D overhaul?
- CommanderZ
- Tycoon
- Posts: 1872
- Joined: 07 Apr 2008 18:29
- Location: Czech Republic
- Contact:
Re: OpenGL Blitter for OpenTTD
OGL works natively in 32 bpp and works faster (even with my old weak GeForce) than 8 bpp. I've tried 32 bpp once (I meant without OGL) and the game suffered massive slow-down - it was unplayable on my computer.
Re: OpenGL Blitter for OpenTTD
Please refer to my earlier post about the topicVoxDissident wrote: However, I was wondering what the plan is for openTTD graphics if there's OpenGL support now. Will the 32bpp graphics somehow benefit from this?? Or is someone working on a complete 3D overhaul?
And for anyone who want to compare benchmark with 32bpp blitters -- remember to add this line into your openttd.cfg:
Code: Select all
sprite_cache_size = 64
Under this settings 32bpp-anim would be well-playable on my computer, but the profiling result still shows OpenGL blitter have some performance improvement, which is probably a good news for 32bpp-sprites users having a capable graphics card (this one's done by ccfreak2k): A complete 3D overhaul is very unlikely, even if possible, since we have to support original blitters for those who don't have suitable hardware to use OpenGL blitter. But given this blitter, it's probably easier to do some hacks like ... the good-old doublesize filter (now with bilinear filtering) ?! But no, I don't even start coding this yet
I've also updated the Win32 binary pack in the first post. The graph-line problem should be fixed now.
==
And for the Fraps fps thing.
I believe it means 'how long did it take to render a frame', not 'how much frames did it actually rendered' in the past second ... so when it displays 500fps it doesn't mean OpenTTD actually displayed 500 frames in the past second, but means OpenTTD can display 500 frames if every frame only need so much time to render. In other words, under the 500fps situation we have much more CPU power left to handle other things like larger maps, more vehicles, etc. than a 30fps situation.
I may implement/fix/tweak/eat/ditch it soon (or in distant future, if at all, so don't hold your breath).
If anyone want to be the one please implement it for us all
If anyone want to be the one please implement it for us all
-
- Transport Coordinator
- Posts: 340
- Joined: 06 Feb 2006 23:58
Re: OpenGL Blitter for OpenTTD
My experiments showed fraps really shows the amount of rendered frames within the last second.Tiberius wrote: And for the Fraps fps thing.
I believe it means 'how long did it take to render a frame', not 'how much frames did it actually rendered' in the past second ... so when it displays 500fps it doesn't mean OpenTTD actually displayed 500 frames in the past second, but means OpenTTD can display 500 frames if every frame only need so much time to render. In other words, under the 500fps situation we have much more CPU power left to handle other things like larger maps, more vehicles, etc. than a 30fps situation.
I limited the fps with some sleep() calls and measured the time like:
starttime = now;
render();
fps = 1 / (now - starttime);
fraps showed only the fps which were really rendered, instead of what could be (the fps i measured myself above)
Re: OpenGL Blitter for OpenTTD
An update regarding repeatedly encoding of PNG sprites. Please refer to the first post.
I may implement/fix/tweak/eat/ditch it soon (or in distant future, if at all, so don't hold your breath).
If anyone want to be the one please implement it for us all
If anyone want to be the one please implement it for us all
Who is online
Users browsing this forum: No registered users and 5 guests