Ats wrote: ↑Wed Jan 16, 2019 10:04 amCan that come from the compilation parameters of the libzgeandroid.so? Or is it a bug in the source code?
Since it appears it's being caused by the BitmapCombine component that would mean it's probably a bug in the ZGameEditor source code. You could double-check this by deleting the BitmapCombine component from the DonutBitmap, in which case it should start with the values being TRUE on the Xperia X as well.
In any case, it's good news .. since you can already fix this yourself by calling "glEnable(GL_CULL_FACE)" and "glEnable(GL_DEPTH_TEST)" after your Bitmaps ( using BitmapCombine ) have been generated.
So I had to double check because the result is weird: On the Xperia X (and on the Nexus 5 I'm testing right now) the donut is inside out with both parameters being FALSE during please wait, even though I removed the BitmapCombine component in DonutBitmap.
On Galaxy S6, it still start OK and TRUE.
So I made a few more tests:
TEST 1 : BUG - With BitmapCombine
DonutMaterial
MaterialTexture DonutBitmap
DonutBitmap
BitmapLoad RedBitmap
BitmapLoad BlueBitmap
BitmapCombine
RedBitmap
BitmapExpression
BlueBitmap
BitmapExpression
TEST 2 : BUG - Without BitmapCombine
DonutMaterial
MaterialTexture DonutBitmap
DonutBitmap
BitmapLoad RedBitmap
BitmapLoad BlueBitmap
RedBitmap
BitmapExpression
BlueBitmap
BitmapExpression
TEST 3: OK - Only one BitmapLoad
DonutMaterial
MaterialTexture DonutBitmap
DonutBitmap
BitmapLoad RedBitmap
RedBitmap
BitmapExpression
TEST 4: OK - Most simple
DonutMaterial
MaterialTexture RedBitmap
RedBitmap
BitmapExpression
TEST 5: OK - Two BitmapExpression in a row without BitmapCombine
DonutMaterial
MaterialTexture RedBitmap
RedBitmap
BitmapExpression (red)
BitmapExpression (blue)
TEST 6: OK - Two BitmapNoise in a row without BitmapCombine
DonutMaterial
MaterialTexture RedBitmap
RedBitmap
BitmapNoise (red)
BitmapNoise (blue)
Last edited by Ats on Thu Jan 17, 2019 6:33 pm, edited 1 time in total.
Ats wrote: ↑Thu Jan 17, 2019 5:12 pmSo I had to double check because the result is weird: On the Xperia X (and on the Nexus 5 I'm testing right now) the donut is inside out with both parameters being FALSE during please wait, even though I removed the BitmapCombine component in DonutBitmap.
Aha, so it's not caused by BitmapCombine after-all Not exactly sure what to suspect now ... could it a multi-threading problem perhaps?
But that's exactly what the test-project is doing .. reading out GL_CULL_FACE and GL_DEPTH_TEST using glGetIntegerv and toggling between TRUE and FALSE using glDisable and glEnable ( after the "PLEASE WAIT" period ), and all those things work just fine.
Ok then maybe it is TZApplication.Init method that is called too early on the problematic phone so that the initial value (via TGLDriverBase.InitGL) of GL_DEPTH_TEST is not properly set?
VilleK wrote: ↑Fri Jan 18, 2019 10:16 amOk then maybe it is TZApplication.Init method that is called too early on the problematic phone so that the initial value (via TGLDriverBase.InitGL) of GL_DEPTH_TEST is not properly set?
Hmm .. hadn't thought of that. Seems kind of weird that only "TEST 1" and "TEST 2" as reported by Ats on would "fail" in that case though.
Little side-note, any specific reason why you are toggling the Material.ZBuffer flag using glDepthFunc and glDepthMask ( line 256 of GLDrivers.pas ) instead of glEnable / glDisable?
Kjell wrote: ↑Fri Jan 18, 2019 10:48 am
Little side-note, any specific reason why you are toggling the Material.ZBuffer flag using glDepthFunc and glDepthMask ( line 256 of GLDrivers.pas ) instead of glEnable / glDisable?
That does look a bit funny, perhaps I predicted the ZBuffer setting would evolve into a list of different depth buffer settings later. I guess it was over 10 years ago that code was written so I no longer remember