[Interest] Skybox Qt Quick3D bad performance in Android

2021-07-30 Thread joao morgado via Interest
I'm testing Quick3D on Android, all good, but if I use a skybox the performance 
is really bad or does not work at all.

The following test project with  trivial code is just a skybox and a red 
cilinder. 
SkyBoxTest.zip


| 
| 
|  | 
SkyBoxTest.zip


 |

 |

 |



Runs fine in desktop linux mint, windows, MacOS, iPhone, but in my 2 android 
devices:

- tablet Lenovo Tab M10 TB-X306F, OS Android 11, when I run the program, I get 
a black screen, it takes 55 seconds to load the image of the skybox and the red 
cylinder
- mobile nokia 5.4 OS Android 10:  compilation fails with the following errors: 
---E
 VpsExtension: Failed to get binder for service "vendor.vpsservice"E 
VpsExtension: Failed to get binder for service "vendor.vpsservice"I 
AdrenoGLES-0: ERROR: 0:2: '' :     GLSL error: extension 
'GL_EXT_shader_texture_lod' is not supportedI AdrenoGLES-0: ERROR: 0:77: 
'textureCubeLodEXT' : no matching overloaded function foundI AdrenoGLES-0: 
ERROR: 0:77: 'xyz' :  field selection requires structure, vector, or matrix on 
left hand sideI AdrenoGLES-0: ERROR: 0:77: 'return' : function return is not 
matching type:I AdrenoGLES-0: ERROR: 4 compilation errors.  No code 
generated.07-31 02:35:03.170 24150 24253 I AdrenoGLES-0:W 
libSkyBoxTest_arm64-v8a.so: Failed to compile shader: ERROR: 0:2: '' :     GLSL 
error: extension 'GL_EXT_shader_texture_lod' is not supportedW 
libSkyBoxTest_arm64-v8a.so: ERROR: 0:77: 'textureCubeLodEXT' : no matching 
overloaded function foundW libSkyBoxTest_arm64-v8a.so: ERROR: 0:77: 'xyz' :  
field selection requires structure, vector, or matrix on left hand sideW 
libSkyBoxTest_arm64-v8a.so: ERROR: 0:77: 'return' : function return is not 
matching type:W libSkyBoxTest_arm64-v8a.so: ERROR: 4 compilation errors.  No 
code generated.07-31 02:35:03.170 24150 24253 W 
libSkyBoxTest_arm64-v8a.so:07-31 02:35:03.170 24150 24253 W 
libSkyBoxTest_arm64-v8a.so:W libSkyBoxTest_arm64-v8a.so: Source was:W 
libSkyBoxTest_arm64-v8a.so: #version 100W libSkyBoxTest_arm64-v8a.so: 
#extension GL_EXT_shader_texture_lod : requireW libSkyBoxTest_arm64-v8a.so: 
precision highp float;W libSkyBoxTest_arm64-v8a.so: precision highp int;07-31 
02:35:03.170 24150 24253 W libSkyBoxTest_arm64-v8a.so:W 
libSkyBoxTest_arm64-v8a.so: struct LightSourceW libSkyBoxTest_arm64-v8a.so: {W 
libSkyBoxTest_arm64-v8a.so:     vec4 position;W libSkyBoxTest_arm64-v8a.so:     
vec4 direction;W libSkyBoxTest_arm64-v8a.so:     vec4 diffuse;W 
libSkyBoxTest_arm64-v8a.so:     vec4 specular;W libSkyBoxTest_arm64-v8a.so:     
float coneAngle;W libSkyBoxTest_arm64-v8a.so:     float innerConeAngle;W 
libSkyBoxTest_arm64-v8a.so:     float constantAttenuation;W 
libSkyBoxTest_arm64-v8a.so:     float linearAttenuation;W 
libSkyBoxTest_arm64-v8a.so:     float quadraticAttenuation;W 
libSkyBoxTest_arm64-v8a.so: };07-31 02:35:03.170 24150 24253 W 
libSkyBoxTest_arm64-v8a.so:W libSkyBoxTest_arm64-v8a.so: struct cbMainW 
libSkyBoxTest_arm64-v8a.so: {W libSkyBoxTest_arm64-v8a.so:     vec3 
qt_cameraPosition;W libSkyBoxTest_arm64-v8a.so:     vec4 
qt_lightProbeProperties;W libSkyBoxTest_arm64-v8a.so:     vec3 
qt_light_ambient_total;W libSkyBoxTest_arm64-v8a.so:     vec4 
qt_material_base_color;W libSkyBoxTest_arm64-v8a.so:     vec3 
qt_material_emissive_color;W libSkyBoxTest_arm64-v8a.so:     vec4 
qt_material_properties;W libSkyBoxTest_arm64-v8a.so:     vec4 
qt_material_properties2;W libSkyBoxTest_arm64-v8a.so:     vec4 qt_material_W 
libSkyBoxTest_arm64-v8a.so: Failed to build graphics pipeline 
state
It seems that skybox uses an extension that is not available in nokia 5.4 GPU 
or software.I will report a bug, but before that, maybe someone wants to give 
theirs 2 cents ?

The code is
Window {visible: truewidth: 640height: 480title: qsTr("Hello 
World")



View3D {id: view3Dvisible: truewidth: parent.width  
  height: parent.height
//SkyBox modeenvironment: SceneEnvironment {
backgroundMode: SceneEnvironment.SkyBoxlightProbe: Texture {
source: "qrc:/galaxy.hdr"mappingMode: 
Texture.LightProbe}}
// color mode/*environment: SceneEnvironment {
backgroundMode: SceneEnvironment.ColorclearColor: "skyblue"
}*/
//! [camera]PerspectiveCamera {id: cam
position: Qt.vector3d(0, 0, 500)}//! [camera]

DirectionalLight {eulerRotation.x: -45}
Model {id: ball//source: "#Cylinder"
source: "#Cylinder"scale: Qt.vector3d(1, 1, 1)
materials: [ DefaultMaterial {diffuseColor: "red"   
 }  

Re: [Interest] semi-modal dialog

2021-07-30 Thread Alexey Rusakov
I see quite a few applications adopting a popup instead that collapses into
a toolbar icon showing a progress summary as a micro-pie-chart. And if you
need to disable access to some components in the main window, you can
disable/enable respective widgets depending on the progress. If the
operation really blocks everything, maybe put the progress controls into an
overlay widget parented by the main window, disabling actual main window
controls. If you still need the ability to move the progress dialog
independently of the main window, I'd suggest using a torn-off toolbar as a
container of progress controls.

Kind regards,
Alexey

On Fri, 30 Jul 2021 at 01:56, Scott Bloom  wrote:

> This is the current path we are going down.
>
> The problem is also the titlebar differences between windows and linux
>
>
>
> ~~Scott
>
>
>
>  Original message 
> From: John Weeks 
> Date: 7/29/21 4:34 PM (GMT-08:00)
> To: Giuseppe D'Angelo via Interest 
> Cc: Scott Bloom 
> Subject: Re: [Interest] semi-modal dialog
>
> We do something similar- we make it possible to put up a control panel (a
> special type of window in our application) that allows the user to interact
> in certain ways with one other window and no others. We do it with some
> very hairy code that probably would make Thiago throw up.
>
> We fake the modal nature of this partially modal window by installing an
> event filter on the application. Then we just block all the events that
> shouldn't get through. Getting the choice of events right can be very
> tricky! The ugliest bit is responding to window activation to force the
> active window back to the one we want to be active.
>
> Hopefully, someone has a better solution to this problem!
>
> > On Jul 29, 2021, at 3:21 PM, Scott Bloom  wrote:
> >
> > Here is my problem.
> >
> > I have a progress dialog, that I need to be able to use as a modal
> dialog with respect to the main window (a QMainWindow class, which is also
> its parent widget).
> >
> > But, I need to still be able to minimize the main application and even
> move it.
> >
> > Any ideas on the best way to implement something like this?
> >
> > Scott
> > ___
> > Interest mailing list
> > Interest@qt-project.org
> > https://lists.qt-project.org/listinfo/interest
>
> -John Weeks
>
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
>


-- 
  Alexey Rusakov
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Issues with QML binding

2021-07-30 Thread James DeLisle
Hi,

You may also try making backendCPP a singleton instead of inserting it in to 
the context. It is not out of the realm of possibilities that an object 
instance exposed to QML through a context property is nullptr when the QML 
object using it is constructed by the engine – thus yielding erratic results. 
The fact that you are seeing different results on different platforms points to 
a timing peculiarity on the lower end hardware.

Cheers,
James

From: Interest  on behalf of Alexander 
Dyagilev 
Date: Thursday, July 29, 2021 at 4:17 PM
To: Nibedit Dey 
Cc: Jérôme Godbout , Qt Project 
Subject: Re: [Interest] Issues with QML binding
Sounds like a race condition bug affecting your method.

On Thu, Jul 29, 2021, 21:54 Nibedit Dey 
mailto:nibedit@gmail.com>> wrote:
Thank you for your inputs.
The values are fetched only once and assigned to the Text element.
This doesn't require any notification later as the data doesn't change in the 
app's lifetime.
Hence, I haven't used Q_PROPERTY and notification signals. However, the 
getStringData() has some logic inside it before returning the string.

This issue is sometimes seen in low-end embedded hardware and does not appear 
at all in desktop and high-end embedded devices. I know the issue can be fixed 
by using Q_PROPERTY and notification signals,
but I am trying to understand what might be going wrong in low-end embedded 
hardware. Debugging is not helping much here as it is not repeatedly 
reproducible.
It seems like there is some sync issue with Q_INVOKABLE method execution time 
and QML creation in some low-end hardware.

For example, if I want to show the version number of an application by invoking 
a C++ function like below:
text: "Version:" + backendCPP.getVersion()
Do you see any problem with the above line?

Thanks & Regards,
Nibedit

On Thu, Jul 29, 2021 at 11:18 PM Alexander Dyagilev 
mailto:alervd...@gmail.com>> wrote:

backendCPP.getStringData() is  a method. You can't bind it. You should use 
propery (Q_PROPERTY) and bind to it instead.
On 7/27/2021 6:50 PM, Nibedit Dey wrote:
Dear All,

I recently came across a strange issue related to QML binding.
The issue is not reproducible often which makes it difficult to find the root 
cause.
Sample QML code:
Case 1: text : "Retrieved details"+ backendCPP.getStringData()   //Sometimes, 
the complete string is empty
Case 2: property string someString : backendCPP.getStringData()
text: "Retrieved details:"+ someString // Displays Retrieved details: value 
remains empty
99% time, the value is fetched and displayed properly in Text element. Rarely, 
it remains empty.
Here backendCPP is a C++ instance exposed through context property and an 
invokable method is used to fetch data. Notify signal is not used in this case.
I believe during failure cases the data is not retrieved from backendCPP, when 
binding happened due to delay in the invokable method. Is my assumption correct?
Although we can handle the issue in multiple ways including using a NOTIFY 
signal or using Qt.binding, I am curious if anyone has observed this issue.
Please share your inputs.

Thanks & Regards,
Nibedit



___

Interest mailing list

Interest@qt-project.org

https://lists.qt-project.org/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QML: Image is blurred when rotated

2021-07-30 Thread Shawn Rutledge


> On 2021 Jul 29, at 19:45, Alexander Dyagilev  wrote:
> 
> Hello,
> 
> I have an SVG image which is drawn fine.
> 
> But if I rotate it (i.e. change its rotation property to some value) it is 
> drawn blurry.

How blurry?

Image.sourceSize is useful when working with SVG, to render at a specific pixel 
resolution.  But that might not be the problem, if you just mean that pixels 
are pixel-grid-aligned to begin with, and then of course they are not anymore 
when it’s rotated.

You can also try Image.antialiasing.  That may make it more blurry in a good 
way (because blur is better than jaggies: AA means fuzzy edges).

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest