One in two BitmapFont lose transparency on Android

Found a bug? Post information about it here so we can fix it!

Moderator: Moderators

User avatar
Ats
Posts: 706
Joined: Fri Sep 28, 2012 10:05 am
Contact:

One in two BitmapFont lose transparency on Android

Post by Ats »

There is a bug on Android with fonts. It was hard to track down.
So I made a simple test to show it up:

Code: Select all

<?xml version="1.0" encoding="iso-8859-1" ?>
<ZApplication Name="App" Caption="Test Font" ClearColor="0.251 0.502 0.502 1" FileVersion="2" AndroidPackageName="com.txori.test_font">
  <OnRender>
    <UseMaterial Material="BlackMaterial"/>
    <RenderText Text="BLACK0" X="-0.3" Y="0.8" Scale="0.52">
      <RenderCharExpression>
<![CDATA[//Modify current character before render.
//CharX,CharY : current coordinate
//CharI : current character index (read only)
//CharRotate : current character rotation in radians
//CharScale : current character scale

//CharY=sin(App.Time+CharI*0.5)*0.5;]]>
      </RenderCharExpression>
    </RenderText>
    <RenderText Text="BLACK1" X="-0.3" Y="0.4" Scale="0.52">
      <RenderCharExpression>
<![CDATA[//Modify current character before render.
//CharX,CharY : current coordinate
//CharI : current character index (read only)
//CharRotate : current character rotation in radians
//CharScale : current character scale

//CharY=sin(App.Time+CharI*0.5)*0.5;]]>
      </RenderCharExpression>
    </RenderText>
    <RenderText Text="BLACK2" X="-0.3" Scale="0.52">
      <RenderCharExpression>
<![CDATA[//Modify current character before render.
//CharX,CharY : current coordinate
//CharI : current character index (read only)
//CharRotate : current character rotation in radians
//CharScale : current character scale

//CharY=sin(App.Time+CharI*0.5)*0.5;]]>
      </RenderCharExpression>
    </RenderText>
    <RenderText Text="BLACK3" X="-0.3" Y="-0.4" Scale="0.52">
      <RenderCharExpression>
<![CDATA[//Modify current character before render.
//CharX,CharY : current coordinate
//CharI : current character index (read only)
//CharRotate : current character rotation in radians
//CharScale : current character scale

//CharY=sin(App.Time+CharI*0.5)*0.5;]]>
      </RenderCharExpression>
    </RenderText>
    <RenderText Text="BLACK4" X="-0.3" Y="-0.8" Scale="0.52">
      <RenderCharExpression>
<![CDATA[//Modify current character before render.
//CharX,CharY : current coordinate
//CharI : current character index (read only)
//CharRotate : current character rotation in radians
//CharScale : current character scale

//CharY=sin(App.Time+CharI*0.5)*0.5;]]>
      </RenderCharExpression>
    </RenderText>
    <UseMaterial Material="AlphaMaterial"/>
    <RenderText Text="ALPHA5" X="0.3" Y="0.8" Scale="0.52">
      <RenderCharExpression>
<![CDATA[//Modify current character before render.
//CharX,CharY : current coordinate
//CharI : current character index (read only)
//CharRotate : current character rotation in radians
//CharScale : current character scale

//CharY=sin(App.Time+CharI*0.5)*0.5;]]>
      </RenderCharExpression>
    </RenderText>
    <RenderText Text="ALPHA6" X="0.3" Y="0.4" Scale="0.52">
      <RenderCharExpression>
<![CDATA[//Modify current character before render.
//CharX,CharY : current coordinate
//CharI : current character index (read only)
//CharRotate : current character rotation in radians
//CharScale : current character scale

//CharY=sin(App.Time+CharI*0.5)*0.5;]]>
      </RenderCharExpression>
    </RenderText>
    <RenderText Text="ALPHA7" X="0.3" Scale="0.52">
      <RenderCharExpression>
<![CDATA[//Modify current character before render.
//CharX,CharY : current coordinate
//CharI : current character index (read only)
//CharRotate : current character rotation in radians
//CharScale : current character scale

//CharY=sin(App.Time+CharI*0.5)*0.5;]]>
      </RenderCharExpression>
    </RenderText>
    <RenderText Text="ALPHA8" X="0.3" Y="-0.4" Scale="0.52">
      <RenderCharExpression>
<![CDATA[//Modify current character before render.
//CharX,CharY : current coordinate
//CharI : current character index (read only)
//CharRotate : current character rotation in radians
//CharScale : current character scale

//CharY=sin(App.Time+CharI*0.5)*0.5;]]>
      </RenderCharExpression>
    </RenderText>
    <RenderText Text="ALPHA9" X="0.3" Y="-0.8" Scale="0.52">
      <RenderCharExpression>
<![CDATA[//Modify current character before render.
//CharX,CharY : current coordinate
//CharI : current character index (read only)
//CharRotate : current character rotation in radians
//CharScale : current character scale

//CharY=sin(App.Time+CharI*0.5)*0.5;]]>
      </RenderCharExpression>
    </RenderText>
  </OnRender>
  <Content>
    <Group Name="FontBlack">
      <Children>
        <Bitmap Name="BlackBitmap" Width="529" Height="165">
          <Producers>
            <BitmapFromFile Comment="Imported from Pixel_LCD7_bold_double_black.png" Transparency="1" HasAlphaLayer="1" DataWidth="529" DataHeight="165">
              <BitmapFile>
<![CDATA[789CED5C5B92ED360EBB7BCAFED736F9989ACA89C796F800294882ABF0D3DDA64090A078BA6FF2E7CF9FFFFC11044110044110FE85BFFEFAEB15AB790982200882C08BAFFD417B842008822060C174C7CEEEFFD95EF0FBB5E733CB11AD43245E34FFCE1A769E89D2A393E30E3A647A72856E2BF367E62208ABC1D4CF483F7E3D5FF9A17588C4DB6126759EB9C3ACDE59874C4F76EAB6327F662E82B01ABFBD6BFDACDEC9C5FA3C7D68F9D94A1D22F132F98FF4E8AA11FA4CA41E9D1C77D0C1CAB52A3F4FDC95F933D5421018D1751F587964FC69797F36A7103A58EE594F2DA24F450DADFA32F4C34C932CCF8E7DAA4A07AB1E15F979FDB132FFCE5AFCF241CF5741A8C2C80F5D7BC4D39B557B4464567A7598F1EFDC21BCDCB3FD32CB6F453F7C6991D525B3AFAED6C1A3077A3E44FDB12AFFAE5A3C3955CE5B4140A2E34EF072A8D823AC3322A383E75E89BE9FD10251C7CE1DE22D07840E59AED67B24AB7D850E5E3D907B12933FBCFD50598BB79895F356109060DC21B21EFDFACC30CA23AB83952F2A4E4607F67EA9EC872CD72F4D2BB48FEAE0B9F7677A787A7A177F44FA01DD93234E95B35610D060DD21A21E1DED0F553B84773ECEF4AC9A938839B56A87F8CA29A24394EB4C53B4F6111D3CBB8D450F446F33F923DA0FC89E1CC5A89CB3825001E61DE2E92F0FBC3E8DEA809E8F6F713340CFAB953B04B21FBC5C3DF7364AFB0A1D227A647A9CD51F9EFCAB6B81F08C20AC42C79D80E290990F9919F1F56ED57C7C8B8F9A93D99A76F40B433F78EBEC3DD373AE5707EBF73D7A447A9DD51F99FCBD795B51395F05A1121D774217878E19F1FCF9AAF9C8A0E7AA7E61E8874C9D513D11B9B7223F63D563A516AB7DC1968B20B0403B44EC5DE699A21D0213277A67A27AC3BB43A07ECEA2A935BFAC062CBE60DC89048101DA2162EF7AE6F64935BD6587C8DC19A8FB867187B0E6C7E88F153B65B7F705A11BDA2162EF8E7E7EF50CD10E51DF0FB33A7BEF9B0CFFEE1D6296DFECBC55FE40E4AF3D4210FE0DEFFC99A19243651CB40E15B3C37B7E56CFCA5A9DD40F967A5573E8DE21BEF29BF562853FBA7DA13D4210FEC1C80B917B33E2172B076B9C592C561DACB965E7E5CE3B045B3F3070F0EE10C8BEF0EC0C0CFB032A7F8BEECFFC91F3401058F0E503AB47107EB170F0C61AC563D52192938583478768AD10B177EB07060ED11D02D917D6B895FB83F541E61FD11E95BB20B060F6D9C1FBA0666CC67791780C3A58794538A07859EF8ACA9E64E8874E0E5F1A7BF602CBCF23FA62D68B99BE60F4C58CC79BE6280D048105D67914F1A8D5375F1CD039B1EBF0C503C981ED8EDFAD1FBA38CCEEFFAF9FFBAABD376E24B7591FA27B82C1175F7CD01A0B022B3AEE4EF679CDAE039203B25FDECEA9EC49867EE8E2A01D82CB9B117E4F8EDA2384D3309B3D196F5A7D83BE932A3830E890E150D92FE8F376E8874E0E5F1A5BEE54CFCFB3EE100CDEF4F21C71D31E219C04CBECC978F3F9BD28076F3E151C18748870E8E8174B7EC89E64E807060E96DEF0EE1BD17A59F9EE38A3505ABCF140FA5310BA61DD973D18C5CA70B0E652C98141070F3AFB65961FBA2719FA8181436487F072B1E4F7161FD1970CDE8C6A327A2A7D2A085D88CC1FAF3767FE44DD4B1D1C187458B53F206BD571C66D3D89FA396F9D2C3BC3DBF7779A51D11ED61E219C8E9D66A538AC9F35DA21F838ACD82146F166E779EF4D865A64FA587B84703218FC290E580E3BF48B7A12C7A17B87F0C4B270DAA11FB2BDAC3D4238150CFE14072C871DFA453D89E3D0B94378EF44CBCF58CFCCF05EE92FED11C2C960F0A7386039ECD02FEA491C87AE1D22721722EE4D865AA07C63D563A5C705C103EFFC9921E20D71A8E1F044A63F667922CF66B83376E280FEB9591F8C1EAF1F9EEFB0D6C2EB8B8AF920088C18F534D21FD119712387B777B3332B329B50677ACF66B83376E2E0ED1B2F17CBBBCFB310EF32D5A2C217190E82C002CBECB13E9659260EE319F1F66E84C38893A72F3C7718FAEC59BCCA38BB7198F54D940B720788C660A88537176B9ED15C0481056FBD9CF1C9D7BBDE597923872717EB1D1DE1643DDF1A1375F6572DDE6255C6D991C357DF64B864F7076F4F31EF10555E8CE422082C78F671D59EED9995B77278E3839A596F9C66E7A21FEF0E338BE3ED6D4F9C5D397CED0FD978B377BC3D5DC1A1A316555EF4E622082C78CE9C8A3DDB736FDDCC61C409F964EEADCAB32D1C9077565407760EB3AF7BB8A07460E050558BCC93990F82C002F4BDF9E50F71F0CF874A3EA3F3AA9ECC0E81BEB3223AECCA21CAE5340EE85A201EED0FC209A8BE3BC5213E1F909C665C2AF2B79E3DE280BEB3223AECCE2112F7440EA85AA01EED0FC22978EEC32888437E3E7472A9CADFA3035A43A40E3B7388C43D91C3AEBE10047630F8421C6A39ADC83FA2035A43840E277088C43D91C3AEBE1004411004411004411004411004411004411004613F30FCBDF3EBDD9DFFFD8374887363FABB35531FACF4264A17D5221FEF241D2271550B1EA0F3C8C463A801BA1FA4839F1B93B718FB80C1EB2B7A53B5384F87485CD58207BF9C57FDF7DFA377BBFF7B6F04872CB7DB7540F724DA1FD5F9337A13A9CB8A33B35C986A71920E91B8AA0517BEF28FE431D27316EBF7DD6C3D10336AD50E211D6AFEFF8C196F54CE084B2F2074C878D3C3CDAB816AE1D3A5438748DDD177F8488F9B6AB1C31E31CADF93C74C4BCB9D51757F7ABCB1D2A3D53A783DB55A07443E595FA075F88ACBEACD488D7E63CEBEAF5AD875E9D0A1EBBEC8E8714B2DBA661D6A56CE72AA8CF37C1751136F2D2A38BCC5F26858A183B78E0C3A7CC5E9F405BA16965C18BC19896999AB9E334FA98585F7CA39D9795F64E231F882A12759C0588F6C4D46B5E8E2603DB74B87CCFDCDA0C35BAC6E5FA07B72960B8337BD31BF7A2E73E609B5B0F25D3527BBEF8B4C3C065F30F4240B58EB11AD49746E2139BCBD8B9ACB91B33D7C987578C65BE10B869EF4EA50A1E7ACBFAC5FBBA116569E335DAA7458715F64E231F882A12759C05C8FA7BE1E307040FA09A543744EB1E830AB63872F187AD2A343959E919E63F545552D6667BEE5D1A9C3AAFB22138FC1170C3DC902F67A446AC2C021527BE95033A72A7DC1508B957A7AF33CDD175FDA8C1EAB2E681D2A7D51190FC1816D4EA2F45C018639751207D5824707060E0CB5E8D0B3F20C061DBCEFA2F787D37C918997E580B8BF197A92050C5A9CC441B5E0D1818103432DB443F4D6A2627F38CD179978883A6A87E0EB89DDEBC1504BE9701E07865A6887E8AB45D5FE709A2F32F1A21C9EB5B9C59BD560D0E2240EAA058F0E0C1C186AA11DA2AF1655FBC369BEC8C4CBBCF3FBDE2DDEAC86D71B3354D6838103432D2AE3A06BC1D0939DB538CD17DDBD7B8A2F2C3FC7A471972F10F1BCEF7CD585E1BE60A869654F78679425D6EE1C186A618DF3166B16A7A2160C3DD9518B137D81D02B7B46872F2A6A91E17AD28C1A793152130F076B3DAC6733F5240BA2FACEB443D4838D03432DBCB17EE359E254D582A1272B6B119D55ECBEC8EA8538A3DA17E85A3CEFCC2718E64317078B06DE9A5839CC7CF2E484EE87EA9E64C1CC03DE277277EDC081A1169978D63895B560E8C98A5A58B8EDEA8B8C5EA8332A7D51558B88F7BA75A8E6B0F267BD9E44F7C38EB545F54566468D6A33D3819903432D50F156F703434F226BE1E1B6AB2F227A65745FE18B8A5A54CC905D66D4481FCB3BB3DC463F6BF5C9D73BD97ED8B9B668EE9D738A9903432D50F156F703434F226BE1E116A92B832F227A657447F632D267DE5A54CC901D6654541B4F6EA39FB578E4EB9D95F705436DB3BCDFF4F53E9139B20307865A74F464652D187AB2A21655F709832F325CD167ACF499B71615F7C10E33CAD39FB3F73C7EF39CFF8CCB705F30D436DB13239DAD8FC5533B7360A845754F56D582A1272B6B61BD4F1874F8FA5E45EF22CF407AAC72467DDD8D590D769951D1BEB4D624C3E1A915C37D51EDCD553DF156132B46B176E7C0500B444F76D682A1273B6AB1830EA35855BD8B3A03E5AFAE1965ED9BEEF95055E799BE9177463EF3C67B6AC4705F7478B3CB575F0F624665EAC1C681A1169571D0B560E8C9CE5A30EB10E987EEDE65F597B716969FDB51632B07EB13C929C2E14D7786FB82A1A62B7DD5EDCF1D38A8163C3A88435F2E0C7A31F8C2728746F708068DA33B84F7EBA39CBC1CBEF46698930C355DE9AB93EAC1504BE9200E6CFDB0935E0CBEA8DC2318348EEC10235DAA778891CE0C7392A1A62B7D75523D186A291DC481AD1F76D28BC517557B0483C6DE1DE26DB77AFBBE2727EB3B337D19E624434D57FAEAA47A30D4523A88035B3FECA417932F2AF608068D3D3BC45B6E4F5D3A7608867E60AE69574F5851598F9D38446A2F1DCEE550E9CD9573CADB73153391C9175FBC468F5597CA3A56FAC252AF88AE2BF544CF870807168C7288CE6A643D501C667D55C1C15B7FE9703687AA79DD15E72BAEA7E7327A7838787D31D321AAE1ECCC378DBAEB58D193D65C223931F8A2623E647259098BEFAD8F658EACE090F1678483E75CE9703E07EFD94CB37216F3ABBFAC5F43CCAE9533CAF3EE8CE74C978A3AA2EE0B6B0E5E5DDE6231F882E1DE64C11B77D4ACB66A51C9C1DAD3680E6F3156D6E2661D183844EE4D8659E98DF9D5738833DFCE5F39A33CF958F9463944FA0B755F6438CC74798B87E21039BB633E5839B0E0C91B3DAB2D5A547388CC590487B7582B6B71B30E0C1CBC331675F7A3E244E678643E6767BFE5C9CEA8483E16DE110E5DFB431587912E9E1D22C2C17B76D77CB07060C1D3EF15B37A56DB0A0ED1798DD6C1C3473A9CCFC1530FEB3D9D9993BFB122736396E7ECFB9979957D22336A16A7B2166FEF45EE4DC47D81E6F0A5CB5B5C3407CFD99DF3A1BBB688BEA89CD5331D56DE9BD53A78784987F339783D117DDF32277FE3457A24AB41B42F518F754631D4E2F9CE8A3BA692C39B2E961DA26A8761980F3BEC0F5DFEECE290D57EF5BD251DCEE790393B535764BC8C2E2BCECC7261A8C5F36E5971C75473B0C4AFE21089CB706F32E14BC32C567060D4C1C34D3A9CCFA16AAE75C55BD19BB7D7027536722EAC885FC561B7F9C008061D18B467E80BE9702E87CCD9E89AAEE80FA69EDCAD16487F6779AF8C5FC561B7F9200882200882200882200882200882200882B00B4EFC9B0AC3DF96227F6B5CC981A1164CF9337038D117A7D6A2F22C546CE6DE14F604D3CCAECA69A50E160ED567AFAC09930EF2058F2F4EAB45E559A8D8CCBD29EC89DFFE39E5BF318DF8A34207AB1E5D67AFA889A7162B6BF0C5652587937D11DD61D0E7A36A31E2983D0B15BB92A370279EB3A4C29F2BEFAC279F6E1DDEF4B072AE38BBBB1EDE5A5469F0A6837CB1CFFF0B8F818395E3ECBC95B12B390AF7E1EB3349F6897CD6A9C8C9EA8D2A1DDEF48870479DBD532DD08F4707F9825307060E167EB33357C6D60E2120F1EC278447DF6274F5E588BFE7DEAA9A55D91C32673FBFC65E8BAA3DCAC361F47E3507A65A30E9C0C0C13A4FBFCE5D195B3B8480C4E87349C4A35FEF76F4E58CB767566675788B81CCC57BF6DBD7596B81CA3FA3837CC1AD030307AB5EA83376DC214EDF474ECFCFA381D567A367F44EE7AC8C7803A9C3DBBB997C907372A603432D10F96775902FF87560E0E0E1849A07B3DCBAE278B438F19E3D3D3FAF0E33BF7950D997D15C661C2A7440CFA45B6A81CC3FAA837CB1870E0C1CBC9C583C958D13D1A0B2CF3B717A7E112D66FD94F126D29F885C3A7440E68B9C933BD402953F533FEC5A8B1D7460E060E5C4E0A96A1DDEB4EEE8F34E7CE577528E512D58FBB23A1706FE0C3A88837C211DEA3830F0EFDAE776D216518B5BF7881DFAB2231706FE0C3A88837C211DEA3830F0AFD2E16B7FD8415B542D6EDC23D8FBB22B1706FE0C3A88837C211DEA3830F0AFD061B43FECA02DB216B7ED11CC7DD9990B037F061DC441BE900E751C18F8A375B0EE0FCCDA466B7153CEBBF565772ED677ADA8EE5B0B2A6A710B07743F54E8B0A32F2A7460E0D001C6593DD3B57A2632D4E3C6DCADFDE4D1C0AA27434D333A7850955B765E46F9DDC4A1A21F903AECEC8B1DFB810123EE1EFEE83896FE58ADDD6A6FDDA00122F7919E5D3A46395874B03EE8BEC97240D4E2360E55FD80D0E1045F207460E0D009A61D4277A7B418E59FC9191DAF2BA7D93BDE0795338A4386D78D1C2AFB21A343452FEDA80303876E58F61FCF0E118D73FB9D294DC6F9237245C74372B07A2333A3DEFA26A2411507EF9CB99543473F4474E8F63AAB0E151C5073AA2AF65BEE91F8D13833ED57CD7B06DCAC0DBADF2BBD99E5109997E83985EAC92A0E0C77460787680F3170E8F4E62DFD809A53A3D8D9F86FB9A3668B25CE4CFB55F39E01B76A83EAC9AA782B73CACCAA5D39CCDED99D03AA871838207CF11BF3C67EB07240F8357B062A7636CEAD776554D3D33541F6BBA53757D632C22132AB76E660E9875D39A07DC1C0A1DA1727F7838743B666883350B111716EBE33A585BD9F3CB95B7564A86526AE073B72B0F6C36E1CAA7CC1C0A1D217A7F6839703A266D93350B1D171103DBA2BA4015F5F32E432EB95E88CDA8183F5DD9D3854F6120387CA3827F64356CFD533281B1BC971A66BD603CCB83977F6BE5C9DCBCD1C18FA61770DD93830D462770E0C7DC3AAC38D77E98D39EFD6972B73B99903433FECAE211B07865AECCEC15BB3B773B2F70AB30ED63BB5D22F9DD0FEB0475FAECAE5660E0CFDB0BB866C1C186AB13B8748DDBEB0733F58F3AED29605557BE28E60EFCB15B9DCCC81A11F76D7908D03432D76E710AD1D6A7FD84587AF3DE2B47B7594E3497946B5F8D2C5820E7F667389C45CA9432707863985EEC9C81C4773D8D59BE2C003066F7AE7D52EDA666B91F5FACE18F513F2EEEAD017ED8DEC5DB52307863955D1934FACF0C58EDE14071E3078333BB7566B88AEC5A9F945B41879D3FA8CDEE9D018E98D48FE681D5670609853C89E1CC558E18BDDBC290E3C60F066842FBBAECA0FA343D69BB3773B77882FDE5E8FA1EEAA9D3858F443F0F77240E8E1C9A3D2173B79531C78B0DB0EF17BD66AEDAA6BB29A078306086F8E6274693DE26FE1507557EDC261A65DE40EF4D6A2A227BDF954FB62176F8A030F76DC2184F3F1EBA5AABB2B72FFA072F278A3FAAEB2E8B09AC348B748FD22B5A8EAC92F5D56F962076F8A030FB44308ACA89AD52BBDE9FD9CD17157ADD81FA21CDEDEEBAA45654FBE69B2D2173B78531C38A01D4260C6EA59599D93E7B30EFA89CC49060EC8FA45E2B2E9D17DB638F071588951FED1BD74673D043E7CCDF92C98725A917F744EB27058510B663D56F8421C7838AC042A8F53F410F870A237755FC439ACAC05A31E2B7D210E3C1C560295C7297A088220088220088270076EFBEC2708822008421EB7FE0E59100441D81FBA9338B467FFB7F0EA13411018A059C4037DB6E5D19E7987509F0882C000CD221E8CEE2FD5A44FFBCC1E61AD53C66BEA13411018A059C485D9BDA57AF4691FD92332FB83B5B6165EF2AE20081DD09DC505D5834B7BCF1E91DD032CEF7FF199715FADAD2054427DBE5E7BDD591C503DF8B4AFF8DC1FFDDDDFEC3DF58B701BF4B7770EFD75677140F5E0D47EF4B787CCBF67989D657D4F3B847023B23E147035D09DC581D1675E79A447FB991710732BFA7B0DED1082F05F44FF1E28D4D741F5E0A98976EC7EDD67F77AC7595FFED30E2108BAB7D8A03B8B0FAAC53ACD3B7708EF1EA11D4210F4FB7346E8CEE282EAB14EF3AEB914D923B44308827608411841BF175AAB7BE75C42ED11A3AFA96784D3A01D4210DEA1BFF3ADD7DE738F236A82FC7D847A45B801DA2104E11DF206A7F6B3FD81698FD0FE209C0ECD49417887BCC1A77DD7E77EEF39FA9B97703A663D1EF5C9EABCAA75392D5FC1DF1BDA2138B4B7FE7EA06B8FD0CC106E81B5D76FF388777FD83D5F21D61FDA21D66BEFD91F3AF608CD07E116787FD7E0F1ECCEBE593593847DA01D62BDF6B3CF391D7EB57EEED27C104E43F4777FDDBF3364D6E5847C855C9FCC7A6135CF53B16A7F88FEDE56F3413809D9CFD9A77E3ECFEC0F3BE62BE47B65D607AB799E8CEE7964DD1F4EFDFDAC20FC0FDA2170BAEC9CAF90EF95591FACE6793A3CF73A6A7F1879DE323F34238413A0BF65E47539215F21D727B35E58CDF306ACDC1F463352B342381D5E6F8CBE7692474EFF7D8B80EB91593FACE62960EAFCACF5E86BDA23849B60DDDD47FD8FDCF959D0F53B52614F6887B803B3F967998BDA2384D3E1DD1FAC7BC4EABCAA75392D5FC1DF1BDA21CE467487F87D577B84702B342705E11DF2C61DC8EC10BFEF5BF788D5F90A02129A9382F00E79E30E647788DF18EA17E136A8EF05E11DF2C61D40EC10BF71BE7A46FD229C08CD49417887BC7107503BC46F2CEF7B82B02B342705E11DF2C61DF8BAF7475F1BD5FD2D9EFE4DA5702A2C7BB3FA5EB811DA21EE81E7DF33586AFEFBB39AA3C2E9D0DE2C08FF0FED107701FD794AFB837013B4370BC2BFA11DE23E7CCD41D55A10E6905F04E11FE8EF7C7742FB8320C421BF08C23FD0DFF9044110044188429F4B05411004418842FB83200882200851687F10044110044110044110847DF03730E944E0]]>
              </BitmapFile>
            </BitmapFromFile>
          </Producers>
        </Bitmap>
        <Font Name="BlackFont" Bitmap="BlackBitmap" FirstChar="32" CharPixelWidth="32" CharPixelHeight="40" BorderPixels="1"/>
        <Material Name="BlackMaterial" Blend="2" ZBuffer="0" Font="BlackFont"/>
      </Children>
    </Group> <!-- FontBlack -->

    <Group Name="FontAlpha">
      <Children>
        <Bitmap Name="AlphaBitmap" Width="529" Height="165">
          <Producers>
            <BitmapFromFile Comment="Imported from Pixel_LCD7_bold_double.png" Transparency="2" HasAlphaLayer="1" DataWidth="529" DataHeight="165">
              <BitmapFile>
<![CDATA[789CED5AD96E25B90EBBFFFFD3B983011A53A9F6A285B269170DF0E5F4B144518B95A47F7E7EFEF723088220088220FCC23FE7A785DDBC0441100441E0456F7FD01E21088220085830BDB1B3F77FB617BC3EFB756631A27588D88BC6BF32872B7DA2F458C9F1041D3235B943B79DF133731184DD60AA67703F364F2F3EB40E117B27CCA4953E4F98D527EB90A9C995BAED8C9F998B20ECC6AB76FF3DBBEAB9C5C57A1A7D38FD6EA50E117B99F8477A78B97BE3AAF289D46325C71374B072AD8ACF637767FC16DEBBB808020356BD07561E99FEB4DC9FCD29840E967776740F752A7268D517E5A752932CCF15FB54950E563D2AE2F3F6C7CEF87B3C2AB83CF98C7808021346FDB06A8F78F766D51E1199955E1D66FC57EE105EEE16ACD82190F5D0D322AB8B8517D2C78A7D6AF47EA3E28BF6C7AEF85BFE57EC342D0E82C088156F829743C51E619D11191D3CEF4AF4BEF720DECB16C7487C511F085D463511E5E7D921327E903A78F540EE494CFDE1AD87CA5C746CA6FA54105681718778FA8DF468EF6786511C591DAC7C51762CC7AB81053B7688772C191DB25C079A767D46B58FEAE07CF7877A786AFA94FE88D403BA26279C207355105680758778FAF6F4E8687FA8DA21BCF371A667D59C44CCA95D3B442FA6880E51AE064DAD9F95E9D0A8F7941E88DA66EA8F683D206B7262033657056105987788A77F2F4676903AA0E763CB6E06591E289D503E503A78B97ADE6D94F6153A44F4C8D4386B7F78E2FF29CE05A26704611756BC09280E99F9308B2572B76A3EB6ECA3E6E44C072BA70ADB5E1FAB74F0D8F27CAF4A07EBBF7BF488D43A6B7F64E2F7C6EDE054365F05A1122BDE84551C56CC88F7F7ABE6630695395D512F0CF5F0B6E17D3BADDF45F01FF945BDA13F9BB540A0723EAC8E451058A01D22769779A66887C0D889BE99A8DAF0EE10A8EFF5F8FC0434B17C67557F20E6035B4C82B01BDA2162773D731BA19107DA2170F510793350EF0DE30E618D8FB13FB2F16B8F1084BFA11D227677F4FDDD33443B447D3D3CEFB76C78DF9B0CFFD53BC42CBE99BF5DFD81885F7B8420FC8677FECC50C9A1D20E5A878AD911F09FD213ADF16A1FABEA61E67F554DA2BED78BC712DFAC162BFA63755F586C55C52A086C18F542E4DD8CF48B9583D5CECC16AB0ED6D8B2F332C30FFD0E6572E1D1CCCBF5240ED69C54D4C5ACEEAA7B63575F58747FC78F8A591098D0EB036B8F0CEEA039B86C8DECB1EA1089C9C8A1F96F192E33BF8878273131D4C3760ED11D02591756BB95FB83F520E38F688F8A5D1058D0EA83486F76EEA238A063A2D4C1CA2BC801C2CBFA56A06326AC87651C7A1A7BF602CBF71175D13B0CFB434B93CE67301E1DCD211A08020BACF3C87A227D33E0808E895A871E0F2407B637DEAA01513D2CE16078FF9BDFEBE5DE6B37125BEFA0EB8EA92F7A7CD01A0B022B56BC9DECF3FA001D601C46FE2D98BD5759FB131D18EA610907EB5BDFAB15EBF791EF68EF146A173AAB72FBE688EE1341D80DC37BE03A91F705FD26157160D021C3A1AC5ED0FE0EA987651C7A1A5BDE54CFF733B99BD528C2F6CEDEF4F21C71ABE84B41D805E37B603A965996E0E08AA78803830E110EE5F562892FEB83B01EB673B0D48677DFB0C6D58ACFC2376A7F64D77A2AE2F768D1E101EB4F41580DEBBEECC1C856868335964A0E0C3A38392CAB97597C081F6CF5C0C0C1F35E45B958E26BD947D425436F4635199DCA3E15845588CC1F6F6F3EED6438A062395D0707876DF5C2E0E36B3589FADE2CA637BFA7CD593F44EA93A137BDB0F88BEA21084C3869568AC3FE59A31D828FC38E1D62646FE6CFFB6E32E42202ED11C217C0D09FE280E55009ED107C1C56EF104E5B534E567F28DE593B1E688F106E07437F8A03964325B443F07158B94378DF44CB77AC3E33BC9176BCD01E21DC0C86FE14072C874A6887E0E3B06A8788BC858877932117590476AF6D3D2E081E78E7CF0C333BE2B08E438353B83E6671227D33BC192771407F6FC4C5FA065A7DBEEF8C7C477857D879EB11ECC534074160C0A8A691FD119D115FE4D0BA9B9D5991D984F2E9F58D9AB3193B2771F0D68D978BE5EEDB17E2AE5787F7BD6A3B807E087310041658668FF5586699388C6744EB6E84C38493B92E3C6F18DAF7CC5EA59DD33818EA26C4C55A7BA31C676D30E4C21B8B23CE502C82C082562D67FAA477D73B2BBFC8E1CDC5FA46073999FC5B6DA27CFF7472D1F15966E7440E83BA0973C9EE0F2D6E165B191D661CA2760A7BD11D8B20B0E05DC7883E69D9F0CCCAAF7268F141CDAC0EA7A15FF4F1EE30333B231B593BA772E8ED0F597BB33BDE9AAEE060F51FB1B3A0175DB108020BDE33A762CFF6BC5B5FE630E2843C9977ABD2B78503F2CD8AEAC0CE61F6B9870B4A07060E55B9C89CCC7C100416A0DFCD3FC7D317E230E784E633F25775323B04FACD8AE8702A872897DB38A0738138DA1F841B50FD768A437C3E2039CDB854C46FF53DE2807EB3223A9CCE2162F7460EA85CA08EF607E116BCF76114C4213F1F5672A98ADFA3035A43A40E277388D8BD91C3A97D2108EC60E80B71A8E5B423FE880E680D113ADCC02162F7460EA7F6852008822008822008822008822008822008822008E781E1EF9DBDBB3BFEBEC9F0B7D7AFEBC0F4776BA63A40C7B24317E5226FEF261D2276950B1EA0E3C8D863C801BA1EA4839F1B536F31D6C18EDE44EBA25CEC9F0F0C3A44EC2A173C7871FEF764E2C8D86BDDF59E6C0E101CB2DCBEAE03BA2633A8D0215307BB7A13A9CB0E9F592E4CB9B84987885DE5820BBDF823718CF49CD97ADECDE60331A376BC9D680EA7EA80ACC90CAA7468D8A5EE4D0F37AF0611FE5FCEC50A1D2CDC113AB462EAD9ADE2C09E8B55B32E8351FC9E38665A5ADE8CAAF7D3D31B3B7BB45A879EDF6A0E5E3EA89ACCA04A87815DCADE9CD99CC569F877E5C2A8CB0A1DACFCB376327A7C2517AB665D16A85ECFD879DF45E4C49B8B0A0E1D5B660D2B7418F9AFE2D0B1555E931954E7C2120B436F466C5AE6AAC7E72DB9B0F0DE392747DC7B1C3CFC51F618FA82A12659C0988F9E9ED633CAC52A0E56BF951CDEB3DC33E7501C3A3696CEA90856D4E42C1686DEF4DA1CD45CD8E70DB9B0F2DD38275379B7F047D963E80B869A64016B3E46BA8E4E746E213974EE867381D2C1C2875987B73D8BAD28986BD2AB43859E86FAB27E767D2EAC3C67BA14EA90EE0B8B0E287B0C7DC150932C60CEC7F39E170C1C90FD84D2213AA7587478F2B0DA8B80BD263D3A54E919A939D6BE98E910D570E6B315C7621D607D31D310658FA12F186A9205ECF978DECDE462358748EEA543CD9C8AE0A45CA062C9E8E4D52BE2C36A9B2517169F6FFE8B7528EB8B4A7B080E6C733213CB6E30CCA99B3864201DEEE3C0908B157A56FA60D0C17BD7F23E3CEFB1E471358788BD2C07C4FBCD50932C60D0E2260E194887FB3830E462859E953E1874F0DCB5BC4FCF3B565D6EEA8B8C3D441E2D39BAA537ABC1A0C54D1C32900EF77160C8C50A3D2B7D30E860BD6B799BDEDF5FAD4306680E117B510EEFDC7CA537ABC1A0C54D1C32900EF77160C8C50A3D2B7D30E860BD5BB53F2075C8E0D41DA2959BAFF46635BCBD3143448B9338B4EEA2C0509705B960A8C965B9B8AD2FAAF55A697B652E2CDFDBA54306D9BE40D8F3DEE9E565453DB4EE56D8D989510CDE1965B1753A07B4FE151C463ACCEC14E582A126CB7371635F20F4CAFA58D117338E915C64B856EA9001A22F7AFF36B219E5E0C887C9774687919DCADEAC46545F8376662D0EE2C0900B97ADA73D8B9DC25C30D464592EA2B38ABD2FAC98F1C9F8A8EE0B0B474F2E9E9FB580D69879465934F0E6C4CA61D6270D4E53DF511D2C9A56F56635663DE03D067BA77260C845D89ED54E712E186A129E0B0BB753FB22A317CA47655F58ED797311E9BDD53A5473D8F95D6F4F16D4C371B9CD6050EFA113E91F720E0CB980D84B7248E702A0030387E6773C1C4EEA8B885E2D7F28DB157D51918B8A1972CA8C1AE963B9338B6DF45D6B9FF4EE00EAE1D8DC16700F9D536725430EABEB32C9219D0B800E0C1C9ADFF170B07261E88B885E2D7F48FB597B2B6654C50C39614645B5F1C436FAAEA5477A7740F5706C6EB3BC3BFABA4E648E1CC2812117E535599C0B869A84E7223A3337EB10E665E58AF681C28A1955F11E9C30A33CF539BBE7E9378FFFB7DDA27A382EB75118FBDE742C3D753807865C94D664612E186AB22C1796BA23D2A1F96F1E6E56AE481F08AC9851EFB7EC0DB4C66C332A5A97D69C6438BCB562782FAA7BB31A56BD3D18D93A9D035AFF0A0E969A5C9C0B869A2CCFC5213A746D79F959B9A27C64B17A468DBE87D6987046994E2427510E6F8D56D443EB6ECB4E656F56C3DAFB991935D3E2240EADBB28A03890E582A12697E5825C07572C2BF45A89957D61F9DE4AFE283838984E24A6088796EE0CEF05434EB360D0E2260E19480771A8E0A01D625D5F58DED0E81EC1A0717487F07E3E8AC9CBA1A737C39C64C869160C5ADCC42103E9200E151CB443ACEB8BCA3D8241E3C80E31D2A57A8718E9CC302719729A0583163771C8403A88430507ED106BFBA26A8F60D0D8BB43BCF787DEBF7B62B2DE99E9CB302719729A0583163771C8403A88430507ED10EBFBA2628F60D0D8B343B4627BEBB2628700C472746F56C39B8F19225ADCC821927BE9702F078F6F2F87557646B6BD7A457C5939ECEC8B1EAFD1B1EA5299472B227DD1B311CD8987032216940EE89A64C12886C4AC7669B182C3ACAE2A3878F32F1DEEE660F56DE1F0E4B1CA4ECFAEA7E6327A783878FB62A64354C399CF9646B358BD1C90B072B0C6128989A12F8AE64338969DB0F4BDF558E6C80E0E99FE8C70F0F8ADE2201D7838787DCF38BCEDAEB2D3B239A82FEB67E9D9B5734679EECE78CE74A9C8A317560E9EBAF4C6C4D017D5B3DA1BCB4EB4B80367B5498B4A0ED69A4673E8D8D8968B2FEBC0C0C1E37BC4A16573951D8BCD41CDA57DB6FCEF9C519E78AC7CA31C22F515019AC34C97963D148788EF1187D535C98237EF82593DD5A29A4364CE2238746C6DCBC5977560E0E09DB1D9770B6DC76AB35173109F6FDF3B6754241E0BEF08076F5D6550C161A44BCB269283D7778FC38E9A64C1BBDF2B66F52CB7151CA2F31AAD83878F74B89F83271F239F113B335B333B566E2F9B309F96583C2732A36676B2FCBD1CBCFD9D4515879E2E2DBB680E1EDFAD3BBB6A92092B66F54C072487A8F6553A78784987FB39787B227ABF174BCF9ED5D6889B578388CF1D338A2117EF3B3BDE984A0E2D5D5AB62B38587DF7EEEC7A3799B07356223964B5DFFD6EA13848075E0E19DF99BC22ED6574D9E133CB852117EFB765C71B53CDC162BF8A43C42EC3BBC9849E8659ECE0C0A883879B74B89F43C6373AA73BEA83A9264FC905CA7706D51C2CF6AB389C361F18C1A00383F60C75211DEEE590F18DCEE98EFA60AAC9D37281ECEF2CEF9DF6AB389C361F0441100441100441100441100441100441104EC18D7F5361F8DB52E46F8D3B3930E482297E060E37F6C5ADB9A8F485B2CD5C9BC299609AD95531EDD4C1C2A1DAF7CE9C30E9A0BEE0E98BDB7251E90B659BB9368533F1AA1FC8D95D9391FEA8D0C1AAC72ADF3B72E2C9C5CE1CF4B8ECE48006535F4472C13CA3461CB3BE50B62B390ADF446396400ECB9BF5E6B35A87961E56CE15BE57E7C39B8B2A0D5A3A5879AB2FF6EBC0C0C1CA71E66FA7ED4A8EC2F7D07A5B103D3AB0BB34A616A7953AB4F4887047F93E2917E8E3D1417DC1A90303070BBF99CF9DB6B5430848BCEB09D1A32D1BABEA72C4DFF36E55CDAA6C0C49DFBF3EB370C9209B8BAA3DCAC36174BF9A03124C7D91D58181C38CDBCCEF4EDBDA2104245AF594E9D1DEDD157539E3ED9995591D3A3660B1047CFFF5B9878F17995CA0E2CFE8A0BEE0D68181C388D7CCF74EDB2B7788DBF791DBE3736AF0EB447A747467E5AC9CF1ABD6A173371C0F724E3EFF2DC2C9CB7DC6AF2AFEAC0EEA0B7E1D18387838A1E6C12CB655763C5ADCF8CEDE1E9F5787D6796B64C5C8D6AE58661C2A7440CFA4AFE402197F5407F5C5193A3070F072CADAED1D6F4F65ED4434C86ACB82DBE38B68D13B88DE7CDA618865850EC8789173F2845CA0E267AA07840E51DCAE0303072B2784CD2CFF6A1D5A5AAFA8F395E8C577538C512DDE87A52EAB6361E0CFA08338A82FA4431D0706FEABF6B993B48DC6D98AF1A638A35AB474596567572C0CFC19741007F58574A8E3C0C0BF4A87DEFE7082B6D1587B71DE146B548BB726ABECEC8A85813F830EE2A0BE900E751C18F857E830DA1F4ED0D60B4BAC37C51BD5E2A9C72A3BBB6261E0CFA08338A82FA4431D0706FE681DACFB03B3B65E7C31E69916BDF3951961BD6B45657C0E0EF05C7C8543413DC075F0EA75AB0E0C1C5600C51FA9C34CD7EA99B8135F8EBDA5435603AB9E2B628970B0EAE09C5525B165E76594DF973814D5034C87A866B7E9C0C0611546DC3DFCD1762CF5B15BBB2A48837E3D45621FE9B94AC72807A30EA683AE1B0087E6BF89C3967A307340E2461D1838AC04D30EA1B7535A8CE2CFC48CB6B72A26C31DD741C50CE410E6F5450EC5F560E280468FFF893A3070588D51CC1EFE593B5F7F33A5C9387E44AC687B480ED6DEC8CCA83F27AB411507EF9CF92A8715F510D161F6FD604CC7E950C10135A7AA6CB7628FD88FDA99698FD6F1247C591B74BD57F6669643645E464F56875D1C18DE8C151C46FE0FE0B0AC37BF520FA83935B29DB5DF8A1D355B2C7666DA23753C0D5FD506559355F676C6949955A77230DC399D03AA861838A4FBE26973830EA69818385831E295F581B29DB533D37EF5BC67C0973541D6BBA53657C583E2109955277330D6C3A91CD07DC1C0A1B42F2EAF0733072B667C323E50B61176BEFC664A0B7B3D7962B7EAB822163487A75D0F4EE460AD87033994F4050307AB1DA25C1CC7C18A91FDAC0F946DB41D448D9E0A69C057970CB18C6C6766D4091CAC770FE350564B0C1C2AED5C5A0F6E0E56ACE8FFAC6D24C799AED91E60C697636FE9D03B3BEA72772C5FE6C0500FA76BC8C6812117A773B0E26B3BC4D3DE97DED22FC63CD3A27798FA531CEA3930D4C3E91AB27160C8C5E91CAC18BD2DD977855907EB9B1A899B11DA1FCEA8CB5DB17C9903433D9CAE211B07865C9CCEC183E71BD242D62EAB0E96FD29AB2D0BAAF6C413C15E973B62F93207867A385D43360E0CB9389D8317E8FDE1141D7A7BC46DEFEA28C69BE28C6AD1D3C582991D8658223677EAB09203C39C42D764648E17F4C591BD290E3C60E84D0FCFA70F766DB3B9C8F6FAC918D5536246776DED8A25C221F34EA17458CD81614E55D46443971D7D715C6F8A030F187AD3CB35DB03ACB83DBE8816EF33EBB7D619DD59A131B23722F1A375D8C181614E216B726263475F1CD59BE2C00386DE8CF065D755F16174789E8AB76BE50ED1E3EDED31E05B750C078B7E08FE5E0E083D3C7114F7C531BD290E3C386D8778F9DAAE5F714EB67321D0E0DF53F576ADD27AC4DFC2A1F0AD3A82C34CBBC81BE8CD45454D7AE359D01747F4A638F0E0C41D42B81FCF5EAA7ABB22EF0F2AA61627EFBD953AECE630D22D92BF482EAA6AB2A7CB4A0E1E2D197A531C78A01D426045D5ACDED99BAD78AC730A7D76EE0F510EAD7BBD3B337873F1BE53A1C74E0E993DA282C38C873870403B84C08CDDB3B23AA6199755EFB7952F030764FE2276D9F458ED5B1CF838ECC428FEE85E7AB21E021F7A733E0BA69876C41F9D932C1C76E482598F1D7D210E3C1C760215C72D7A087CB8B1373D5C18661413879DB960D463675F88030F879D40C5718B1E82200882200882207C035FFBD94F10044110843CBEFA3B64411004E17CE84DE2D03E7A56E54C7522080203348B78A09F6D79B48F9E15F9529D0882C000CD221E8CDE2FE5649DF6993DC29AA74CAFA94E0441608066111766EF96F2B14EFBC81E91D91FACB9B5F052EF0A82B0027AB3B8A07C7069EFD923B27B80E57E8F8F81FB767D05A10AAA730AED9B47B9513EBE02E3EFE38679B1E626FABBBFD9BDC1E7DBF515840A44FF1E2860F5EF1DE545F9F80A46DA8FFEF610995F565FD67BDA21842F22DB87022E07BDA39CECC947E4675401A37DEFA0F607AF2FCB3DED10C2D7D09A959A911C79503E7872A21D7BBDEEBD83D47FE6EBE9EFE9533B8420E8DD6283DE2C3E2817FB34EF9D8A1DC2BB4768871004FDFE9C117AB3B8A07CECD3BC77D03988EC11DA2104413B84208CA0DF0BEDD5BD772AF447ED11A3CF5433C26DD00E21086DE8EF7CFBB5EF9DAADD0EF9FB88D67777EB2A08686887108436D41B9CDACFF607A63D42FB83703B342705A10DF5069FF6AB7EEEF7FAD1DFBC84DB61A8F1E6B9BD373C73E08678057F6DF48E6A62ADF6D6DF0F34BE9BE2B0EBF72182C00247ADFF3AB7F788777F383D5E21561FBDA37A58A7BD677FE8DC49F118ED339A0FC2CDF0FEAE61F4D9E4DEF658D1BADC14AF10AF91DE512DD46B3FFB39677450FD6AFDB94BF341B80DD1DFFD45EFED8EB742971BE2157275D23BAA8335FAAFDE1F1CBF8F84FA150426647FCEBEF5E7F3CCFE7062BC42BE567A4735B02E07ABE691757FB8F5F7B382F007DA2170BA9C1CAF90AF95DE510DACCD8317193FBD5C5BE787668470033CEFA577D76EDDDB1D6F852E37C42BE4EAA4775407EB73B1637F78E75B7B84F025047EF7D6FD6C726F7BAC685D6E8A5788D748EFA816EE406F168C3ED31E217C098EDDFDD7A9DAF959E0FDD9E6F47885587DF48EEAE10ECCE65FEF73ED11C297E0DD1FFE9CDBDF53ED0FC2AC367A47357107A23BC4F3AEF608E1ABD09C148436D41BDF40668778DEB7EE11BBE3150424342705A10DF5C63790DD219E36542FC2D7A0BA178436D41BDF00628778DAE9D58CEA45B8119A9382D0867AE31B40ED104F5BDE7B82702A342705A10DF5C637D07BF7479F8DF2DEB2A7FF5329DC0ACBDEACBA17BE08ED10DF81E7FF335872FEFCAEE6A8703BB4370BC2DFD00EF12DA07F9ED2FE207C09DA9B05E137B4437C0FBD39A85C0BC21CEA1741F80FFA3BDF37A1FD4110E250BF08C27FD0DFF9044110044188423F970A822008821085F6074110044110A2D0FE2008822008822008822008E7E0FF3A4C7AF4]]>
              </BitmapFile>
            </BitmapFromFile>
          </Producers>
        </Bitmap>
        <Font Name="AlphaFont" Bitmap="AlphaBitmap" FirstChar="32" CharPixelWidth="32" CharPixelHeight="40" BorderPixels="1"/>
        <Material Name="AlphaMaterial" Blend="2" ZBuffer="0" Font="AlphaFont"/>
      </Children>
    </Group> <!-- FontAlpha -->

  </Content>
</ZApplication>
On Windows and Linux, everything is fine. But on Android, one in two font is losing his background transparency, in the order of apparition of the fonts:
Screenshot_20210504-094527.png
Screenshot_20210504-094527.png (118.24 KiB) Viewed 12133 times
The Font on the left has Black background, the one on the right uses alpha layer. I tried with and without ZBuffer. I also tried to call the font material between two RenderText.
This is really clear when there is no background. When there is a background (Omeganaut), the font lose its transparency when an object is getting closer to the camera...
User avatar
VilleK
Site Admin
Posts: 2317
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: One in two BitmapFont lose transparency on Android

Post by VilleK »

Ats wrote: Tue May 04, 2021 7:55 am I also tried to call the font material between two RenderText.
Are you sure it doesn't help to have the UseMaterial before each RenderText?

It could be a problem with the glPush/Pop routines that are emulated in ZOpenGL because they are missing in GLES.

You could try commenting out this block in ZOpenGL.pas line 1748:

Code: Select all

  if A.Blend=0 then
    glDisable(GL_BLEND)
  else
    glEnable(GL_BLEND);
User avatar
Ats
Posts: 706
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: One in two BitmapFont lose transparency on Android

Post by Ats »

Yes I'm sure. And I tried again one more time in order to verify again.

With this change, the fonts appears correctly on Android :wink:
User avatar
VilleK
Site Admin
Posts: 2317
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: One in two BitmapFont lose transparency on Android

Post by VilleK »

Ats wrote: Tue May 04, 2021 12:11 pm With this change, the fonts appears correctly on Android :wink:
Good, but the code looks correct so this could be a bug/oddity in Android GL-driver.

I don't want to commit this change just yet, please keep trying with it commented out for now.
User avatar
Ats
Posts: 706
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: One in two BitmapFont lose transparency on Android

Post by Ats »

All right. Otherwise, this could be hidden behind an {$IFDEF ANDROID}

Does this block of code affect targets other than Android? (in order to run tests)
User avatar
VilleK
Site Admin
Posts: 2317
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: One in two BitmapFont lose transparency on Android

Post by VilleK »

That part is Android only anyway.
User avatar
Ats
Posts: 706
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: One in two BitmapFont lose transparency on Android

Post by Ats »

I made some tests regarding that bit of code.

Here's the result for when there's only "glDisable(GL_BLEND);"
Screenshot_20210505-090424.png
Screenshot_20210505-090424.png (121.86 KiB) Viewed 12086 times

And only "glEnable(GL_BLEND);"
Screenshot_20210505-090957.png
Screenshot_20210505-090957.png (113.48 KiB) Viewed 12086 times

So A.Blend could be switching on/off for no reason somewhere?
User avatar
Kjell
Posts: 1910
Joined: Sat Feb 23, 2008 11:15 pm

Re: One in two BitmapFont lose transparency on Android

Post by Kjell »

Hi Ats,

Can you try this project on your Android device?

Code: Select all

<?xml version="1.0" encoding="iso-8859-1" ?>
<ZApplication Name="App" Caption="ZGameEditor application" ClearColor="0 0.502 1 1" FileVersion="2">
  <OnLoaded>
    <ZExternalLibrary ModuleName="opengl32">
      <BeforeInitExp>
<![CDATA[//

if(ANDROID)
{
  ModuleName = "libGLESv1_CM.so";
}]]>
      </BeforeInitExp>
      <Source>
<![CDATA[//

const int GL_BLEND = 0x0BE2;

//

void glDisable(int cap){}
void glEnable(int cap){}
//byte glIsEnabled(int cap){} // Can't use this in ZGE due to byte return-type :-(
void glGetBooleanv(int pname, xptr params){}
void glGetIntegerv(int pname, xptr params){}]]>
      </Source>
    </ZExternalLibrary>
  </OnLoaded>
  <OnRender>
    <ZExpression>
      <Expression>
<![CDATA[//

byte blend;

//

@UseMaterial(Material: DinaMaterial);
glGetBooleanv(GL_BLEND, blend);
Print.Y = 0.8;
Print.Text = "UseMaterial(DinaMaterial) -> blend="+intToStr(blend);
@CallComponent(Component: Print);

//

@UseMaterial(Material: DinaRedMaterial);
glGetBooleanv(GL_BLEND, blend);
Print.Y = 0.7;
Print.Text = "UseMaterial(DinaRedMaterial) -> blend="+intToStr(blend);
@CallComponent(Component: Print);

//

@UseMaterial(Material: DinaMaterial);
glGetBooleanv(GL_BLEND, blend);
Print.Y = 0.6;
Print.Text = "UseMaterial(DinaMaterial) -> blend="+intToStr(blend);
@CallComponent(Component: Print);

//

@UseMaterial(Material: DinaMaterial);
glGetBooleanv(GL_BLEND, blend);
Print.Y = 0.5;
Print.Text = "UseMaterial(DinaMaterial) -> blend="+intToStr(blend);
@CallComponent(Component: Print);

//

@UseMaterial(Material: DinaRedMaterial);
glGetBooleanv(GL_BLEND, blend);
Print.Y = 0.4;
Print.Text = "UseMaterial(DinaRedMaterial) -> blend="+intToStr(blend);
@CallComponent(Component: Print);

//

@UseMaterial(Material: DinaRedMaterial);
glGetBooleanv(GL_BLEND, blend);
Print.Y = 0.3;
Print.Text = "UseMaterial(DinaRedMaterial) -> blend="+intToStr(blend);
@CallComponent(Component: Print);

//

@UseMaterial(Material: DinaMaterial);
glGetBooleanv(GL_BLEND, blend);
Print.Y = 0.2;
Print.Text = "UseMaterial(DinaMaterial) -> blend="+intToStr(blend);
@CallComponent(Component: Print);

//

@UseMaterial(Material: DinaMaterial);
glGetBooleanv(GL_BLEND, blend);
Print.Y = 0.1;
Print.Text = "UseMaterial(DinaMaterial) -> blend="+intToStr(blend);
@CallComponent(Component: Print);

//

@UseMaterial(Material: DinaMaterial);
glGetBooleanv(GL_BLEND, blend);
Print.Y = 0.0;
Print.Text = "UseMaterial(DinaMaterial) -> blend="+intToStr(blend);
@CallComponent(Component: Print);

//

glGetBooleanv(GL_BLEND, blend);
Print.Y = -0.1;
Print.Text = "blend="+intToStr(blend);
@CallComponent(Component: Print);

//

glGetBooleanv(GL_BLEND, blend);
Print.Y = -0.2;
Print.Text = "blend="+intToStr(blend);
@CallComponent(Component: Print);

//

glDisable(GL_BLEND);
glGetBooleanv(GL_BLEND, blend);
Print.Y = -0.3;
Print.Text = "glDisable(GL_BLEND) -> blend="+intToStr(blend);
@CallComponent(Component: Print);

glGetBooleanv(GL_BLEND, blend);
Print.Y = -0.4;
Print.Text = "blend="+intToStr(blend);
@CallComponent(Component: Print);

glGetBooleanv(GL_BLEND, blend);
Print.Y = -0.5;
Print.Text = "blend="+intToStr(blend);
@CallComponent(Component: Print);

//

glEnable(GL_BLEND);
glGetBooleanv(GL_BLEND, blend);
Print.Y = -0.6;
Print.Text = "glEnable(GL_BLEND) -> blend="+intToStr(blend);
@CallComponent(Component: Print);

glGetBooleanv(GL_BLEND, blend);
Print.Y = -0.7;
Print.Text = "blend="+intToStr(blend);
@CallComponent(Component: Print);

glGetBooleanv(GL_BLEND, blend);
Print.Y = -0.8;
Print.Text = "blend="+intToStr(blend);
@CallComponent(Component: Print);]]>
      </Expression>
    </ZExpression>
  </OnRender>
  <Content>
    <Group Comment="Dina">
      <Children>
        <Font Name="DinaFont" Bitmap="DinaBitmap" FirstChar="32" CharPixelWidth="8" CharPixelHeight="16"/>
        <Bitmap Name="DinaBitmap" Width="128" Height="128" Filter="1">
          <Producers>
            <BitmapFromFile Transparency="1" DataWidth="128" DataHeight="128">
              <BitmapFile>
<![CDATA[78DAED5DDB96E3200CE3FF7F7AF66DCF9C6930B27C011AF969A64D49A2185F844DC69048241289E42DF2F34BC0837FFF810FFEF91364846628F69EF1FFBF8F57F2F9EDF282ED038EC21F57C29EC7F1792538EC20C8E7E03F9BA48FF3F76722E9F6C7981DAE93CE0E93FEBB9493B03FCBD14E7B04D583FFB9EB6AFB8F18B7D3BC7027FE5BE29FA5A1FB02908DF97E9497CFB263F6C1C1994BF8115BC93FCD4EB5E90323AB443FCED9D88DDA58743D360E2ECD37F09F6994EBABB7E5DDEF71BE1289E48BED18EE2C246D79AB2B2E92D0544C1CFF59724A8CEF4A7E0745A6E1F11B411212D444B5FED7E16F2F88C42968EF1C8FD3B915B4460A7F9BA27B89CA530DDAD5F82FCF5884FF2DFACFADBC18A11AB838FB6709A6E81164017894FE0F3FF1D5B0049912FF544FA52CFF8B78D8A0816AB0EA9D2705D785B3F0C7EB19885BDB5EDDD1A0FF5CF07C54FC7F35FE83E2759BD75FFA53E966FBCF39C7E6F517C999CCCFB1DE3CD1950BFF2B6E53F86FC71FA94B4CF4B0C2BFCDEFBBF29DD95776F18F51D7EA4AA9F038D3F87776FD447D7E29FEAEB411BC129CD705D352BBBE6579523026BC177F6F5ABA7C5E46F15204FF41D5E75F813FC7EBC6F1B727858BF6897FEEE5AB8BEC0F8DFFA3A2DAD5A45EFD373C05E1BE677E0D9C2004FECB7B8FD81F64F014FC47C6BAFFAEF86779BCD728D1F873FA734EFCF3E6DCF304FF2BFC85BFF097ECE27F24122254131AF229C23F328984E15EFD3FFF1120FC39629F91922A90325AAE47CC4E8D132048C083B73947FAEEB3F27DD7E72033839717562C5810F8D37577DCF8DE719078FB55F87BE73B81BF8B076BC0DF360EFDF877EAFF39F6E73BF097FDCFB53FCB602631FEF1AE472CEB2E1092875E2F8BE3D31936A7971B55575C77E60B445C2AFC9B33CAB6063170AAD207B80CF217F70BEC9AD4A28024128944C2C5E79DEB716FF05674F84D34A51A5BB3CEB23C246DA7F97CFC368375B606EF57877F303C23EAEA693EA701FFEA54A2223CF6F24811FCED1D6BC1FE0B425DAFC31FD7A514FC87A7FF221DFFA2B72A80C630B2FE5B8DFF58EDBF9D62C641FC830E258BCFA7F1AFE8BF08CE0BD7DD7D37FEF66DBA0C51A26B8EECB37DF27A16DD7FC1297C965FF6E2EFB2E759C7EFC29F88FF89B848E46A5628C82565C23F8BFFE1FAFD2512894422915CE4F7BDFDE3AEF8DF3829BDBF8777FF1FEF38E075D2EB2359FCB3972F0D76DAD2F59FCD75F5F8E7C1E75B5166BC0BFF7EFD8CD7F1DE823FC2639C807F90CFF1DA557C7CD77E6E2EFC233BA2180072F66724EDAB56A4FFA07921F4DF85BF519FC0BD7758F8BBECCF0CFFACBE0C6EDFA493E31F047F504F1EF704E3F607C3FB471AE2FF94B8DD7BA90D7D6DE24B2512894422919C268A4C4E7804BB9E3BD76FEE8A6F893E77049FE538B8AA2FA740B01FD64BCF8EBC82F3B1A38FC0F815817FBC453A8EFFA8E91349E7F3D30D4BD1FB37973432DDF1B4B45717E1EFEA63F2CEC4E16F61589AE2A5CD89BC6733B8EF4A9B5376191357E5B0EB2B57EF4CF0A5E134AFBBFC3C45FF6D83F3F855CA0B6B3E870A1A8A745E7DE97F73ED7F1BFF8F3B1A6E0A14EDF75514FF2C4DB177EA8171FBD2FE2F437722EFA8E0DB7BB6BB9174E6B912894422915CEDDDD2399F6552702F383DE3B7ED4E59340297F4E13C7C967635E0EF852225E08FE3FFB86F06B26340D6456665BE41FCAB8D00B29FBC412E75E24F90BD771961702B98D97E4A0DFA8F932D7B1F41B5FD6FA0C5B8BAD3E07CEFC7DFEE53B3DFE7DE89FF5EFD1F65EB9888FF9D1DD96C7F76D9FFEDF8DF1BFFEC7A04F624F56E31140FFBBFE3FDB0CDF837E4A1D76D329F32DFFBEF2E52DAF42A424682C83F99AF58DD]]>
              </BitmapFile>
            </BitmapFromFile>
          </Producers>
        </Bitmap>
        <Material Name="DinaMaterial" Blend="1" Font="DinaFont"/>
        <Material Name="DinaRedMaterial" Color="1 0 0 1" Blend="1" Font="DinaFont"/>
      </Children>
    </Group>
    <RenderText Name="Print" Text="blend=1" X="-0.9" Y="-0.8" Scale="0.25" Align="1" StretchY="2"/>
  </Content>
</ZApplication>
K
User avatar
Ats
Posts: 706
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: One in two BitmapFont lose transparency on Android

Post by Ats »

Screenshot_20210505-123225.png
Screenshot_20210505-123225.png (19.13 KiB) Viewed 12078 times
By the way, my Android device is a Google Pixel 3A, so pretty standard when it comes to Android :wink:
User avatar
Kjell
Posts: 1910
Joined: Sat Feb 23, 2008 11:15 pm

Re: One in two BitmapFont lose transparency on Android

Post by Kjell »

:|

Dang-it, didn't know / forgot(?) that Transparency=BlackColor results in white pixels ( instead of black ) on Android. White-on-white text is a little hard to read you know .. please try the same project with a silver Dina font instead of white:

Code: Select all

<?xml version="1.0" encoding="iso-8859-1" ?>
<ZApplication Name="App" Caption="ZGameEditor application" ClearColor="0.502 0.251 0.251 1" FileVersion="2">
  <OnLoaded>
    <ZExternalLibrary ModuleName="opengl32">
      <BeforeInitExp>
<![CDATA[//

if(ANDROID)
{
  ModuleName = "libGLESv1_CM.so";
}]]>
      </BeforeInitExp>
      <Source>
<![CDATA[//

const int GL_BLEND = 0x0BE2;

//

void glDisable(int cap){}
void glEnable(int cap){}
//byte glIsEnabled(int cap){} // Can't use this in ZGE due to byte return-type :-(
void glGetBooleanv(int pname, xptr params){}
void glGetIntegerv(int pname, xptr params){}]]>
      </Source>
    </ZExternalLibrary>
  </OnLoaded>
  <OnRender>
    <ZExpression>
      <Expression>
<![CDATA[//

byte blend;

//

@UseMaterial(Material: DinaMaterial);
glGetBooleanv(GL_BLEND, blend);
Print.Y = 0.8;
Print.Text = "UseMaterial(DinaMaterial) -> blend="+intToStr(blend);
@CallComponent(Component: Print);

//

@UseMaterial(Material: DinaRedMaterial);
glGetBooleanv(GL_BLEND, blend);
Print.Y = 0.7;
Print.Text = "UseMaterial(DinaRedMaterial) -> blend="+intToStr(blend);
@CallComponent(Component: Print);

//

@UseMaterial(Material: DinaMaterial);
glGetBooleanv(GL_BLEND, blend);
Print.Y = 0.6;
Print.Text = "UseMaterial(DinaMaterial) -> blend="+intToStr(blend);
@CallComponent(Component: Print);

//

@UseMaterial(Material: DinaMaterial);
glGetBooleanv(GL_BLEND, blend);
Print.Y = 0.5;
Print.Text = "UseMaterial(DinaMaterial) -> blend="+intToStr(blend);
@CallComponent(Component: Print);

//

@UseMaterial(Material: DinaRedMaterial);
glGetBooleanv(GL_BLEND, blend);
Print.Y = 0.4;
Print.Text = "UseMaterial(DinaRedMaterial) -> blend="+intToStr(blend);
@CallComponent(Component: Print);

//

@UseMaterial(Material: DinaRedMaterial);
glGetBooleanv(GL_BLEND, blend);
Print.Y = 0.3;
Print.Text = "UseMaterial(DinaRedMaterial) -> blend="+intToStr(blend);
@CallComponent(Component: Print);

//

@UseMaterial(Material: DinaMaterial);
glGetBooleanv(GL_BLEND, blend);
Print.Y = 0.2;
Print.Text = "UseMaterial(DinaMaterial) -> blend="+intToStr(blend);
@CallComponent(Component: Print);

//

@UseMaterial(Material: DinaMaterial);
glGetBooleanv(GL_BLEND, blend);
Print.Y = 0.1;
Print.Text = "UseMaterial(DinaMaterial) -> blend="+intToStr(blend);
@CallComponent(Component: Print);

//

@UseMaterial(Material: DinaMaterial);
glGetBooleanv(GL_BLEND, blend);
Print.Y = 0.0;
Print.Text = "UseMaterial(DinaMaterial) -> blend="+intToStr(blend);
@CallComponent(Component: Print);

//

glGetBooleanv(GL_BLEND, blend);
Print.Y = -0.1;
Print.Text = "blend="+intToStr(blend);
@CallComponent(Component: Print);

//

glGetBooleanv(GL_BLEND, blend);
Print.Y = -0.2;
Print.Text = "blend="+intToStr(blend);
@CallComponent(Component: Print);

//

glDisable(GL_BLEND);
glGetBooleanv(GL_BLEND, blend);
Print.Y = -0.3;
Print.Text = "glDisable(GL_BLEND) -> blend="+intToStr(blend);
@CallComponent(Component: Print);

glGetBooleanv(GL_BLEND, blend);
Print.Y = -0.4;
Print.Text = "blend="+intToStr(blend);
@CallComponent(Component: Print);

glGetBooleanv(GL_BLEND, blend);
Print.Y = -0.5;
Print.Text = "blend="+intToStr(blend);
@CallComponent(Component: Print);

//

glEnable(GL_BLEND);
glGetBooleanv(GL_BLEND, blend);
Print.Y = -0.6;
Print.Text = "glEnable(GL_BLEND) -> blend="+intToStr(blend);
@CallComponent(Component: Print);

glGetBooleanv(GL_BLEND, blend);
Print.Y = -0.7;
Print.Text = "blend="+intToStr(blend);
@CallComponent(Component: Print);

glGetBooleanv(GL_BLEND, blend);
Print.Y = -0.8;
Print.Text = "blend="+intToStr(blend);
@CallComponent(Component: Print);]]>
      </Expression>
    </ZExpression>
  </OnRender>
  <Content>
    <Group Comment="Dina">
      <Children>
        <Font Name="DinaFont" Bitmap="DinaBitmap" FirstChar="32" CharPixelWidth="8" CharPixelHeight="16"/>
        <Bitmap Name="DinaBitmap" Width="128" Height="128" Filter="1">
          <Producers>
            <BitmapFromFile Transparency="1" HasAlphaLayer="1" DataWidth="128" DataHeight="128">
              <BitmapFile>
<![CDATA[78DAED5D5B8EDC300C9BFB9F6A6ED6FE2E169B5812494B4E48A040B193A769BD6DE5F3310CC3300CC3302AF87EBFFF7EFEAB9CFBFBFFD57B5F5D237BDD89637CCA73FDFCDBDD735F1D9779D7E8B127F35F95AD2973E2EAB9AB9C57B83D95FF956EBBD37F57BFB1E752E4BA113D813CDBEA1CCB7F9F5DCACA7FF53D57F7397D0E74DFFBAF71ECB6FF59DB73BA1F388DFFC9FE7FC61699DBB5ED3EDD0F55DB97E8B90ABDC7F02FA2B27DA5F3BB6D5425EED8E15FB2ECE50972D6F1FCD1F145E43EC2FF4A2E90630C9EFF6218866118EADC8CEDB9E7001A1F18FBE247766E00E57F957B63DC3FE33BDFC52F48EDA61AFF306A5B8C1C71B7FC77F11F5D6BA1AA01A3FA525513653F6717FF957333F2B463EE7773F366FE33CFD5C1FFD3E59FB5EE2312E354D6DEFDB506A4630EA8B93A59FE11BF536DFF157E8032B650CD03B5FF97F5EB14B662821D9FF66C95F5816AFEABEB77196374D23AE909F2CF8A7D4F8EFFDFCC7F24B794E5B06B7CA7E74E27DB7F96EF3571FD876130E7FDDBE6D874DB6AFE9FE5CB98FF67F29FDD1FB6C3AF33FF33C6AC6BFF5E74EFF8D531D1B5FF91FD91480EA71ADF45FEB67A7FC6FEFB4EFEB3F144B5BE55C9B930EAEB91F5E79967ABC45B6FE53F724F94FF887C477540657D0763FFFD93F967D54755FC47754345FFA87F47EBC71DFA9FC9FF9D2C46F719A2F21FF11B183EE5CA3FAAE80A06FF99F164EBFFECBD95FC67EEF934FF3F733E6A1B98FCB3E6FFA9FEBFF36933DED1FC9B7FF36FFEDF3C466F9803D3F2FF86F116B9B32C19B6A586AAF7AB47F6DDF2FFD43990AD7F67ED6F760F4776ECB3EB1756CF98E1BF5AABFE7D5CA66722BB3FE9DDDFBA7F8F8C29E3FAD5181DA97530F867EE4F62DD1FBD7E367E36FF989D42F427837FA4BE3281FFA8EE9DCAFF34F93F55FF9B7FDBFF27E8FF8CEFBEC3FF47D72F64D627AFC6883957AFBE67C31EFF6931EFCE3D09DDFB92A7E50F18F1A1F93F93FF297B81D0FD55AA3167D8FFACFDD89DE3FB1854FE0DC3300CC378AFDFC0E80F36C547B39FD31753337AC345BE1179175729EACF487FDDE89829F67746EA535DFC2B621AC6FE7866FE7E02FFDD3986DD312D5A5F60F31FFD2E67A5FF034326DFC47F551E94FC67744027FF6C5D52F511B2FC33EA4F9DFCDFE986C8B92C9B5DE15FE16BA8EBF74CFE77F77F50E807649CCCBFAEFF034357A9F98FEAA749FC2BD7EF30FB3FB0645DED1FA2FC23F65B7DFE74FE19F13F233E704EEECCFC1F2B3764FE67F38FE406BD7FD9300CC3300CC350FAA768FF4B24FE8F3C1BB3FF34DAFF1FBD7EE5FD98EB2FD4F55FB47EA8E89BC7DCFF37717F7CF577C5FCDBBD67763AFF53E54FB5BFF4E9FCAF8E3B9DFFACFD56BC1FEBFEC8F77B10FED97DC1235CB1F47F763E9F20FF159DCE907F84FFC8FADBCAFADC6CCF02F3DFA3FF57FCABFB43B0BECFF034FF3FCB7F657EDF7D6F85F5FD956AFF8B09F1BF323E47DF71427F24D70F0DC3300CC3300C631FEC771B93F967F7CF44E24F467FCFECF867AE5F95F18C0E50F4AF436B9AD963ABE74CED2F10B90E837F550F4615FF956766EE95DCDD4B42A9CB91EBA23D33519EAB3A2B537F7D32FF487F19546F45C6141D9768FE1D5D7BB7C3BF98DC431BD1DDC8BE57E418A49F086A7BD4F5D1CCEF4AF98FEAFABB6358FE6B66CFAD4217EFAC8F67FCBF5DF67F52FDBFEA8BB07440C7F7533AFCFF8C8D457554253ECFD8FF4C8CCEC84FECAE9F4FE9496F3C27F7E8F51F866118866118B9F866877FE6B19F7BFF49DF89EBB82E2B3755ADAFABE56402FFE8182B637D15FF77FD99B37D59D5EFA6CEFB29F8EFD6ADD9EFB7476A0FD3F867D44EDF625B2B3DD657DF6F9820FFD5DCF92973A0DBFE4FA8B9B0F6272AF4E754FEA3FD8D2235C16E1FF964F967CAB0D2FF5B9D3751FF4FB7FF27F1FF56FF7FFA1C88EA36F41B04AA985FDD47C4FCEBAE3F21BFF3A4FCAC527F4E1D27F61E09F36F9C8EFFFFBE466F]]>
              </BitmapFile>
            </BitmapFromFile>
          </Producers>
        </Bitmap>
        <Material Name="DinaMaterial" Blend="1" Font="DinaFont"/>
        <Material Name="DinaRedMaterial" Color="1 0 0 1" Blend="1" Font="DinaFont"/>
      </Children>
    </Group>
    <RenderText Name="Print" Text="blend=1" X="-0.9" Y="-0.8" Scale="0.25" Align="1" StretchY="2"/>
  </Content>
</ZApplication>
K
User avatar
Ats
Posts: 706
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: One in two BitmapFont lose transparency on Android

Post by Ats »

Oh, I thought it was part of the bug :lol:
Screenshot_20210505-125032.png
Screenshot_20210505-125032.png (19.23 KiB) Viewed 12066 times
User avatar
Kjell
Posts: 1910
Joined: Sat Feb 23, 2008 11:15 pm

Re: One in two BitmapFont lose transparency on Android

Post by Kjell »

:|

Alright, seems like glGet(GL_BLEND) simply returns the opposite of what the current blend state actually is. So it returns FALSE when blending is enabled and TRUE when blending is disabled. This could be a Android OpenGL driver issue rather than a ZGE issue ( not 100% sure though ). I'll try to test this project on a couple of Android devices myself to see if i get the same results .. if anyone else wants to help out please be my guest ~

K
User avatar
Ats
Posts: 706
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: One in two BitmapFont lose transparency on Android

Post by Ats »

Here's the last GL_BLEND test if that can avoid you to setup the entire Android environment :wink:
Attachments
Test GL_BLEND-debug.apk
(342.33 KiB) Downloaded 430 times
User avatar
Ats
Posts: 706
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: One in two BitmapFont lose transparency on Android

Post by Ats »

Here's the result on the old Galaxy SII (2011):
Screenshot_20210505-173054_Test_GL_BLEND.png
Screenshot_20210505-173054_Test_GL_BLEND.png (20.75 KiB) Viewed 12049 times
User avatar
Kjell
Posts: 1910
Joined: Sat Feb 23, 2008 11:15 pm

Re: One in two BitmapFont lose transparency on Android

Post by Kjell »

Hi guys,
Ats wrote: Wed May 05, 2021 3:33 pmHere's the result on the old Galaxy SII (2011)
That looks correct :) I just tested on 2 Android devices myself and had similar results; it worked properly on one of them and i had the same issue as Ats on the other.

@Ville - Maybe it would be easiest to ditch the glGet calls in fakePushAttrib and store the current state locally instead? Or just cache the current texture(s) in RenderText itself instead of using the attribute stack.

K
Post Reply