@Capehill I probabaly need to create few test cases (one for opengl, and another for opengles) where just blit something in the window and trying to resize it, to see if there will be bug arise.
Probabaly it not related to the fact how window created, its maybe more about context creation. Maybe it only happens with ogles2 (i use OGLES2_CCT_RESIZE_VIEWPORT,TRUE when create ogles2 context when use gl4es, can be related).
@Raziel Do you mean to choice when show "busy" icon and when show "non-busy" one, something like that ? At moment everything is hardcoded as i can see, you can only use icon coming with the binary. Capehill can clarify more about of course.
@Capehill Reading your bugreport on warp3dnova, as well as issue in sdl2 tickets about ogles2, did it all mean that you have now hardware with working gfx card which support ogles2/warp3dnova/etc ? If so that will be cool !
It already chooses the apps icons as iconificated icon. Problem was that i was testing the app from shell. Doing that resulted in the iconifated icon being the shell icon instead of the apps one.
Bad news, that patch for minigl about replacing "&&" to "||" in the glTexImage() broken things : Cube and Lugaru (both on os4depot) have problems with textures: Lugaru in menu have white textures, and Cube in game itself have some mess with textures.
Installed, rebuilt and tested some bugs (unfortunately still there, the MiniGL update didn't make a differerence either, so those bugs seems to be SDL genuine)
INFO: SDL2 renderer benchmark v. 0.5 (SDL version 2.0.9)
INFO: This tool measures the speed of various 2D drawing features
INFO: Press ESC key to quit
INFO: Parameters: width 800, height 600, renderer name '(null)', iterations 100, objects 100, sleep 0
INFO: Image size 408*167
INFO: Pixel format 0x16161804 (SDL_PIXELFORMAT_RGB888)
INFO: Starting to test renderer called [compositing], flags 0xE
INFO: Points [mode: None]...100 frames drawn in 0.035 seconds => 2828.2 frames per second
INFO: Points [mode: Blend]...100 frames drawn in 0.030 seconds => 3376.0 frames per second
INFO: Points [mode: Add]...100 frames drawn in 0.029 seconds => 3400.3 frames per second
INFO: Points [mode: Mod]...100 frames drawn in 0.030 seconds => 3381.8 frames per second
INFO: Lines [mode: None]...100 frames drawn in 0.189 seconds => 528.6 frames per second
INFO: Lines [mode: Blend]...100 frames drawn in 1.915 seconds => 52.2 frames per second
INFO: Lines [mode: Add]...100 frames drawn in 1.831 seconds => 54.6 frames per second
INFO: Lines [mode: Mod]...100 frames drawn in 1.874 seconds => 53.4 frames per second
INFO: FillRects [mode: None]...100 frames drawn in 0.188 seconds => 530.6 frames per second
INFO: FillRects [mode: Blend]...100 frames drawn in 0.335 seconds => 298.4 frames per second
INFO: FillRects [mode: Add]...100 frames drawn in 0.314 seconds => 318.8 frames per second
INFO: FillRects [mode: Mod]...100 frames drawn in 0.315 seconds => 317.7 frames per second
INFO: RenderCopy [mode: None]...100 frames drawn in 0.023 seconds => 4295.0 frames per second
INFO: RenderCopy [mode: Blend]...100 frames drawn in 0.025 seconds => 3946.2 frames per second
INFO: RenderCopy [mode: Add]...100 frames drawn in 0.028 seconds => 3579.6 frames per second
INFO: RenderCopy [mode: Mod]...100 frames drawn in 0.030 seconds => 3326.1 frames per second
INFO: RenderCopyEx [mode: None]...100 frames drawn in 0.023 seconds => 4331.6 frames per second
INFO: RenderCopyEx [mode: Blend]...100 frames drawn in 0.027 seconds => 3710.2 frames per second
INFO: RenderCopyEx [mode: Add]...100 frames drawn in 0.051 seconds => 1976.4 frames per second
INFO: RenderCopyEx [mode: Mod]...100 frames drawn in 0.027 seconds => 3723.6 frames per second
INFO: Color modulation [mode: None]...100 frames drawn in 0.242 seconds => 413.5 frames per second
INFO: Color modulation [mode: Blend]...100 frames drawn in 0.244 seconds => 409.8 frames per second
INFO: Color modulation [mode: Add]...100 frames drawn in 0.243 seconds => 411.2 frames per second
INFO: Color modulation [mode: Mod]...100 frames drawn in 0.284 seconds => 352.3 frames per second
INFO: Alpha modulation [mode: None]...100 frames drawn in 0.025 seconds => 3982.2 frames per second
INFO: Alpha modulation [mode: Blend]...100 frames drawn in 0.028 seconds => 3574.9 frames per second
INFO: Alpha modulation [mode: Add]...100 frames drawn in 0.030 seconds => 3371.8 frames per second
INFO: Alpha modulation [mode: Mod]...100 frames drawn in 0.030 seconds => 3363.6 frames per second
INFO: UpdateTexture [mode: None]...100 frames drawn in 0.047 seconds => 2146.8 frames per second, 2232.6 operations per second
INFO: UpdateTexture [mode: Blend]...100 frames drawn in 0.056 seconds => 1776.4 frames per second, 1847.4 operations per second
INFO: UpdateTexture [mode: Add]...100 frames drawn in 0.051 seconds => 1952.1 frames per second, 2030.1 operations per second
INFO: UpdateTexture [mode: Mod]...100 frames drawn in 0.052 seconds => 1928.6 frames per second, 2005.8 operations per second
INFO: ReadPixels [mode: None]...0 frames drawn in 0.210 seconds => 0.0 frames per second, 476.5 operations per second
INFO: ReadPixels [mode: Blend]...0 frames drawn in 0.218 seconds => 0.0 frames per second, 458.0 operations per second
INFO: ReadPixels [mode: Add]...0 frames drawn in 0.222 seconds => 0.0 frames per second, 450.4 operations per second
INFO: ReadPixels [mode: Mod]...0 frames drawn in 0.205 seconds => 0.0 frames per second, 486.8 operations per second
INFO: Starting to test renderer called [opengl], flags 0x2
INFO: Points [mode: None]...100 frames drawn in 0.045 seconds => 2241.2 frames per second
INFO: Points [mode: Blend]...100 frames drawn in 0.045 seconds => 2243.4 frames per second
INFO: Points [mode: Add]...100 frames drawn in 0.045 seconds => 2238.8 frames per second
INFO: Points [mode: Mod]...100 frames drawn in 0.045 seconds => 2237.8 frames per second
INFO: Lines [mode: None]...100 frames drawn in 0.057 seconds => 1761.7 frames per second
INFO: Lines [mode: Blend]...100 frames drawn in 0.059 seconds => 1683.5 frames per second
INFO: Lines [mode: Add]...100 frames drawn in 0.060 seconds => 1677.8 frames per second
INFO: Lines [mode: Mod]...100 frames drawn in 0.064 seconds => 1552.3 frames per second
INFO: FillRects [mode: None]...100 frames drawn in 0.253 seconds => 394.7 frames per second
INFO: FillRects [mode: Blend]...100 frames drawn in 0.282 seconds => 354.3 frames per second
INFO: FillRects [mode: Add]...100 frames drawn in 0.261 seconds => 383.4 frames per second
INFO: FillRects [mode: Mod]...100 frames drawn in 0.272 seconds => 367.9 frames per second
INFO: RenderCopy [mode: None]...100 frames drawn in 0.059 seconds => 1709.1 frames per second
INFO: RenderCopy [mode: Blend]...100 frames drawn in 0.050 seconds => 2015.4 frames per second
INFO: RenderCopy [mode: Add]...100 frames drawn in 0.051 seconds => 1949.5 frames per second
INFO: RenderCopy [mode: Mod]...100 frames drawn in 0.050 seconds => 2013.9 frames per second
INFO: RenderCopyEx [mode: None]...100 frames drawn in 0.049 seconds => 2037.4 frames per second
INFO: RenderCopyEx [mode: Blend]...100 frames drawn in 0.051 seconds => 1967.7 frames per second
INFO: RenderCopyEx [mode: Add]...100 frames drawn in 0.049 seconds => 2038.1 frames per second
INFO: RenderCopyEx [mode: Mod]...100 frames drawn in 0.054 seconds => 1853.7 frames per second
INFO: Color modulation [mode: None]...100 frames drawn in 0.044 seconds => 2249.2 frames per second
INFO: Color modulation [mode: Blend]...100 frames drawn in 0.043 seconds => 2345.3 frames per second
INFO: Color modulation [mode: Add]...100 frames drawn in 0.047 seconds => 2106.1 frames per second
INFO: Color modulation [mode: Mod]...100 frames drawn in 0.049 seconds => 2026.0 frames per second
INFO: Alpha modulation [mode: None]...100 frames drawn in 0.050 seconds => 2019.3 frames per second
INFO: Alpha modulation [mode: Blend]...100 frames drawn in 0.052 seconds => 1938.0 frames per second
INFO: Alpha modulation [mode: Add]...100 frames drawn in 0.060 seconds => 1655.2 frames per second
INFO: Alpha modulation [mode: Mod]...100 frames drawn in 0.050 seconds => 2009.4 frames per second
INFO: UpdateTexture [mode: None]...100 frames drawn in 0.073 seconds => 1377.8 frames per second, 1432.9 operations per second
INFO: UpdateTexture [mode: Blend]...100 frames drawn in 0.078 seconds => 1282.8 frames per second, 1334.1 operations per second
INFO: UpdateTexture [mode: Add]...100 frames drawn in 0.073 seconds => 1365.2 frames per second, 1419.8 operations per second
INFO: UpdateTexture [mode: Mod]...100 frames drawn in 0.076 seconds => 1321.1 frames per second, 1374.0 operations per second
INFO: ReadPixels [mode: None]...0 frames drawn in 0.372 seconds => 0.0 frames per second, 268.7 operations per second
INFO: ReadPixels [mode: Blend]...0 frames drawn in 0.381 seconds => 0.0 frames per second, 262.7 operations per second
INFO: ReadPixels [mode: Add]...0 frames drawn in 0.394 seconds => 0.0 frames per second, 253.7 operations per second
INFO: ReadPixels [mode: Mod]...0 frames drawn in 0.371 seconds => 0.0 frames per second, 269.2 operations per second
INFO: Starting to test renderer called [opengles2], flags 0xA
INFO: Points [mode: None]...100 frames drawn in 0.105 seconds => 956.6 frames per second
INFO: Points [mode: Blend]...100 frames drawn in 0.024 seconds => 4088.8 frames per second
INFO: Points [mode: Add]...100 frames drawn in 0.031 seconds => 3278.4 frames per second
INFO: Points [mode: Mod]...100 frames drawn in 0.034 seconds => 2947.6 frames per second
INFO: Lines [mode: None]...100 frames drawn in 0.024 seconds => 4085.5 frames per second
INFO: Lines [mode: Blend]...100 frames drawn in 0.025 seconds => 4081.5 frames per second
INFO: Lines [mode: Add]...100 frames drawn in 0.024 seconds => 4090.6 frames per second
INFO: Lines [mode: Mod]...100 frames drawn in 0.024 seconds => 4086.5 frames per second
INFO: FillRects [mode: None]...100 frames drawn in 0.038 seconds => 2652.9 frames per second
INFO: FillRects [mode: Blend]...100 frames drawn in 0.036 seconds => 2783.2 frames per second
INFO: FillRects [mode: Add]...100 frames drawn in 0.042 seconds => 2373.0 frames per second
INFO: FillRects [mode: Mod]...100 frames drawn in 0.036 seconds => 2790.1 frames per second
INFO: RenderCopy [mode: None]...100 frames drawn in 0.037 seconds => 2708.0 frames per second
INFO: RenderCopy [mode: Blend]...100 frames drawn in 0.045 seconds => 2198.4 frames per second
INFO: RenderCopy [mode: Add]...100 frames drawn in 0.024 seconds => 4180.8 frames per second
INFO: RenderCopy [mode: Mod]...100 frames drawn in 0.024 seconds => 4179.0 frames per second
INFO: RenderCopyEx [mode: None]...100 frames drawn in 0.033 seconds => 2991.8 frames per second
INFO: RenderCopyEx [mode: Blend]...100 frames drawn in 0.032 seconds => 3112.4 frames per second
INFO: RenderCopyEx [mode: Add]...100 frames drawn in 0.033 seconds => 2987.8 frames per second
INFO: RenderCopyEx [mode: Mod]...100 frames drawn in 0.034 seconds => 2933.8 frames per second
INFO: Color modulation [mode: None]...100 frames drawn in 0.026 seconds => 3893.8 frames per second
INFO: Color modulation [mode: Blend]...100 frames drawn in 0.026 seconds => 3893.5 frames per second
INFO: Color modulation [mode: Add]...100 frames drawn in 0.026 seconds => 3882.3 frames per second
INFO: Color modulation [mode: Mod]...100 frames drawn in 0.030 seconds => 3298.8 frames per second
INFO: Alpha modulation [mode: None]...100 frames drawn in 0.025 seconds => 3922.2 frames per second
INFO: Alpha modulation [mode: Blend]...100 frames drawn in 0.026 seconds => 3905.8 frames per second
INFO: Alpha modulation [mode: Add]...100 frames drawn in 0.026 seconds => 3915.7 frames per second
INFO: Alpha modulation [mode: Mod]...100 frames drawn in 0.026 seconds => 3901.8 frames per second
INFO: UpdateTexture [mode: None]...100 frames drawn in 0.029 seconds => 3417.4 frames per second, 3554.1 operations per second
INFO: UpdateTexture [mode: Blend]...100 frames drawn in 0.029 seconds => 3416.1 frames per second, 3552.8 operations per second
INFO: UpdateTexture [mode: Add]...100 frames drawn in 0.027 seconds => 3668.4 frames per second, 3815.1 operations per second
INFO: UpdateTexture [mode: Mod]...100 frames drawn in 0.029 seconds => 3405.1 frames per second, 3541.3 operations per second
INFO: ReadPixels [mode: None]...0 frames drawn in 0.411 seconds => 0.0 frames per second, 243.1 operations per second
INFO: ReadPixels [mode: Blend]...0 frames drawn in 0.425 seconds => 0.0 frames per second, 235.4 operations per second
INFO: ReadPixels [mode: Add]...0 frames drawn in 0.413 seconds => 0.0 frames per second, 242.2 operations per second
INFO: ReadPixels [mode: Mod]...0 frames drawn in 0.417 seconds => 0.0 frames per second, 239.7 operations per second
INFO: Starting to test renderer called [software], flags 0x9
INFO: Points [mode: None]...100 frames drawn in 0.718 seconds => 139.3 frames per second
INFO: Points [mode: Blend]...100 frames drawn in 0.699 seconds => 143.1 frames per second
INFO: Points [mode: Add]...100 frames drawn in 0.718 seconds => 139.3 frames per second
INFO: Points [mode: Mod]...100 frames drawn in 0.994 seconds => 100.6 frames per second
INFO: Lines [mode: None]...100 frames drawn in 0.726 seconds => 137.8 frames per second
INFO: Lines [mode: Blend]...100 frames drawn in 0.869 seconds => 115.0 frames per second
INFO: Lines [mode: Add]...100 frames drawn in 0.822 seconds => 121.6 frames per second
INFO: Lines [mode: Mod]...100 frames drawn in 0.821 seconds => 121.8 frames per second
INFO: FillRects [mode: None]...100 frames drawn in 1.103 seconds => 90.6 frames per second
INFO: FillRects [mode: Blend]...100 frames drawn in 6.695 seconds => 14.9 frames per second
INFO: FillRects [mode: Add]...100 frames drawn in 3.548 seconds => 28.2 frames per second
INFO: FillRects [mode: Mod]...100 frames drawn in 4.960 seconds => 20.2 frames per second
INFO: RenderCopy [mode: None]...100 frames drawn in 0.824 seconds => 121.4 frames per second
INFO: RenderCopy [mode: Blend]...100 frames drawn in 1.252 seconds => 79.9 frames per second
INFO: RenderCopy [mode: Add]...100 frames drawn in 1.011 seconds => 98.9 frames per second
INFO: RenderCopy [mode: Mod]...100 frames drawn in 1.022 seconds => 97.8 frames per second
INFO: RenderCopyEx [mode: None]...100 frames drawn in 2.825 seconds => 35.4 frames per second
INFO: RenderCopyEx [mode: Blend]...100 frames drawn in 1.218 seconds => 82.1 frames per second
INFO: RenderCopyEx [mode: Add]...100 frames drawn in 1.560 seconds => 64.1 frames per second
INFO: RenderCopyEx [mode: Mod]...100 frames drawn in 2.347 seconds => 42.6 frames per second
INFO: Color modulation [mode: None]...100 frames drawn in 0.762 seconds => 131.2 frames per second
INFO: Color modulation [mode: Blend]...100 frames drawn in 0.789 seconds => 126.7 frames per second
INFO: Color modulation [mode: Add]...100 frames drawn in 0.751 seconds => 133.2 frames per second
INFO: Color modulation [mode: Mod]...100 frames drawn in 0.783 seconds => 127.7 frames per second
INFO: Alpha modulation [mode: None]...100 frames drawn in 0.886 seconds => 112.9 frames per second
INFO: Alpha modulation [mode: Blend]...100 frames drawn in 1.365 seconds => 73.3 frames per second
INFO: Alpha modulation [mode: Add]...100 frames drawn in 1.145 seconds => 87.3 frames per second
INFO: Alpha modulation [mode: Mod]...100 frames drawn in 1.083 seconds => 92.3 frames per second
INFO: UpdateTexture [mode: None]...100 frames drawn in 1.016 seconds => 98.5 frames per second, 102.4 operations per second
INFO: UpdateTexture [mode: Blend]...100 frames drawn in 1.477 seconds => 67.7 frames per second, 70.4 operations per second
INFO: UpdateTexture [mode: Add]...100 frames drawn in 1.256 seconds => 79.6 frames per second, 82.8 operations per second
INFO: UpdateTexture [mode: Mod]...100 frames drawn in 1.223 seconds => 81.8 frames per second, 85.0 operations per second
INFO: ReadPixels [mode: None]...0 frames drawn in 0.024 seconds => 0.0 frames per second, 4109.6 operations per second
INFO: ReadPixels [mode: Blend]...0 frames drawn in 0.026 seconds => 0.0 frames per second, 3875.4 operations per second
INFO: ReadPixels [mode: Add]...0 frames drawn in 0.025 seconds => 0.0 frames per second, 4079.1 operations per second
INFO: ReadPixels [mode: Mod]...0 frames drawn in 0.026 seconds => 0.0 frames per second, 3852.2 operations per second
INFO: Bye bye
I'd love to test the ogles2 mode to see if that makes an impact in-app regarding speed of drawing operations...
No problem, i'll stand for RC3 (or a debug beta) then.
Ah, ok
So, i guess those games don't use SDL?
I'm intruiged to try out ogles2 for scummvm/residualvm once more (the last test was cut short due to bugs back then), so i'm also standing by for the fix.
Maybe you could give me another heads up when those become available? That would be grand
Thanks a lot for the new SDL2 version (and the SDL1 debug build)!
Definitely try OGLES2! I just configured ScummVM with:
--opengl-mode=gles2
If you get the shader compilation hickup during the startup, we can work around or report it. At the moment I'm not sure whether it is a ScummVM, OpenGL ES 2 or driver issue.
wrt to OGLES2 The configuration and compiling is not a problem, it's the "hiccup" you so nicely put. But it's not a "hiccup", rather a missing shader(part) implementation in our gfx driver, exactly the boolean uniforms (now that i said it, i think i forgot about it when speaking of trying it out again, there's no point since those shader parts aren't supported [yet?])
I have both a compiled exe of scummvm and residualvm sitting in my development partition, both done with ogles2, just they don't start (say - crash on startup) because of those boolean uniforms not being supported (see also here for reference). The same (but even worse) is with residualvm, since they rely heavily on shaders (for their 3D engines)
Hans answered on when he would think this boolean uniforms will get supported. (Not very encouraging either)
I'm also not very fond of doing workarounds, i'd rather have it supported by the system and not alter code, or i will surely forget what i had to do to make it work and as soon as a new version of the app comes out i'll be starting from scratch all over again :-/
wrt to the "games"...i meant those you mentioned in one of your last posts and with them the fact that ogles2 for sdl2 is broken atm, so i asked if they aren't sdl(?) (and i just now realized that it's only one game :-/
Quote:
SDL_renderer's OpenGL ES 2 backend is broken at the moment. I'm trying to figure it out. I have requested help from both Daniel and Hans.
Regarding performance: I ported Diamonds and Dust (2D game) to OpenGL ES 2: it is 2x-3x faster than MiniGL on my current setup.
I renamed "texture" to "s_texture", and voela, compiled. So I was pondering whether to report this issue or not but I haven't had investigated more yet.
Quote:
wrt to the "games"...i meant those you mentioned in one of your last posts and with them the fact that ogles2 for sdl2 is broken atm
No, OGLES2 (context) for SDL2 is not generally broken. It's only the SDL_Renderer's OGLES2 backend (one of four possible backends). SDL_Renderer is used by some 2D games but why worry about OpenGL(ES2) here since you could use the compositing backend.
But if it's that easy in scummvm i'll try myself and test. You could report it since you can describe what is going wrong better than me. I think we can hijack another thread for that, Hans asked for stuff that should be supported in MiniGL future versions...i'll use that opportunity
Quote:
No, OGLES2 (context) for SDL2 is not generally broken. It's only the SDL_Renderer's OGLES2 backend (one of four possible backends). SDL_Renderer is used by some 2D games but why worry about OpenGL(ES2) here since you could use the compositing backend.
Because with "compositing" renderer in place fps in some games (where fps display is supported) went up by 0.5-1 fps, which is not worth it. That may be because those engines/scummvm dosn't make use of certain drawing routines (and as thus nothing is optimized) or the fact that composite is not as fast in comparision as i thought it might be.
I renamed "texture" to "s_texture", and voela, compiled. So I was pondering whether to report this issue or not but I haven't had investigated more yet.
texture2D is deprecated since GLSL 1.30 and its replacement is the overloaded GLSL function texture() ... Looks like you get a conflict here because of that. Adding an explicit #version tag (probably below 1.30) on top of your GLSL might help.
I tried, built with the workaround and side by side tested some of the more demanding games...there is, unfortunately, no visible or feelable difference.
Where the intro on one game needs 52 seconds with pure SDL2/OpenGL it needs 50 seconds with ogles2, while both stress out the cpu to max (might have also been a slow finger when pressing the stopwatch).
The same have i witnessed when using compositing.
Seems the engines doesn't really use the shaders...