[Interest] [Qt3D] FirstPersonCameraController not working in Scene3D-loader

2016-04-23 Thread Oleg Evseev
Hello,

There is example scene3d-loader in qt3d. It loads Scene with
AnimatedEntity, that uses FirstPersonCameraController QML type. But unlike
others examples, that use Qt3DQuickWindow view with working camera
controllers, scene3d-loader uses QQuickView and FirstPersonCameraController
doesn't work.

Watched it in debug mode - program never passes in function onTriggered in
FrameAction.

Could anybody help with that? Great thanks in advance!

p.s. and by the way, application scene3d-loader hangs when trying to load
Scene2 (windows 7 x64)

Regards, Oleg
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Qt3d] Does the duration of NumberAnimation update when you change its value?

2016-04-26 Thread Oleg Evseev
Hi, Ramy and Sean

> Something like this should do it (not tested)

Thank you, Sean. Correct it little bit, tested, it works:

Entity {

id: mainEntity

property real progress: 0.0

property real rotationSpeed: -1.0

property real angle: previousAngle + ( progress * 360.0 *
rotationSpeed  )

property real previousAngle: 0.0


function updatePreviousRotation() {

mainEntity.previousAngle = mainEntity.angle % 360;

}


TorusMesh { id: mesh; radius: 5; minorRadius: 1; rings: 100;
slices: 20 }

PhongMaterial { id: material }


//for some reason in this test project using just "angle" leads to
ReferenceError,
// but in another project it's all right to use Entity properties in
Transform without Entity id

Transform {id: transform; rotation:  fromEulerAngles(0,
mainEntity.angle, 0) }


SequentialAnimation {

running: true

loops: Animation.Infinite


NumberAnimation {

target: mainEntity; property: "progress"

from: 0.0; to: 1.0

duration: 1000

}


ScriptAction {

script: {

mainEntity.updatePreviousRotation();

mainEntity.rotationSpeed += 0.1;

}

}

components: [ mesh, material, transform ]}
}


rotationSpeed defines cycles per second.

But now I have another related question. To compute rotationSpeed from
vehicle linear speed one needs wheel radius. If I use different vehicle
models with distinct size of wheels, I need to know sizes of a mesh
(something like size of 3d model collision box).
Is there a way to get mesh cube size?

Regards, Oleg
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [Qt 3D] Entities with custom meshes disappear when there are many of them in one place

2016-05-01 Thread Oleg Evseev
Hi,

Not going into details just the main point:

In my scene I have huge ground plane and on top of it I draw car path.
I break path mesh into peaces, create new entity with QGeometryRenderer,
meshGeometry and so on in it and append it to my current parent Entity.
When vertex array get filled, I create new one and so on.
It works, but when car starts driving by round almost at the same loop
place, all Entities of that loop suddenly disappear (at a moment when car
trying to pass almost same way in fifth time) and no new Entities (even
when car drives out from loop) are not shown anymore (despite they are
added to scene).

Here https://www.youtube.com/watch?v=InxhSB_YuhU I recorded video
illustrated this problem.
Windows 7 x64, Qt 5.6

Maybe those problems related to OpenGl realization in Windows/video card
drivers?

Thank for help in advance.

Regard, Oleg
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [QT3D] How to make billboard?

2016-05-06 Thread Oleg Evseev
Hello,

I am interesting if there are ready to use classes or functions to make
billboards (2D elements in 3D world that always faces the camera) in QT3D
(qml and cpp).

As I see by https://bugreports.qt.io/browse/QTBUG-24454 in Qt3D 1.0 there
was BillBoardTransform class, functionality of which was replaced by
LookAtTransform.
But I didn't find LookAtTransform in qt 5.6 or 5.7.

I understand that I can do it by my own class following for example this
tutorial
http://www.opengl-tutorial.org/ru/intermediate-tutorials/billboards-particles/billboards/
but maybe this is not needed actually?

Thanks for your attention.

Regards, Oleg
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [QT3D] Multiple vertex buffers per Qt3DRender::QGeometry

2016-05-12 Thread Oleg Evseev
I think my suggestion https://bugreports.qt.io/browse/QTBUG-50720 (and
attached commit on gerrit) will help solve your task with updating the
subset of QBuffer.

I did it for 5.7 branch, but currently I use almost same code in 5.6.

Regards, Oleg
12 мая 2016 г. 18:54 пользователь "Camden Mannett" 
написал:

> On the Qt forums a couple of months ago someone posted a message regarding
> trying to use multiple vertex Qt3DRender::QBuffers
> per Qt3DRender::QGeometry (
> https://forum.qt.io/topic/64770/implement-multiple-vertex-buffers-per-one-renderable-entity),
> they pointed towards this mailing list but I can't find any entry on the
> subject.
>
> I'm currently trying to visualise FDTD data, which consists of a large
> number of grid nodes, each with a static position and a rapidly changing
> scalar pressure value.  Naturally I created two vertex buffers, one
> StaticDraw for the positions, and another DynamicDraw for the pressures.  I
> never understood why my pressure vertex never seems to be accessed, until I
> read the above post.
>
> So now for a workaround.  I tried to create one large buffer with the
> position data occupying the first 75%, and the scalar data the latter 25%.
> I never got as far as trying it as there seems to be no way to update a
> subset of the Qt3DRender::QBuffer, as Qt3DRender::QAbstractBuffer::data()
> returns a copy of the data.  So I would have to copy all the unchanging
> position data to the GPU as well - which obviously woefully inefficient.
>
> What is the way to do this?  I can't find any examples that use buffer
> subsets or multiple vertex buffers.
>
> Thanks
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [QT3D] How to make billboard?

2016-05-17 Thread Oleg Evseev
I was able to make working billboards entities with my own Material class.
Create suggestion for adding it in qt 3d 5.7:
https://bugreports.qt.io/browse/QTBUG-53442

Regards, Oleg

2016-05-06 16:53 GMT+03:00 Oleg Evseev :

> Hello,
>
> I am interesting if there are ready to use classes or functions to make
> billboards (2D elements in 3D world that always faces the camera) in QT3D
> (qml and cpp).
>
> As I see by https://bugreports.qt.io/browse/QTBUG-24454 in Qt3D 1.0 there
> was BillBoardTransform class, functionality of which was replaced by
> LookAtTransform.
> But I didn't find LookAtTransform in qt 5.6 or 5.7.
>
> I understand that I can do it by my own class following for example this
> tutorial
> http://www.opengl-tutorial.org/ru/intermediate-tutorials/billboards-particles/billboards/
> but maybe this is not needed actually?
>
> Thanks for your attention.
>
> Regards, Oleg
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [QT3D] Mesh sizes

2016-05-18 Thread Oleg Evseev
Sean Harmer answered this question already:
http://lists.qt-project.org/pipermail/interest/2016-April/022292.html

> At the moment, no. This is something we may well add for 5.8.
> For now you'll need to calculate it yourself or pass it in as metadata
somehow.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [QT3D] 3d Object and texture loads

2016-05-24 Thread Oleg Evseev
Maybe you read this
https://blog.qt.io/blog/2016/01/08/qt3d-asset-conditioning/ ?

Regards, Oleg

2016-05-24 20:36 GMT+03:00 Pierre Chicoine :

> I believe I read somewhere in connection with Qt3D that there was a more
> organic object and texture type that loads faster into a mesh object that
> did not go through a heavy parsing stage. Is that accurate or should we
> continue to use obj or 3ds types for objects and jpg or png for textures?
>
> Pierre Chicoine
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Qt3D] Troubles to migrate to Qt5.7rc

2016-06-09 Thread Oleg Evseev
I have the following in my app on qt 5.6:

// FrameGraph
QFrameGraph *frameGraph = new QFrameGraph();
QViewport *viewport = new QViewport();
viewport->setRect(QRectF(0.0f, 0.0f, 1.0f, 1.0f));
viewport->setClearColor(QColor("light blue"));

QLayerFilter *layerFilter = new QLayerFilter();
layerFilter->setEnabled(false);
QCameraSelector *cameraSelector = new QCameraSelector();
cameraSelector->setCamera(m_camera);

QClearBuffer *clearBuffer = new QClearBuffer();
clearBuffer->setBuffers(QClearBuffer::ColorDepthBuffer);
clearBuffer->setClearColor("light blue");

clearBuffer->setParent(cameraSelector);
cameraSelector->setParent(layerFilter);
layerFilter->setParent(viewport);

frameGraph->setActiveFrameGraph(viewport);
this->addComponent(frameGraph);

and I change it for this in qt 5.7 and it works:

QRenderSettings *renderSettings = new QRenderSettings();
QRenderSurfaceSelector *renderSurfaceSelector = new
QRenderSurfaceSelector();

QViewport *viewport = new QViewport();
viewport->setNormalizedRect(QRectF(0.0f, 0.0f, 1.0f, 1.0f));

QLayerFilter *layerFilter = new QLayerFilter();
layerFilter->setEnabled(false);
QCameraSelector *cameraSelector = new QCameraSelector();
cameraSelector->setCamera(m_camera);

QClearBuffers *clearBuffer = new QClearBuffers();
clearBuffer->setBuffers(QClearBuffers::ColorDepthStencilBuffer);

clearBuffer->setParent(cameraSelector);
cameraSelector->setParent(layerFilter);
layerFilter->setParent(renderSurfaceSelector);

renderSurfaceSelector->setParent(viewport);

renderSettings->setActiveFrameGraph(viewport);
this->addComponent(renderSettings);

--
Regards, Oleg


2016-06-03 16:57 GMT+03:00 Xavier Bigand :

> I finally found that the QFrameGraph class was renamed as QRenderSettings.
> And now I have the following error :
> No render surface selector found in frame graph
>
> I suspect that I need few new initialisation steps with Qt 5.7
>
> --
>
> Xavier Bigand
> Développeur
>
> 66 Rue Marceau,
> 93100 Montreuil.
> +33 (0) 1 48 97 92 96
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interes
> 
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [QT3d] Does anyone have any idea how to position a light in C++?

2016-06-11 Thread Oleg Evseev
Example "lights" is not what are you looking for?

This is in qml but obviously it is not so hard to write it in c++ just add
components QTransform and QPointLight (or SpotLight) to the QEntity and it
will work.

Regards, Oleg.

2016-06-11 13:43 GMT+03:00 Pierre Chicoine :

> Am I missing something simple. I can't seem to position a light in QT3D
> Any ideas anyone?
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [QT3d] Does anyone have any idea how to position a light in C++?

2016-06-11 Thread Oleg Evseev
Create new entity with transform and light components, add this entity to
the root entity to light the whole scene. One light with one transform.

Run the "lights" example and you'll understand the principle.

Or you can "pack" several of such entities (with lights and theirs own
transforms) into one entity (and add it to the root entity) with one
transform to [strike]rule[/strike] transform them all simultaneously. It's
up to you.

I've not tested all of this, but this is how it works looking on examples.

Regards, Oleg.

2016-06-11 14:01 GMT+03:00 Pierre Chicoine :

> With a point light, did you mean add a point light and transform to every
> entity or to the root entity to light the whole scene with one transform?
>
> Thanks for the reply Oleg.
> On Jun 11, 2016 3:52 AM, "Oleg Evseev"  wrote:
>
>> Do you mean point light?
>> Example "lights" is not what are you looking for?
>>
>> This is in qml but obviously it is not so hard to write it in c++ just
>> add components QTransform and QPointLight to the QEntity and it will work
>> (I think).
>>
>> Regards, Oleg.
>>
>> 2016-06-11 13:43 GMT+03:00 Pierre Chicoine :
>>
>>> Am I missing something simple. I can't seem to position a light in QT3D
>>> Any ideas anyone?
>>>
>>> ___
>>> Interest mailing list
>>> Interest@qt-project.org
>>> http://lists.qt-project.org/mailman/listinfo/interest
>>>
>>>
>>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [QT3d] Does anyone have any idea how to position a light in C++?

2016-06-11 Thread Oleg Evseev
I've just tested following in my app instead of directional light sun
entity and this works:


QEntity *en = new QEntity();

QPointLight *l = new QPointLight();

l->setColor("red");

Qt3DCore::QTransform *t = new Qt3DCore::QTransform();

t->setTranslation(QVector3D(15.0f, 0.0f, 0.0f));

en->addComponent(t);

en->addComponent(l);

en->setParent(this);

I've tried to add this (my scene main entity) directly in entity
creator and it is still works
(but you could try set parent latter - there was bug in qt 3d relevant
to this lately (before 5.7.0)).

I use almost last commit 5.7.0 from git.


--
Regards, Oleg.


2016-06-11 15:09 GMT+03:00 Pierre Chicoine :

> Oleg
>
> Thanks for the reply.
>
> Here's the code I hung off of the root entity. Didn't work. Maybe I'm
> translating from QML improperly. ??
>
>  // parent is the root entity
>
>  Qt3DCore::QEntity * pLightEntity = new Qt3DCore::QEntity(parent); // hang 
> off of root
>
>
>  Qt3DRender::QPointLight * pQPointLight = new Qt3DRender::QPointLight();
>
>  pLightEntity->addComponent(pQPointLight);
>
>  //pQPointLight->setColor(QColor::fromRgbF(1.0, 1.0, 1.0, 1.0));
>
>  //pQPointLight->setIntensity(4);
>
>  //pQPointLight->setEnabled(true);
>
>
>  Qt3DCore::QTransform * pLightQTransform = new Qt3DCore::QTransform();
>
>  pLightEntity->addComponent(pLightQTransform);
>
>  pLightQTransform->setTranslation(QVector3D(0,0,300));
>
>
>
>
> On Sat, Jun 11, 2016 at 4:11 AM, Oleg Evseev  wrote:
>
>> Create new entity with transform and light components, add this entity to
>> the root entity to light the whole scene. One light with one transform.
>>
>> Run the "lights" example and you'll understand the principle.
>>
>> Or you can "pack" several of such entities (with lights and theirs own
>> transforms) into one entity (and add it to the root entity) with one
>> transform to [strike]rule[/strike] transform them all simultaneously. It's
>> up to you.
>>
>> I've not tested all of this, but this is how it works looking on examples.
>>
>> Regards, Oleg.
>>
>>
>> 2016-06-11 14:01 GMT+03:00 Pierre Chicoine :
>>
>>> With a point light, did you mean add a point light and transform to
>>> every entity or to the root entity to light the whole scene with one
>>> transform?
>>>
>>> Thanks for the reply Oleg.
>>> On Jun 11, 2016 3:52 AM, "Oleg Evseev"  wrote:
>>>
>>>> Do you mean point light?
>>>> Example "lights" is not what are you looking for?
>>>>
>>>> This is in qml but obviously it is not so hard to write it in c++ just
>>>> add components QTransform and QPointLight to the QEntity and it will work
>>>> (I think).
>>>>
>>>> Regards, Oleg.
>>>>
>>>> 2016-06-11 13:43 GMT+03:00 Pierre Chicoine >>> >:
>>>>
>>>>> Am I missing something simple. I can't seem to position a light in QT3D
>>>>> Any ideas anyone?
>>>>>
>>>>> ___
>>>>> Interest mailing list
>>>>> Interest@qt-project.org
>>>>> http://lists.qt-project.org/mailman/listinfo/interest
>>>>>
>>>>>
>>>>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] How to set absolute Qt3D::QCamera rotation/orientation

2016-06-17 Thread Oleg Evseev
Qt3DRender::QCamera as an QEntity has QTransform component. You can get it
with help of Qt3DCore::QTransform *transform() const function and then
setTranslation, setRotation or setMatrix for it as you wish.

Maybe that is what are you looking for?

Regards, Oleg.

2016-06-08 14:32 GMT+03:00 Ola Røer Thorsen :

> I need to set a Qt3D::QCamera orientation directly. I've got the position
> in a QVector3D and the rotation in a QQuaternion. I can't seem to find any
> API for this. The "rotate"-function just adds my quaternion to the existing
> orientation which is not what I'm looking for. Is there some better way to
> do this?
>
> Cheers,
> Ola
>
>
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Qt 3D] Entities with custom meshes disappear when there are many of them in one place

2016-06-17 Thread Oleg Evseev
If suddenly somebody are interested in this case, such behavior was related
to PhongAlphaMaterial (even with alpha=1.0) in scene within Scene3D qml
Item inside qml Loader.
When using PhongMaterial instead everything works fine.

I filed a JIRA about related issues:
https://bugreports.qt.io/browse/QTBUG-53935

Regards, Oleg


2016-05-01 23:57 GMT+03:00 Oleg Evseev :

> Hi,
>
> Not going into details just the main point:
>
> In my scene I have huge ground plane and on top of it I draw car path.
> I break path mesh into peaces, create new entity with QGeometryRenderer,
> meshGeometry and so on in it and append it to my current parent Entity.
> When vertex array get filled, I create new one and so on.
> It works, but when car starts driving by round almost at the same loop
> place, all Entities of that loop suddenly disappear (at a moment when car
> trying to pass almost same way in fifth time) and no new Entities (even
> when car drives out from loop) are not shown anymore (despite they are
> added to scene).
>
> Here https://www.youtube.com/watch?v=InxhSB_YuhU I recorded video
> illustrated this problem.
> Windows 7 x64, Qt 5.6
>
> Maybe those problems related to OpenGl realization in Windows/video card
> drivers?
>
> Thank for help in advance.
>
> Regard, Oleg
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [Qt3D] Entities with PhongAlphaMaterial disappear when there are several of them

2016-07-08 Thread Oleg Evseev
Hi,

I have a problem with disappearing of PhongAlphaMaterial entities
https://bugreports.qt.io/browse/QTBUG-54515

It's critical issue for my project and I'd like to try to help fix it.
Maybe somebody can get me any advice where should I start looking in qt3d
src first?

[image: phongtest[1].gif - Latest 04/Jul/16 3:24 PM - Oleg]

Thank you in advance!

---
Regards, Oleg
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Split entities into groups and render them in custom order

2016-07-09 Thread Oleg Evseev
Hi,

I'm trying to understand how can I split entities into groups and render
them in custom order.

That is, for example, first render SkyBox - behind all entities, than a
Ground - plane mesh in front of SkyBox, but behind everything else. Then
render a group of many transparent entities in order of creation. After
that all other entities render "as usual" with ColorDepthBuffer.

For now I'm using one viewport and one camera.

Do I understand right, that I can do such rendering with help of set of
LayerFilters (like in example Deferred Renderer
http://doc.qt.io/qt-5/qt3drender-framegraph.html) with different parameters
of ClearBuffers?

So that framegraph tree is look something like this:

Viewport
RenderSurfaceSelector
LayerFilter1 LayerFilter2 LayerFilter3 ...
CameraSelector1 CameraSelector2 CameraSelector3 ... [1to1 with LayerFilters]
[one scene camera set to all cameraselectors]
ClearBuffers1 ClearBuffers2 ClearBuffers3 ... [1to1 with CameraSelector]

If I'm understand framegraph description
http://doc.qt.io/qt-5/qt3drender-framegraph.html correctly. I can set one
CameraSelector on top of viewport with same result, right?

Thank you for corrections in advance. Thank you!

---
Regards, Oleg
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Split entities into groups and render them in custom order

2016-07-10 Thread Oleg Evseev
2016-07-09 22:31 GMT+03:00 Sean Harmer :

> Hi,
>
> On 09/07/2016 14:27, Oleg Evseev wrote:
>
>> Hi,
>>
>> I'm trying to understand how can I split entities into groups and render
>> them in custom order.
>>
>> That is, for example, first render SkyBox - behind all entities, than a
>> Ground - plane mesh in front of SkyBox, but behind everything else. Then
>> render a group of many transparent entities in order of creation. After
>> that all other entities render "as usual" with ColorDepthBuffer.
>>
>
> Well, unless you're doing something very fancy, you would normally render
> the opaque objects first followed by the transparent objects in back to
> front order.
>

I see, but in my case those transparent entities - is the path behind
vehicle, so that it will always behind all "frontend" opaque entities
[image: Встроенное изображение 1]


>> For now I'm using one viewport and one camera.
>>
>> Do I understand right, that I can do such rendering with help of set of
>> LayerFilters (like in example Deferred Renderer
>> http://doc.qt.io/qt-5/qt3drender-framegraph.html) with different
>> parameters of ClearBuffers?
>>
>
> Using Layer components on your entities and LayerFilter nodes in the
> framegraph is indeed the way to go. You only need one ClearBuffers per
> render target node typically.
>
> Something schematically like this:
>
> * Viewport
> ** RenderSurfaceSelector
> *** CameraSelector
>  ClearBuffers
>  LayerFilter [layer = opaque]
>  LayerFIlter [layer = environment]
>  LayerFilter [layer = transparent]
> * SortPolicy [ front to back]
> ** RenderStateSet [ disable depth writes ]
>

This is the typo with SortPolicy, right? Should be "back to front" order as
you mention before?

I do not understand how to do RenderStateSet [ disable depth writes ] leaf

QRenderStateSet *renderStateSet = new QRenderStateSet();

QRenderState *renderState = new QRenderState();

renderState->???;

renderStateSet->addRenderState(renderState);


How to make "disable depth writes" renderState?

And another question: according to
http://doc.qt.io/qt-5/qt3drender-qrenderstateset.html#details :
> States set on a QRenderStateSet are set *globally*

If so, why RenderStateSet is inside last LayerFilter [layer = transparent]?

Much appreciated for help!

---
Regards, Oleg
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Split entities into groups and render them in custom order

2016-07-12 Thread Oleg Evseev
2016-07-10 19:09 GMT+03:00 Oleg Evseev :

> I tried to make following sequence in "enable-qml" manual test example by
> cleaning it (attached it):
>
> * Viewport
> ** RenderSurfaceSelector
> *** CameraSelector
>  ClearBuffers
>  LayerFilter [layer = sceneLayer]
>
> And it renders whole scene (sphere + floor), that is, ignores LayerFilter:
>

Experiment with different ordering, still can't understand how it works.
May it be a bug with LayerFilter? Should I file in JIRA?

---
Regards, Oleg
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Split entities into groups and render them in custom order

2016-07-12 Thread Oleg Evseev
Thank you, Sean and Harald.

I tried that order you suggested in "enable-qml" as I mentioned in the
previous letter (2016.07.10)

Only if I put ClearBuffers into LayerFilter:
> * Viewport
> ** RenderSurfaceSelector
> *** CameraSelector
>  LayerFilter [layer = sceneLayer]
> * ClearBuffers
> filtering got work
>

And this one is working too (thanks, do not about NoDraw class):

alternatively put a NoDraw as a child of CLearBuffers to prevent that
> branch from drawing anything.
>

But in my project with "opaque", "environment" and "transparent" layers
this order:

* Viewport
** RenderSurfaceSelector
*** CameraSelector
 LayerFilter [layer = opaque]
* ClearBuffers
 LayerFIlter [layer = environment]
 LayerFilter [layer = transparent]
* SortPolicy [ front to back]

didn't work in first - there was only environment entity. That's why I
wrote new letter.

After all, I have understood that it was my bad. The thing is that every
drawable entity should have layer component, that is, if only root entity
have layer component (as I did), it's children are filtered and not
rendered.

*Entity (layer= opaque)
**Entity child 1 (mesh,material, [not rendered if there is no layer])
**Entity child 2 (mesh,material, [not rendered if there is no layer])

I can add Layer to all "my" own entities, I am creating, but what should I
do with many entities within obj 3d model loaded with help of SceneLoader.
I need to loop through all entities and add corresponding layer to each? Or
may be there is another way to tell framegraph to render all entities that
are inside Entity with Layer component?


p.s. still have a question about how to do RenderStateSet [ disable depth
writes ] leaf, you wrote about

QRenderStateSet *renderStateSet = new QRenderStateSet();

QRenderState *renderState = new QRenderState();

renderState->???;

renderStateSet->addRenderState(renderState);


How to make "disable depth writes" renderState?

Thank you for help!

---
Regards, Oleg


2016-07-12 12:17 GMT+03:00 Sean Harmer :

> Hi,
>
> On 12/07/2016 09:18, Harald Vistnes wrote:
>
> Oleg,
>
> Did you try putting the ClearBuffers as a child of the first LayerFilter?
> Then the second LayerFilter can be a leaf node.
>
> * Viewport
> ** RenderSurfaceSelector
> *** CameraSelector
>  LayerFilter [layer = opaque]
> * ClearBuffers
>  LayerFilter [layer = transparent]
>
>
> That should work, or alternatively put a NoDraw as a child of CLearBuffers
> to prevent that branch from drawing anything.
>
> Cheers,
>
> Sean
>
> Harald
> On Jul 12, 2016 09:38, "Oleg Evseev" < 
> ev.m...@gmail.com> wrote:
>
>>
>> 2016-07-10 19:09 GMT+03:00 Oleg Evseev :
>>
>>> I tried to make following sequence in "enable-qml" manual test example
>>> by cleaning it (attached it):
>>>
>>> * Viewport
>>> ** RenderSurfaceSelector
>>> *** CameraSelector
>>>  ClearBuffers
>>>  LayerFilter [layer = sceneLayer]
>>>
>>> And it renders whole scene (sphere + floor), that is, ignores
>>> LayerFilter:
>>>
>>
>> Experiment with different ordering, still can't understand how it works.
>> May it be a bug with LayerFilter? Should I file in JIRA?
>>
>> ---
>> Regards, Oleg
>>
>>
>>
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>>
>>
>
> ___
> Interest mailing 
> listInterest@qt-project.orghttp://lists.qt-project.org/mailman/listinfo/interest
>
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Split entities into groups and render them in custom order

2016-07-12 Thread Oleg Evseev
Harald,

Got it, thank you.

2016-07-12 18:35 GMT+03:00 Harald Vistnes :

> Oleg,
>
> Add an instance of QNoDepthMask. It inherits QRenderState.
>
> Look in the qt3d/src/render/renderstates folder for all available
> renderstates. I don't think they are all documented yet.
>
> Harald
> Thank you, Sean and Harald.
>
> I tried that order you suggested in "enable-qml" as I mentioned in the
> previous letter (2016.07.10)
>
> Only if I put ClearBuffers into LayerFilter:
>> * Viewport
>> ** RenderSurfaceSelector
>> *** CameraSelector
>>  LayerFilter [layer = sceneLayer]
>> * ClearBuffers
>> filtering got work
>>
>
> And this one is working too (thanks, do not about NoDraw class):
>
> alternatively put a NoDraw as a child of CLearBuffers to prevent that
>> branch from drawing anything.
>>
>
> But in my project with "opaque", "environment" and "transparent" layers
> this order:
>
> * Viewport
> ** RenderSurfaceSelector
> *** CameraSelector
>  LayerFilter [layer = opaque]
> * ClearBuffers
>  LayerFIlter [layer = environment]
>  LayerFilter [layer = transparent]
> * SortPolicy [ front to back]
>
> didn't work in first - there was only environment entity. That's why I
> wrote new letter.
>
> After all, I have understood that it was my bad. The thing is that every
> drawable entity should have layer component, that is, if only root entity
> have layer component (as I did), it's children are filtered and not
> rendered.
>
> *Entity (layer= opaque)
> **Entity child 1 (mesh,material, [not rendered if there is no layer])
> **Entity child 2 (mesh,material, [not rendered if there is no layer])
>
> I can add Layer to all "my" own entities, I am creating, but what should I
> do with many entities within obj 3d model loaded with help of SceneLoader.
> I need to loop through all entities and add corresponding layer to each? Or
> may be there is another way to tell framegraph to render all entities that
> are inside Entity with Layer component?
>
>
> p.s. still have a question about how to do RenderStateSet [ disable depth
> writes ] leaf, you wrote about
>
> QRenderStateSet *renderStateSet = new QRenderStateSet();
>
> QRenderState *renderState = new QRenderState();
>
> renderState->???;
>
> renderStateSet->addRenderState(renderState);
>
>
> How to make "disable depth writes" renderState?
>
> Thank you for help!
>
> ---
> Regards, Oleg
>
>
> 2016-07-12 12:17 GMT+03:00 Sean Harmer :
>
>> Hi,
>>
>> On 12/07/2016 09:18, Harald Vistnes wrote:
>>
>> Oleg,
>>
>> Did you try putting the ClearBuffers as a child of the first LayerFilter?
>> Then the second LayerFilter can be a leaf node.
>>
>> * Viewport
>> ** RenderSurfaceSelector
>> *** CameraSelector
>>  LayerFilter [layer = opaque]
>> * ClearBuffers
>>  LayerFilter [layer = transparent]
>>
>>
>> That should work, or alternatively put a NoDraw as a child of
>> CLearBuffers to prevent that branch from drawing anything.
>>
>> Cheers,
>>
>> Sean
>>
>> Harald
>> On Jul 12, 2016 09:38, "Oleg Evseev" < 
>> ev.m...@gmail.com> wrote:
>>
>>>
>>> 2016-07-10 19:09 GMT+03:00 Oleg Evseev :
>>>
>>>> I tried to make following sequence in "enable-qml" manual test example
>>>> by cleaning it (attached it):
>>>>
>>>> * Viewport
>>>> ** RenderSurfaceSelector
>>>> *** CameraSelector
>>>>  ClearBuffers
>>>>  LayerFilter [layer = sceneLayer]
>>>>
>>>> And it renders whole scene (sphere + floor), that is, ignores
>>>> LayerFilter:
>>>>
>>>
>>> Experiment with different ordering, still can't understand how it works.
>>> May it be a bug with LayerFilter? Should I file in JIRA?
>>>
>>> ---
>>> Regards, Oleg
>>>
>>>
>>>
>>> ___
>>> Interest mailing list
>>> Interest@qt-project.org
>>> http://lists.qt-project.org/mailman/listinfo/interest
>>>
>>>
>>
>> ___
>> Interest mailing 
>> listInterest@qt-project.orghttp://lists.qt-project.org/mailman/listinfo/interest
>>
>>
>>
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>>
>>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>


-- 
С Уважением,
Евсеев Олег.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QMesh load obj

2016-07-12 Thread Oleg Evseev
Hi,

SceneLoader is what you are looking for.

Also take a look to "qgltf" example, and this link
http://blog.qt.io/blog/2016/01/08/qt3d-asset-conditioning/

---
Regards, Oleg

2016-07-05 11:15 GMT+03:00 北风刮到脸上 <1158292...@qq.com>:

> hello Sean Harmer:
> i am now using qt5.7 with qt3d module,now i want to load a obj mesh like
> this:
>
> Qt3DCore::QEntity *meshEntity = new Qt3DCore::QEntity(rootEntity);
> Qt3DRender::QMesh *mesh = new Qt3DRender::QMesh();
> mesh->setSource(QUrl::fromLocalFile(fileName));
>
> and new a QPhongAlphaMaterial than addComponent to meshEntity;
> i can see the obj mesh in the scene,but it is show as likely many vertex,i
> don't konw why.
> thank you.
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Building Qt/Android on Windows

2016-07-14 Thread Oleg Evseev
Hi,

Trying to build Qt/Android 5.7 on Windows 7 SP1 x64 using this instruction
https://wiki.qt.io/Building_qt-android_on_windows

Set environment variables:

set "ANDROID_API_VERSION=android-23"
set "ANDROID_SDK_ROOT="d:\Android\sdk""
set "ANDROID_TARGET_ARCH=armeabi-v7a"
set "ANDROID_BUILD_TOOLS_REVISION=23.0.3"
set "ANDROID_NDK_PATH="d:\Android\android-ndk-r10c""
set "ANDROID_NDK_ROOT="d:\Android\android-ndk-r10c""
set "ANDROID_TOOLCHAIN_VERSION=4.9"
set "ANDROID_NDK_HOST=windows"

Run configure as in the instruction.

When building got "Project ERROR: No suitable Android SDK platform found.
Minimum version is android-23."

in qtbase ... && mingw32-make -f Makefile.distributedjar

What am I missing?

Thank you for help!

---
Regards, Oleg
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Building Qt/Android on Windows

2016-07-15 Thread Oleg Evseev
After all I was able to build it.

I set environment variables through Advanced System Settings (instead of
command line) and add  to Path variable.


2016-07-14 15:35 GMT+03:00 Oleg Evseev :

> Hi,
>
> Trying to build Qt/Android 5.7 on Windows 7 SP1 x64 using this instruction
> https://wiki.qt.io/Building_qt-android_on_windows
>
> Set environment variables:
>
> set "ANDROID_API_VERSION=android-23"
> set "ANDROID_SDK_ROOT="d:\Android\sdk""
> set "ANDROID_TARGET_ARCH=armeabi-v7a"
> set "ANDROID_BUILD_TOOLS_REVISION=23.0.3"
> set "ANDROID_NDK_PATH="d:\Android\android-ndk-r10c""
> set "ANDROID_NDK_ROOT="d:\Android\android-ndk-r10c""
> set "ANDROID_TOOLCHAIN_VERSION=4.9"
> set "ANDROID_NDK_HOST=windows"
>
> Run configure as in the instruction.
>
> When building got "Project ERROR: No suitable Android SDK platform found.
> Minimum version is android-23."
>
> in qtbase ... && mingw32-make -f Makefile.distributedjar
>
> What am I missing?
>
> Thank you for help!
>
> ---
> Regards, Oleg
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [Qt3D] Splash screen while 3d scene is rendering

2016-07-18 Thread Oleg Evseev
Hi,

I want to do an splash screen while my 3d scene is loading.
Loader item get status Ready almost instantly (after all qml elements are
loaded), but before 3d scene objects are rendered - they are then shown one
by one (the process I want to hide from user view).

How could it be done? Thank in advance for help.

---
Regards, Oleg
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt 3D Issue on Android

2016-07-26 Thread Oleg Evseev
Hi, Navaneeth.

Qt 3D 5.5 commit was a pretty long time ago and it was positioned as
technical preview . Did you try last Qt 3d 5.7 (at least 5.7.0)?

---
Regards, Oleg

2016-07-26 13:46 GMT+03:00 Navaneeth K Ramakrishnan 
:

> Hi,
>
>
> I am getting an error, when running Qt 3d 2.0 app on android using Qt 5.5
>
>
> Scenario :
>
>
> When we move the application to the background.
>
> And stay in background for a while, and come back by selecting the
> application icon or from recent apps window.
>
> When application comes into foreground it crashes with the below error.
>
>
>
> 07-25 19:26:06.857 17339 17339 W libClimateHMI.so: (null):0 ((null)):
> Can't find surface 2
> 07-25 19:26:06.869   221   628 D AudioFlinger: mixer(0xab962fb0) throttle
> end: throttle time(3)
> 07-25 19:26:06.877 17339 17339 W libClimateHMI.so: (null):0 ((null)):
> Can't find surface 2
> 07-25 19:26:47.118   221   628 D audio_hw_primary: out_set_parameters:
> enter: usecase(0: playback) kvpairs: routing=2 out->devices(2) adev->mode(0)
> 07-25 19:26:47.169 17339 17434 E libEGL  : call to OpenGL ES API with no
> current context (logged once per thread)
> 07-25 19:26:47.248 17339 17339 I System.out: ClimateServiceIFClient :
> onPause
> 07-25 19:26:47.248 17339 17339 D libClimateHMI.so: (null):0 ((null)):
> ClimateHmiIF :  NotifyOnPause  ---  0xf7452b34
> 07-25 19:26:47.248 17339 17339 D libClimateHMI.so: (null):0 ((null)):
> UIClimateNotification :  NotifyOnPause  ---  0xf7452b34
> 07-25 19:26:47.290 17339 17405 W art : Native thread exiting without
> having called DetachCurrentThread (maybe it's going to use a
> pthread_key_create destructor?):
> Thread[10,tid=17405,Native,Thread*=0xab7c3548,peer=0x12d330a0,"QtThread"]
>
>
> Please guide me how to fix it or let me know any patch incase it is a
> known issue in Qt3d.
>
>
> --
> With Regards,
> Navaneeth KR
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt3D 5.7 Native Build on Raspbery Pi error when running examples

2016-07-27 Thread Oleg Evseev
Hi, Catalin

This problem was already filed to Jira:
https://bugreports.qt.io/browse/QTBUG-54229
and this is in fact a dublicate of this:

https://bugreports.qt.io/browse/QTBUG-54711

as you see there is commit that fix it. It's not yet merged into qt3d 5.7
code.qt.io.
You can cherry pick those commits in this order to the latest qt3d 5.7
commit c3fdb888fbd94de0f6b7b1a6859cba8132ecc93d:

1. https://codereview.qt-project.org/#/c/164993/2
2. https://codereview.qt-project.org/#/c/164994/2
3. https://codereview.qt-project.org/#/c/164995/2
4. https://codereview.qt-project.org/#/c/164996/

And if should fix this problem.
At least in my case for same problem on android
https://bugreports.qt.io/browse/QTBUG-54782 it helps.

---
Regards, Oleg

2016-07-27 19:37 GMT+03:00 Catalin Moldovan :

> Hi,
> I've managed to compile Qt 5.7 on rpi3. Most of the essentials packages
> with Qt3D as well (after removing assimp from qt3d/src/plugins/sceneparsers/
> sceneparsers.pro). I didn't managed to build with assimp support (tried
> the package from jessie and also built from source).
>
> My problem is that many examples (e.g. simple-qml) quit and hang my pi
> with : "QOpenGLShader::link: ERROR:CUSTOM-28 (vertex shader, line 1)
> Incorrect #version"
>
> Having a look at the source code and the shaders from extras it seems that
> qt3d is trying to use and compile the gl3 shaders instead of the gles2
> shaders. Any suggestions on how to fix this?
>
> This is the configure command I've used:
> ./configure -release -opengl es2 -tslib -force-pkg-config -opensource
> -confirm-license -make libs -device linux-rpi3-g++ -device-option
> CROSS_COMPILE=/usr/bin/ -optimized-qmake -reduce-exports
> -no-use-gold-linker -prefix /usr/local/qt5pi
>
> I've also tried for days to configure/build without faking cross compile
> with no luck
>
> Thanks,
> Catalin
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Does Scene3D freezes up, when change anchors on Linux?

2016-07-27 Thread Oleg Evseev
Hi all

I have a problem - Scene3D freezes up (stop render anything) when change
anchors on Windows 7 (anchors or orientation on Android 4.4)
https://bugreports.qt.io/browse/QTBUG-54900

Could someone can check if there is such problem on any Linux too (example
was attached to QTBUG-54900)?
Thank you in advance!

p.s. if your hardware is really powerful this may require to start some
other tasks to get CPU loaded to be able to reproduce the problem.

---
Regards, Oleg.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] RowLayout are overlapping

2016-08-04 Thread Oleg Evseev
Hi, Máximo

Put them (two RowLayout) into ColumnLayout

Regards, Oleg.

2016-08-04 10:28 GMT+03:00 Máximo Ramírez :

> Hello,
>
> I'm trying to do top navigation bar based on drawer and tabs,  but when I
> put two RowLayout instead of show one first and the second after the
> RowLayout are overlapping, like you  see in the following images
>
> [only one RowLayout](http://imgur.com/a/xDxTa)
>
> [two RowLayout overlapped](http://imgur.com/a/hrkKQ)
>
> This is my code
>
>
> import QtQuick 2.7
> import QtQuick.Controls 2.0
> import QtQuick.Layouts 1.0
>
> ..
>
> header: ToolBar {
>
> height: 90
>
> RowLayout {
> ToolButton {
> text: "Tool"
> }
> }
>
> RowLayout {
> TabBar {
> TabButton {
> text: "Tab"
> }
> TabButton {
> text: "Tab"
> }
> }
>
> }
> }
>
>
> Anyone can explain why is doing this, and how can I solved?
>
> Thanks!
>
> --
>
> Máximo Ramírez
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Second RowLayout not reconize width

2016-08-04 Thread Oleg Evseev
Hi, Máximo

Please carefully read documentation, there is all you need.


http://doc.qt.io/qt-5/qml-qtquick-layouts-columnlayout.html
http://doc.qt.io/qt-5/qml-qtquick-layouts-rowlayout.html
http://doc.qt.io/qt-5/qml-qtquick-layouts-layout.html

use Layout.fillWidth

> RowLayout {
>  width: headerColumn.width

Never do things like that. Your violate basic principles of layouts.

> *Note: *It is not recommended to have bindings to the x, y, width, or
height properties of items in a layout, since this would conflict with the
goals of Layout, and can also cause binding loops.


---
Regards, Oleg

2016-08-04 21:23 GMT+03:00 Máximo Ramírez :

> Hello,
>
> I'm trying to do a navigation header for my app. I have ColumnLayout and
> two RowLayout, but only the first RowLayout recognize width, the second
> not. I passed the width directly but still is not recognized.
>
>
> This is like is showed: http://imgur.com/a/bSr8H
>
>
> But I want that the two rows occupied the space available from the
> ColumnLayout.
>
>
> How can I apply the width for second RowLayout?
>
>
> Bellow my code
>
>
> width: 640
> height: 480
>
> ...
>
> header: ToolBar {
>
> ColumnLayout {
> id: headerColumn
>
> width: parent.width
>
> RowLayout {
> ToolButton {
>
> }
>
> Label {
>
> }
>
> ToolButton {
>
> }
> }
> }
>
> RowLayout {
>
> width: headerColumn.width
>
> Text {
> text: "h: " + headerColumn.width + "\np: " +
> parent.width
> }
> TabBar {
> id: tabBar
> //currentIndex: swipeView.currentIndex
>
>
> //  anchors.left: parent.left
> //anchors.right: parent.right
>
>
>
> currentIndex: 0
>
> TabButton {
> Image {
> source: "images/ic_directions_car_
> black_24dp.png"
> }
> Text {
> text: qsTr("Auto")
> }
> }
> TabButton {
> Image {
> source: "images/ic_directions_bus_
> black_24dp.png"
> }
> Text {
> text: qsTr("Bus")
> }
> }
> TabButton {
> Image {
> source: "images/ic_directions_subway_
> black_24dp.png"
> }
> Text {
> text: qsTr("Tren")
> }
> }
> TabButton {
> Image {
> source: "images/ic_flight_black_24dp.png"
> }
> Text {
> text: qsTr("Avión")
> }
> }
> TabButton {
> Image {
> source: "images/ic_directions_walk_
> black_24dp.png"
> }
> Text {
> text: qsTr("Caminando")
> }
> }
>
> }
>
> }
> }
> }
>
>
>
>
> --
>
> Máximo Ramírez
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] RowLayout are overlapping

2016-08-04 Thread Oleg Evseev
This things are in basic qtquick-layouts-example
http://doc.qt.io/qt-5/qtquick-layouts-example.html

In which part of documentation you think it should be else?


2016-08-04 19:11 GMT+03:00 Máximo Ramírez :

> Dear Oleg,
>
> Thanks work perfectly.
>
> This are the things that should be explicitly in the documentation.
>
> El 04/08/16 a las 04:20, Oleg Evseev escribió:
>
> Hi, Máximo
>
> Put them (two RowLayout) into ColumnLayout
>
> Regards, Oleg.
>
> 2016-08-04 10:28 GMT+03:00 Máximo Ramírez :
>
>> Hello,
>>
>> I'm trying to do top navigation bar based on drawer and tabs,  but when I
>> put two RowLayout instead of show one first and the second after the
>> RowLayout are overlapping, like you  see in the following images
>>
>> [only one RowLayout](http://imgur.com/a/xDxTa)
>>
>> [two RowLayout overlapped](http://imgur.com/a/hrkKQ)
>>
>> This is my code
>>
>>
>> import QtQuick 2.7
>> import QtQuick.Controls 2.0
>> import QtQuick.Layouts 1.0
>>
>> ..
>>
>> header: ToolBar {
>>
>> height: 90
>>
>> RowLayout {
>> ToolButton {
>> text: "Tool"
>> }
>> }
>>
>> RowLayout {
>> TabBar {
>> TabButton {
>> text: "Tab"
>> }
>> TabButton {
>> text: "Tab"
>> }
>> }
>>
>> }
>> }
>>
>>
>> Anyone can explain why is doing this, and how can I solved?
>>
>> Thanks!
>>
>> --
>>
>> Máximo Ramírez
>>
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>>
>
> --
>
> Máximo Ramírez
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt3d 5.7 embedded success anyone

2016-08-19 Thread Oleg Evseev
I have, and still do on Android. I follow last 5.7

2016-08-19 17:15 GMT+03:00 Pierre Chicoine :

> Has anyone been successful in getting Qt3d working on any embedded
> platform such as Android, Raspberry PI or Beaglebone?
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Something wrong with JIRA?

2016-09-07 Thread Oleg Evseev
Navigation through JIRA is slow and I can't create a new bug report

Error creating issue: Indexing completed with 1 errors

---
Regards, Oleg
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [Quick Controls 2] Best way to add binding arrow tip to Popup?

2016-10-06 Thread Oleg Evseev
Hi everyone,

I'm interesting how to add arrow tip to popup, that looks like this:



If I understand correctly, according to
http://doc.qt.io/qt-5/qtquick-scenegraph-customgeometry-example.html I have
an option to do custom shape qt quick item instead of simple rectangle with
help of QSGGeometry.

Is this a best way to do such things?

Thanks in advance for recommendations.

---
Regards, Oleg
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Quick Controls 2] Best way to add binding arrow tip to Popup?

2016-10-06 Thread Oleg Evseev
Thanks for suggestion, Jérôme.
I thought about such workaround, but for me it would be very nice to have
border of such popup.

2016-10-06 21:19 GMT+03:00 Jérôme Godbout :

> More a workaround then a real solution, but could work as long as the
> triangle is still sharp 90 angle.
>
> Item
> {
>   id: component
>   property real sizing: 10
>   property alias color: rect_.color
>   property alias border: rect_.border
>   width: sizing
>   height: sizing
>   clip: true
>
>   Rectangle
>   {
>  id: rect_
>  width: component.width
>  height: component.height
>  color: "gray"
>  // change the rotation values based on orientation here
>  transform: Rotation { origin.x: 0; origin.y: 0; angle: 90 }
>   }
> }
>
> On Thu, Oct 6, 2016 at 7:12 AM, Oleg Evseev  wrote:
>
>> Hi everyone,
>>
>> I'm interesting how to add arrow tip to popup, that looks like this:
>>
>>
>>
>> If I understand correctly, according to http://doc.qt.io/qt-5/qtquick-
>> scenegraph-customgeometry-example.html I have an option to do custom
>> shape qt quick item instead of simple rectangle with help of QSGGeometry.
>>
>> Is this a best way to do such things?
>>
>> Thanks in advance for recommendations.
>>
>> ---
>> Regards, Oleg
>>
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>>
>>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Quick Controls 2] Best way to add binding arrow tip to Popup?

2016-10-06 Thread Oleg Evseev
And yes I understand that this could be done with help of clipping rotated
rectangle by half and get it ahead of popup with border offset overlap.

But lack of this solution - you can not set the opacity of such constructed
popup :)

2016-10-06 22:11 GMT+03:00 Oleg Evseev :

> Thanks for suggestion, Jérôme.
> I thought about such workaround, but for me it would be very nice to have
> border of such popup.
>
> 2016-10-06 21:19 GMT+03:00 Jérôme Godbout :
>
>> More a workaround then a real solution, but could work as long as the
>> triangle is still sharp 90 angle.
>>
>> Item
>> {
>>   id: component
>>   property real sizing: 10
>>   property alias color: rect_.color
>>   property alias border: rect_.border
>>   width: sizing
>>   height: sizing
>>   clip: true
>>
>>   Rectangle
>>   {
>>  id: rect_
>>  width: component.width
>>  height: component.height
>>  color: "gray"
>>  // change the rotation values based on orientation here
>>  transform: Rotation { origin.x: 0; origin.y: 0; angle: 90 }
>>   }
>> }
>>
>> On Thu, Oct 6, 2016 at 7:12 AM, Oleg Evseev  wrote:
>>
>>> Hi everyone,
>>>
>>> I'm interesting how to add arrow tip to popup, that looks like this:
>>>
>>>
>>>
>>> If I understand correctly, according to http://doc.qt.io/qt-5/qtquick-
>>> scenegraph-customgeometry-example.html I have an option to do custom
>>> shape qt quick item instead of simple rectangle with help of QSGGeometry.
>>>
>>> Is this a best way to do such things?
>>>
>>> Thanks in advance for recommendations.
>>>
>>> ---
>>> Regards, Oleg
>>>
>>> ___
>>> Interest mailing list
>>> Interest@qt-project.org
>>> http://lists.qt-project.org/mailman/listinfo/interest
>>>
>>>
>>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Quick Controls 2] Best way to add binding arrow tip to Popup?

2016-10-06 Thread Oleg Evseev
>
> But lack of this solution - you can not set the opacity of such
> constructed popup :)


Plus, I think, set elevation to get shade of popup without doing it for
arrow tip will not have a good look.

2016-10-06 22:16 GMT+03:00 Oleg Evseev :

> And yes I understand that this could be done with help of clipping rotated
> rectangle by half and get it ahead of popup with border offset overlap.
>
> But lack of this solution - you can not set the opacity of such
> constructed popup :)
>
>
> 2016-10-06 22:11 GMT+03:00 Oleg Evseev :
>
>> Thanks for suggestion, Jérôme.
>> I thought about such workaround, but for me it would be very nice to have
>> border of such popup.
>>
>> 2016-10-06 21:19 GMT+03:00 Jérôme Godbout :
>>
>>> More a workaround then a real solution, but could work as long as the
>>> triangle is still sharp 90 angle.
>>>
>>> Item
>>> {
>>>   id: component
>>>   property real sizing: 10
>>>   property alias color: rect_.color
>>>   property alias border: rect_.border
>>>   width: sizing
>>>   height: sizing
>>>   clip: true
>>>
>>>   Rectangle
>>>   {
>>>  id: rect_
>>>  width: component.width
>>>  height: component.height
>>>  color: "gray"
>>>  // change the rotation values based on orientation here
>>>  transform: Rotation { origin.x: 0; origin.y: 0; angle: 90 }
>>>   }
>>> }
>>>
>>> On Thu, Oct 6, 2016 at 7:12 AM, Oleg Evseev  wrote:
>>>
>>>> Hi everyone,
>>>>
>>>> I'm interesting how to add arrow tip to popup, that looks like this:
>>>>
>>>>
>>>>
>>>> If I understand correctly, according to http://doc.qt.io/qt-5/qtquick-
>>>> scenegraph-customgeometry-example.html I have an option to do custom
>>>> shape qt quick item instead of simple rectangle with help of QSGGeometry.
>>>>
>>>> Is this a best way to do such things?
>>>>
>>>> Thanks in advance for recommendations.
>>>>
>>>> ---
>>>> Regards, Oleg
>>>>
>>>> ___
>>>> Interest mailing list
>>>> Interest@qt-project.org
>>>> http://lists.qt-project.org/mailman/listinfo/interest
>>>>
>>>>
>>>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Quick Controls 2] Best way to add binding arrow tip to Popup?

2016-10-06 Thread Oleg Evseev
> using an Image is a very simple solution

Thanks for suggestion!

2016-10-07 8:27 GMT+03:00 Gunnar Sletta :

> Although you can do a custom shape like this using QSGGeometryNode, using
> an Image is a very simple solution which also gives you complete control
> over the look and how it integrates with the rest of the popup. And all
> from QML..
>
> cheers,
> Gunnar
>
> > On 06 Oct 2016, at 21:22, Oleg Evseev  wrote:
> >
> > But lack of this solution - you can not set the opacity of such
> constructed popup :)
> >
> > Plus, I think, set elevation to get shade of popup without doing it for
> arrow tip will not have a good look.
> >
> > 2016-10-06 22:16 GMT+03:00 Oleg Evseev :
> > And yes I understand that this could be done with help of clipping
> rotated rectangle by half and get it ahead of popup with border offset
> overlap.
> >
> > But lack of this solution - you can not set the opacity of such
> constructed popup :)
> >
> >
> > 2016-10-06 22:11 GMT+03:00 Oleg Evseev :
> > Thanks for suggestion, Jérôme.
> > I thought about such workaround, but for me it would be very nice to
> have border of such popup.
> >
> > 2016-10-06 21:19 GMT+03:00 Jérôme Godbout :
> > More a workaround then a real solution, but could work as long as the
> triangle is still sharp 90 angle.
> >
> > Item
> > {
> >   id: component
> >   property real sizing: 10
> >   property alias color: rect_.color
> >   property alias border: rect_.border
> >   width: sizing
> >   height: sizing
> >   clip: true
> >
> >   Rectangle
> >   {
> >  id: rect_
> >  width: component.width
> >  height: component.height
> >  color: "gray"
> >  // change the rotation values based on orientation here
> >  transform: Rotation { origin.x: 0; origin.y: 0; angle: 90 }
> >   }
> > }
> >
> > On Thu, Oct 6, 2016 at 7:12 AM, Oleg Evseev  wrote:
> > Hi everyone,
> >
> > I'm interesting how to add arrow tip to popup, that looks like this:
> >
> >
> >
> > If I understand correctly, according to http://doc.qt.io/qt-5/qtquick-
> scenegraph-customgeometry-example.html I have an option to do custom
> shape qt quick item instead of simple rectangle with help of QSGGeometry.
> >
> > Is this a best way to do such things?
> >
> > Thanks in advance for recommendations.
> >
> > ---
> > Regards, Oleg
> >
> > ___
> > Interest mailing list
> > Interest@qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/interest
> >
> >
> >
> >
> >
> > ___
> > Interest mailing list
> > Interest@qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/interest
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Quick Controls 2] Best way to add binding arrow tip to Popup?

2016-10-09 Thread Oleg Evseev
After looking on QSGDefaultRectangleNode::updateGeometry() where geometry
of standard rectangle with rounded corners is build, I decided to use
workaround with rotated qml rectangle.

As I mentioned before lack of this workaround: it is not appropriate
decision to set border and opacity simultaneously.
After all in other cases it looks pretty well.

But I found that using such tipped rectangle with border for *Popup *background
is not a good idea - changing width of application (and that is Popup)
quite often show 1px dark segment of border between tip and main rectangle
(see the pic):

[image: Встроенное изображение 1]
​
To manage border case I use anchors.leftMargin: -border.width of background
main rectangle so that tip triangle overlaps it and hide border segment.

But I found that even without border there is such dark 1px in Popup. Even
increasing x shift is not helping!
On this pic tip is the same size as previously but x offset is increased
for additional 10px.

[image: Встроенное изображение 3]

p.s. This appears not for all width of app/Popup.

p.p.s. Jérôme, in your code there is a mistake with shift. x at least
should be as long as half of diagonal of component.

I think even better would be as I did:

Item{
id: tip
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
width: tipsize
height: tipsize
clip: true

Rectangle{
id: rect_
width: tipsize/Math.SQRT2
height: tipsize/Math.SQRT2
transformOrigin: Item.TopLeft
rotation: -45
x: tipsize*0.5
y: tipsize*0.5
}
}

2016-10-06 21:30 GMT+03:00 Jérôme Godbout :

> My bad, oups 90 deg and bad rotation center...
>
> Item
>
> {
>
> id: component
>
> property real sizing: 100
>
> property alias color: rect_.color
>
> property alias border: rect_.border
>
> width: sizing
>
> height: sizing
>
> clip: true
>
>
> Rectangle
>
> {
>
> id: rect_
>
> width: component.width
>
> height: component.height
>
> color: "gray"
>
> transform: Rotation { angle: 45 }
>
> // change the translation values based on orientation here
>
> x: component.width * -0.5
>
> y: 0
>
> }
>
> }
>
> On Thu, Oct 6, 2016 at 2:19 PM, Jérôme Godbout  wrote:
>
>> More a workaround then a real solution, but could work as long as the
>> triangle is still sharp 90 angle.
>>
>> Item
>> {
>>   id: component
>>   property real sizing: 10
>>   property alias color: rect_.color
>>   property alias border: rect_.border
>>   width: sizing
>>   height: sizing
>>   clip: true
>>
>>   Rectangle
>>   {
>>  id: rect_
>>  width: component.width
>>  height: component.height
>>  color: "gray"
>>  // change the rotation values based on orientation here
>>  transform: Rotation { origin.x: 0; origin.y: 0; angle: 90 }
>>   }
>> }
>>
>> On Thu, Oct 6, 2016 at 7:12 AM, Oleg Evseev  wrote:
>>
>>> Hi everyone,
>>>
>>> I'm interesting how to add arrow tip to popup, that looks like this:
>>>
>>>
>>>
>>> If I understand correctly, according to http://doc.qt.io/qt-5/qtquick-
>>> scenegraph-customgeometry-example.html I have an option to do custom
>>> shape qt quick item instead of simple rectangle with help of QSGGeometry.
>>>
>>> Is this a best way to do such things?
>>>
>>> Thanks in advance for recommendations.
>>>
>>> ---
>>> Regards, Oleg
>>>
>>> ___
>>> Interest mailing list
>>> Interest@qt-project.org
>>> http://lists.qt-project.org/mailman/listinfo/interest
>>>
>>>
>>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Quick Controls 2] Best way to add binding arrow tip to Popup?

2016-10-12 Thread Oleg Evseev
Great thanks, Shawn.

Canvas is what I searching for!

Even in canvas example there is a Talk bubble example that is look similar
to tipped Popup!
[image: Встроенное изображение 1]

Canvas is Qt Quick Item, so it is quite easy to add it on the scene and add
a shadows (or other effects) to it
[image: Встроенное изображение 2]
and use it as background for Qt Quick Controls.

Only thing that I miss is the inner border in Canvas (to be identical to
Rectangle drawing principle). But for simple tipped popup (rectangle with
rounded corners and tip) it was quite easy to recalculate coordinates
points.
Plus, apparently there is the other solution with globalCompositeOperation
http://stackoverflow.com/a/34234589/5765076 for complex shapes (didn't test
it).

I made tipped rectangle with Canvas and it looks great!

*I really surprised, why using Canvas item was not suggested in first
place?!*

And you, Shawn, write this:

... we've always needed support for arbitrary shapes in QtQuick.  We’ll
> have them eventually…


like Canvas is *not *the really good solution - just a workaround. That is,
it not claims to be "support for arbitrary shapes in QtQuick".

Why? How your ideal support for arbitrary shapes in QtQuick will look like
in general words, then?

What about Canvas vs QSGGeometry Node approach? Only performance aspects?

--
Regards, Oleg.

2016-10-10 10:41 GMT+03:00 Shawn Rutledge :

> You can add two rotated rectangles, one underneath for the border, and one
> (on top) for the fill, to cover up the edge of the main rectangle.  Next
> you will want a drop shadow, then you need a couple more Rectangles (or
> something from GraphicalEffects) underneath.
>
> This is a good illustration of why we've always needed support for
> arbitrary shapes in QtQuick.  We’ll have them eventually…
>
> Meanwhile you can use Canvas (draw the shape) or BorderImage (pull edge,
> corner and center pieces from an image and assemble them into a resizable
> balloon).
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Quick Controls 2] Best way to add binding arrow tip to Popup?

2016-10-12 Thread Oleg Evseev
Jérôme, I didn't understand what your suggestion for?

One can easy draw round cornered rectangle with Canvas (see roundedrect.qml
in canvas example)
[image: Встроенное изображение 1]

Based on that example I did my rectangle (with *all *rounded corners) with
tip in one draw path and solved my problem.

2016-10-12 16:32 GMT+03:00 Jérôme Godbout :

> For the round corner with rectangle:
>
> Rectangle
> {
>   border.width: 2
>   border.color: "black"
>   color: Qt.rgba(0,0,0,0)
>   clip: true
>   width: canvas_.width
>   height: canvas_.height
>   Canvas
>   {
> ...
>   }
> }
>
> Using the clip and the round corner should work.
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Quick Controls 2] Best way to add binding arrow tip to Popup?

2016-10-12 Thread Oleg Evseev
> It probably wasn't mentioned because it's got a bad reputation as being
> slow. It's easy to abuse it and end up with crappy performance. As long as
> you limit the amount of painting you do and how often you do it, I don't
> think using it is really an issue in practice.


I see, thanks for help!
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Qt3D] Crash when changing an entity's parent many times

2016-10-26 Thread Oleg Evseev
Hi,

I had problems similar to what you describe
https://bugreports.qt.io/browse/QTBUG-55093 in qt 5.7. I haven't check it
on 5.8.

2016-10-26 16:37 GMT+03:00 Xavier Bigand :

> Hi,
>
> I have to change to parent to nullptr to make some entities invisible, but
> when I put them visible back I get a crash.
>
> The crash is a segfault in the method void 
> Entity::setNodeManagers(NodeManagers
> *manager) because the this pointer is null.
>
> Here is the callstack :
>   Qt53DRenderd.dll!Qt3DRender::Render::Entity::
> setNodeManagers(Qt3DRender::Render::NodeManagers * manager) Line 140 C++
>   Qt53DRenderd.dll!Qt3DRender::Render::RenderEntityFunctor::create(const
> QSharedPointer & change) Line 562 C++
>   Qt53DCored.dll!Qt3DCore::QAbstractAspectPrivate::createBackendNode(const
> QSharedPointer & change) Line 198 C++
>   Qt53DCored.dll!Qt3DCore::QAbstractAspectPrivate::
> sceneNodeAdded(QSharedPointer & change) Line 163
> C++
> Qt53DCored.dll!Qt3DCore::QChangeArbiter::distributeQueueChanges(std::
> vector,std::
> allocator > > * changeQueue) Line
> 120 C++
>   Qt53DCored.dll!Qt3DCore::QChangeArbiter::syncChanges() Line 180 C++
>   Qt53DCored.dll!Qt3DCore::QAspectManager::exec() Line 282 C++
>   Qt53DCored.dll!Qt3DCore::QAspectThread::run() Line 88 C++
>   Qt5Cored.dll!QThreadPrivate::start(void * arg) Line 380 C++
>   [External Code]
>   [Frames below may be incorrect and/or missing, no symbols loaded for
> kernel32.dll]
>
>
>
> I am also curious to know what does the enable flag on QEntity, it seems
> easier to use it to control the visibility of object and maybe faster.
>
>
> PS: I am using the git branch 5.8
>
>
> --
> Xavier
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt3D ObjectPicker return wrong worldIntersection coords

2016-11-06 Thread Oleg Evseev
Hi, I think first thing you should do - create a new bug report
https://bugreports.qt.io/ and attache example that reproduce the problem.

--
With regards, Oleg

2016-11-06 22:27 GMT+03:00 MASTER OF ORION :

> Hi, i use Qt3D 2.0 (from Qt 5.8 beta)
> Inside onPressed, when i get PickEvent, worldIntersection and 
> localIntersection
> is incorrect!
> I press my mouse and get one coords, but if i will turn my camera around
> orbit and will press to same 3D point at object, i will get other worlds
> coords...
> How to solve this trouble ?
> Thank you.
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QT3D. Sorting Transparencies in C++

2016-11-08 Thread Oleg Evseev
Hi, Pierre

I think this thread would be interesting for you (question and answers)
http://lists.qt-project.org/pipermail/interest/2016-July/023455.html

---
Regards, Oleg

2016-11-08 16:14 GMT+03:00 Pierre Chicoine :

> Has anyone come up with a way of sorting transparencies using C++ yet? In
> OpenGL I could sort my object array paint sequence with front
> transparencies last when mouse click was released. In Qt3d all objects have
> to be recreated using that order on mouse release. That's difficult to do.
> Too many problems to use it yet?
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [Qt3D] QTransform is not shareable

2017-01-07 Thread Oleg Evseev
Hi,

I wonder why the QTransform component is not shareable between multiple
QEntity's

Regards, Oleg.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [Qt3D] Diffusemap alpha

2017-01-09 Thread Oleg Evseev
Hi,

I was wondered why Qt3D diffusemap material doesn't implement texture alpha
for fragColor or why there no diffuseMapAlpha material at least.

I tried to modify diffusemap.frag by analogy with
normaldiffusemapalpha.frag

set diffuseTextureColor as vec4 and make
fragColor = vec4( diffuseTextureColor.rgb * ( ka + diffuseColor ) + ks *
specularColor, diffuseTextureColor.a );

Alpha works, but there is ambient color that mess the transparency effect I
want.

I tried without ka component but got transparent black color.
But at least in this case zero texture alpha make fully transparent.

Then I encountered on unlittexture.frag and TextureMaterial.qml that use it
(by the way why there is no corresponding QTextureMaterial?) that just set
diffuseTextureColor to fragColor:

fragColor = texture( diffuseTexture, texCoord );

But I got effect like there is white ambient summed with transparent
texture color.
With zero texture alpha I've got white non transparent object.

I'm new in shaders, I'm confused with such behavior.

Thanks in advance for any explanations!

---

Regards, Oleg.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt3D

2017-02-09 Thread Oleg Evseev
Hi,

for example here:
qt3d\tests\manual\custom-mesh-cpp\
qt3d\tests\manual\custom-mesh-qml\

With regards, Oleg
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [NFC] RFID tag reading

2017-03-13 Thread Oleg Evseev
Hi,

I'm trying to run ndefeditor example on one android tablet (with android
4.4.4), app prints QtNfc getStartIntent to console, but
targetDetected/targetLost signals aren't fired, until I add






to AndroidManifest (as suggested here with same issues
http://stackoverflow.com/questions/33346378/how-to-get-nfc-working-on-android-using-qt-5-6
)

But when I do that Android trying to launch app every time I put down rfid
to nfc reader (and app crash), even if it's already launched. The only way
when it tag can be read in this situation is the first time app launch
after click retrieve button (tag is already detached from sensor).

On another tablet with 4.4.2, signals are fired correctly even if app is
not default rfid tag reader.

Tag is NXP MIFARE Classic 1k

I'm pretty sure that it's a hardware aspect issues, but maybe somebody from
Qt community had encountered such things and has alternative solutions.

With best regards, Oleg
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [NFC] RFID tag reading

2017-03-13 Thread Oleg Evseev
> I'm pretty sure that it's a hardware aspect issues, but maybe somebody
from Qt community had encountered such things and has alternative solutions.

I hurried with that. I wonder why then nfc app from google play (for
example NFC Tools) is working properly on first tablet (4.4.4 android) even
if it is not default app tag reader.
So maybe the reason of issues may be with QtNfc.java intent?
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [NFC] RFID tag reading

2017-03-13 Thread Oleg Evseev
Finally solved this one http://stackoverflow.com/a/42771453/5765076 (at
least for my tablet).
Add suggestion to Jira https://bugreports.qt.io/browse/QTBUG-59455
Hopes it will helps someone.

With best regards, Oleg
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [NFC] RFID tag reading

2017-03-14 Thread Oleg Evseev
Hi Alex,

I did https://codereview.qt-project.org/#/c/188351/. You can change
description as you wish.
Thanks for your work!

2017-03-14 12:00 GMT+03:00 Alex Blasche :

> Hi Oleg,
>
> thank you for figuring this out. Would you be willing to submit a patch to
> Qt (codereview.qt-project.org) for this problem (target branch 5.9)? If
> you put me on review I am happy to accept it.
>
> --
> Alex
> 
> From: Interest 
> on behalf of Oleg Evseev 
> Sent: Monday, 13 March 2017 8:03:43 PM
> To: Qt Project
> Subject: Re: [Interest] [NFC] RFID tag reading
>
> Finally solved this one http://stackoverflow.com/a/42771453/5765076 (at
> least for my tablet).
> Add suggestion to Jira https://bugreports.qt.io/browse/QTBUG-59455
> Hopes it will helps someone.
>
> With best regards, Oleg
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] ApplicationWindow overlay item opacity aspects

2017-03-14 Thread Oleg Evseev
Hi,

Trying to change modal popups dim color using overlay property of
ApplicationWindow, I wonder why opacity with this one not works (dim
background is solid black):

overlay.modal: Rectangle {
color: "black"
opacity: 0.2
}

Only this one works:

overlay.modal: Rectangle {
color: "#3300" //opacitiy 0.2
}

Is it a bug or a feature of overlay z-position?
Thanks in advance for explanations.

---
With regards, Oleg
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [NFC] RFID tag reading

2017-03-15 Thread Oleg Evseev
But I still didn't understand how those different filtering in setContext()
and in start() work? Why they are different, where m_filters is used?

2017-03-14 12:43 GMT+03:00 Oleg Evseev :

> Hi Alex,
>
> I did https://codereview.qt-project.org/#/c/188351/. You can change
> description as you wish.
> Thanks for your work!
>
>
> 2017-03-14 12:00 GMT+03:00 Alex Blasche :
>
>> Hi Oleg,
>>
>> thank you for figuring this out. Would you be willing to submit a patch
>> to Qt (codereview.qt-project.org) for this problem (target branch 5.9)?
>> If you put me on review I am happy to accept it.
>>
>> --
>> Alex
>> ____
>> From: Interest 
>> on behalf of Oleg Evseev 
>> Sent: Monday, 13 March 2017 8:03:43 PM
>> To: Qt Project
>> Subject: Re: [Interest] [NFC] RFID tag reading
>>
>> Finally solved this one http://stackoverflow.com/a/42771453/5765076 (at
>> least for my tablet).
>> Add suggestion to Jira https://bugreports.qt.io/browse/QTBUG-59455
>> Hopes it will helps someone.
>>
>> With best regards, Oleg
>>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt3D filtering for different renderviews

2017-03-30 Thread Oleg Evseev
Hi Juan,

> How can I make the second renderview to skip the background entity?

With help of LayerFilter.

> I have tried to add a LayerFilter for it, but that way I have to add a
Layer component to each object in my scene, which is not practical.

Totally agree. It would be nice if you add suggestion to add exclude option
into LayerFilter (for example).
By the way I posted related suggestion for SceneLoader
https://bugreports.qt.io/browse/QTBUG-54744

> Any idea?

Did you try Scene 3D Item with single renderview and transparent background
+ Quick Rectangle with gradient behind it?
(I hadn't done such things, just a suggestion)

---
With regards, Oleg
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [Qt3D]

2017-04-03 Thread Oleg Evseev
Hi,

Almost a year ago I wrote a bug about Scene3D freezing when its anchor is
changed (https://bugreports.qt.io/browse/QTBUG-54900).

Due to this on android Scene3D freeze up on changing orientation of app
(autorotate), especially on the non toppest smartphones/pads.

All this time the only workaround for this for our application was locking
screenOrientation in landscape mode we need. But on many smartphones
minimizing/maximizing (and unblocking on some pads) always go through
portrait orientation to its fixed orientation (landscape) and Scene3D
freezes with high probability.

I really wonder have anyone ever faced with this problem? Maybe there are
alternative workarounds?

Sorry for molestation with this, but unfortunately this bug does not allow
to make a wide release of our application :(

---
With best regards, Oleg
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Qt3D]

2017-04-03 Thread Oleg Evseev
Sorry for missed letter theme

2017-04-03 12:32 GMT+03:00 Oleg Evseev :

> Hi,
>
> Almost a year ago I wrote a bug about Scene3D freezing when its anchor is
> changed (https://bugreports.qt.io/browse/QTBUG-54900).
>
> Due to this on android Scene3D freeze up on changing orientation of app
> (autorotate), especially on the non toppest smartphones/pads.
>
> All this time the only workaround for this for our application was locking
> screenOrientation in landscape mode we need. But on many smartphones
> minimizing/maximizing (and unblocking on some pads) always go through
> portrait orientation to its fixed orientation (landscape) and Scene3D
> freezes with high probability.
>
> I really wonder have anyone ever faced with this problem? Maybe there are
> alternative workarounds?
>
> Sorry for molestation with this, but unfortunately this bug does not allow
> to make a wide release of our application :(
>
> ---
> With best regards, Oleg
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt3D simple geometry example

2017-04-04 Thread Oleg Evseev
Hi, Igor

Take a look on this examples in qt3d/tests/manual folder:

custom-mesh-cpp
custom-mesh-qml
custom-mesh-update-data-cpp
custom-mesh-update-data-qml

I think they are exactly what you need.

With regards, Oleg.

2017-04-04 11:01 GMT+03:00 Igor Mironchik :

> Hello,
>
> Did anybody see any very simple example of Qt3D geometry creation. Let it
> be a simple plain ellipse. Can anybody explain in a few words what should
> be done to generate such geometry in 3D.
>
> Thank you.
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [Qt Connectivity] Bluetooth state is not a HostPoweredOff on Android when turning it off

2017-04-04 Thread Oleg Evseev
Hi,

I'm working with bluetooth on android. Handling bluetoothLocalDevice
hostModeStateChanged signal I get HostConnectable on one tablet (Android
5.1) and HostDiscoverable on another phone (Android 4.4.4) when I *turn off*
(!) bluetooth in system.
And no signals when I turn bluetooth on in system (and sometimes for
turning on too).

As I see in qt connectivity source code this status is based on android
scan mode and constants are correct:

switch (scanMode) {
case 20: // BluetoothAdapter.SCAN_MODE_NONE
return HostPoweredOff;
case 21: // BluetoothAdapter.SCAN_MODE_CONNECTABLE
return HostConnectable;
case 23: // BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE
return HostDiscoverable;

So it seems to be an android bug, but I haven't found any relevant problems
with android, so I wonder may this be an qt bug?

Thanks in advance for help.

---
With regards, Oleg
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Applying transformation

2017-04-05 Thread Oleg Evseev
Hi, Igor.

With all due respect, looking on your questions, it seems that you have
huge knowledge gap in linear algebra.

It would be wise to firstly read how transformations can be represented by
matrices:

https://en.wikipedia.org/wiki/Transformation_matrix
https://en.wikipedia.org/wiki/Rotation_matrix

On Russian you can start for example with https://habrahabr.ru/post/131931/
- it's about basic things.

And so on, there are dozens articles about transformations and matrices,
just google it.
Good luck!

---
With regards, Oleg
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [Qt3D] SkyboxEntity textures are not rendered on Windows 7 (just black)

2017-04-14 Thread Oleg Evseev
Hi,

Cause Sean is now get busy with SkyboxEntity, I take this opportunity to
ask what could be wrong:

Related to qt3d I have Qml with loader that loads qml with Scene3D. World3D
- root entity is written in C++ and shared with qml with help of
qmlRegisterType.

hierarchy is this:
World3D
-- renderSettings (as component)
 viewort (as activeFrameGraph)
-- renderSurfaceSelector
  cameraSelector
-- clearBuffers (light blue)
 QNoDraw
-- layerFilter
 layerBackground (added layer)
-- QSkyboxEntity (as a child)
 layerBackground (as component)
-- other objects

(do not pay attention that there is no frustum culling disabling, it's not
relevant now)

It works with qt 5.8 (on Windows 7 and Android), but when I moved to qt 5.9
SkyboxEntity textures stop being rendered (they are just black) on Windows
(but they are render on Android).
I clean everything unrelated (other objects) to make simple example to post
the bug, but it  works! Skybox entity reneders fine.

Even if I'm not setting parent for other objects in my application (that is
there is only skyboxentity in 3d scene) I can't do the same - skybox is
full black (it's not the clear buffer color by the way).

I'm really confused what can be a problem?
Qml buttons on top of the Scene3D? - No, I check it, simple example still
works with them.

Thanks in advance for help.

---
With regards, Oleg
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Qt3D] SkyboxEntity textures are not rendered on Windows 7 (just black)

2017-04-14 Thread Oleg Evseev
Hi Sean,

As I wrote, I try to prepare test case example with same "basis" of 3d as
in my application, but it suddenly turned out to be valid.
Unfortunately I can't provide my entire application.

> Not sure what could be wrong off hand.

Ok, never mind then. It's not so important. I'll try to do test case latter
when got time for this.

Just had a little hope that you'll easy solve this, something like "Yes, in
commit #... we've changed ... so you need to ..." :)
Sorry for bothering.


2017-04-14 20:22 GMT+03:00 Sean Harmer :

> Hi,
>
> could you provide a test case for this please? Not sure what could be
> wrong off hand.
>
> Cheers,
>
> Sean
>
>
> On 14/04/2017 17:51, Oleg Evseev wrote:
>
>> Hi,
>>
>> Cause Sean is now get busy with SkyboxEntity, I take this opportunity to
>> ask what could be wrong:
>>
>> Related to qt3d I have Qml with loader that loads qml with Scene3D.
>> World3D - root entity is written in C++ and shared with qml with help of
>> qmlRegisterType.
>>
>> hierarchy is this:
>> World3D
>> -- renderSettings (as component)
>>  viewort (as activeFrameGraph)
>> -- renderSurfaceSelector
>>   cameraSelector
>> -- clearBuffers (light blue)
>>  QNoDraw
>> -- layerFilter
>>  layerBackground (added layer)
>> -- QSkyboxEntity (as a child)
>>  layerBackground (as component)
>> -- other objects
>>
>> (do not pay attention that there is no frustum culling disabling, it's
>> not relevant now)
>>
>> It works with qt 5.8 (on Windows 7 and Android), but when I moved to qt
>> 5.9 SkyboxEntity textures stop being rendered (they are just black) on
>> Windows (but they are render on Android).
>> I clean everything unrelated (other objects) to make simple example to
>> post the bug, but it  works! Skybox entity reneders fine.
>>
>> Even if I'm not setting parent for other objects in my application (that
>> is there is only skyboxentity in 3d scene) I can't do the same - skybox
>> is full black (it's not the clear buffer color by the way).
>>
>> I'm really confused what can be a problem?
>> Qml buttons on top of the Scene3D? - No, I check it, simple example
>> still works with them.
>>
>> Thanks in advance for help.
>>
>> ---
>> With regards, Oleg
>>
>>
>>
>>
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>>
>> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [Qt3D][Threads] A right way to do calculations for qt 3d entities in separate thread

2017-04-15 Thread Oleg Evseev
Hi,

I have a Scene3D with different QEntities.

One of the entity have a slot with calculations which involves updating
QGeometry of one of its child (QEntity) and sometimes creating new child
entity.
I'm looking for a way to move those calculations into separate thread.

But according to http://doc.qt.io/qt-5/threads-qobject.html the first
constraint to be aware of is "The child of a QObject must always be created
in the thread where the parent was created".

So the only thing that comes to mind is to use signals from separate thread
to main one where is parent entity as the request to create new child
entity and another signal from main thread to separate with pointer of new
created child.
Is this a right way to do it?

Thanks in advance for help.

---
With regards, Oleg
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Tired of QML

2017-04-15 Thread Oleg Evseev
Hi Alexander,

First thing you need to understand that the apparent "order" like this

Item {}
Item {}

or that

Item {
Item {}
}

doesn't mean that items will be arrange as column (or maybe row).
This order is relevant only to Z coordinate, that means what item will be
on top of the other.

Please be patience to learn qml documentation about items positioning
methods:
http://doc.qt.io/qt-5/qtquick-positioning-anchors.html
http://doc.qt.io/qt-5/qtquick-positioning-layouts.html
http://doc.qt.io/qt-5/qtquicklayouts-index.html
and cross links inside them

About your cases:

#1 - header property of ListView automatically position header for you,
it's ok

#2, #3 it will not work, only separate DownloadListHeader is shown.

http://doc.qt.io/qt-5/qml-qtquick-listview.html#header-prop
header: Component
This property holds the component to use as the header.
An instance of the header component is created for each view. The header is
positioned at the beginning of the view, before any items.

and as I mention this
Item {}
Item {}
does not mean column layout, so each of your item positioning by default -
in left top corner of parent so they overlaps

#4 works, cause header is component DownloadListHeader {} that will be
created and automatically positioned.
*But! *In fact there are two labels "Column #1" in same place in your
example! You even can also see this - text is little bold.

just delete downloadsViewHeader item, and you will get #1 case.

Alternative for using header property in your case will be using anchors:

DownloadListHeader {
id: downloadsViewHeader
}

ListView {
   anchors.top: downloadsViewHeader.bottom
   delegate: {...}
}

or alternatively using layouts:

Column {
  DownloadListHeader {...}
   ListView {...}
}

Please, for further aspects take a look into documentation.

--
With regards, Oleg.

2017-04-15 14:40 GMT+03:00 Alexander Dyagilev :

> Hello,
>
> It seems to be a very non intuitive for me... :(
>
> I'm trying to create my own header for ListView as TableView does not
> exist in Quick Controls 2.
>
> ListView
> {
> header: DownloadListHeader{}
>
> delegate: DownloadListItem
> {
> preInfoColumnWidth: header.preInfoColumnWidth
> }
>
> }
>
> gives the following result:
>
>
> This:
>
> DownloadListHeader
> {
> id: downloadsViewHeader
> }
>
> ListView
> {
> header: downloadsViewHeader
> delegate: DownloadListItem
> {
> preInfoColumnWidth: header.preInfoColumnWidth
> }
> }
>
> gives:
>
>
> This:
>
> DownloadListHeader
> {
> id: downloadsViewHeader
> }
>
> ListView
> {
> header: downloadsViewHeader
> delegate: DownloadListItem
> {
> preInfoColumnWidth: downloadsViewHeader.preInfoColumnWidth
> }
> }
>
> Gives:
>
>
> Ooops, this:
>
> DownloadListHeader
> {
> id: downloadsViewHeader
> }
>
> ListView
> {
> header: DownloadListHeader {}
> delegate: DownloadListItem
> {
> preInfoColumnWidth: downloadsViewHeader.preInfoColumnWidth
> }
> }
>
> Gives the expected behaviour:
>
>
> Could somebody please explain me differences between all these variants?
> Right now, all this look crazy for me.
>
>
> Just in case. The remaining code:
>
> import QtQuick 2.7
>
> import QtQuick.Controls 2.0
>
> import QtQuick.Layouts 1.0
>
> ToolButton
>
> {
>
> property int preInfoColumnWidth: 50
>
> text: "Column #1"
>
> height: 20
>
> }
>
> ---
> import QtQuick 2.7import QtQuick.Controls 2.0import QtQuick.Layouts 1.0
>
> ItemDelegate
> {property int preInfoColumnWidth: 0
>
> height: 40
>
> Row{spacing: 10
>
> Row{width: preInfoColumnWidth
>
> CheckBox{}}
>
> Text{text: namewidth: 150
> elide: Text.ElideRightanchors.verticalCenter: 
> parent.verticalCenter}
>
> Column{anchors.verticalCenter: 
> parent.verticalCenterwidth: 80spacing: 2
>
> Row{width: parent.width   
>  height: 10Text { text: progress + "%"; anchors.left: 
> parent.left}Text { text: timeLeft == "" ? "Paused" : 
> timeLeft; anchors.right: parent.right}}
>
> ProgressBar{from: 0; to: 100; value: 
> progressheight: 10; width: parent.width}}
>
> Text{text: size + "MB"width: 50   
>  elide: Text.ElideRightanchors.verticalCenter: 
> parent.verticalCenter}}
> }
>
>
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>

Re: [Interest] Tired of QML

2017-04-15 Thread Oleg Evseev
In fact basic documentation link "Important Concepts In Qt Quick -
Positioning" http://doc.qt.io/qt-5/qtquick-positioning-topic.html is the
third one in most basic overview of Qt Quick
http://doc.qt.io/qt-5/qtquick-index.html

It is a pity that you were tired earlier on first two basic links :)
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Tired of QML

2017-04-15 Thread Oleg Evseev
>
> I do not understand why this code does not work:
>
> ListView {
>
> anchors.fill: parent
>
> model: downloadsModel
>
> header: DownloadListHeader{}
>
> delegate: DownloadListItem
>
> {
>
> preInfoColumnWidth: parent.header.preInfoColumnWidth
>
> }
> }
> parent.header seems to be not accessible as preInfoColumnWidth initializes 
> with 0. :(
>
>
Firstly, header property is not an item of header, but a component.
headerItem property holds the header item created from the header component.
Also parent.headerItem.preInfoColumnWidth will not work, cause delegate
items will not be *direct *children of Listview.
parent.parent.headerItem.preInfoColumnWidth will work, but better use
idListview.headerItem instead this mess of parents.

So, I've decided to stick with global properties and use them to set
> properties for both header and delegate. Works fine.
>

I think it's better solution.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Qt3D][Threads] A right way to do calculations for qt 3d entities in separate thread

2017-04-15 Thread Oleg Evseev
>
> We do something analogous with the sceneparser plugins which for the scene
> file being loaded, it creates a QEntity subtree complete with
> GeometryRenderer, Material, Transform components. These are then moved to
> the main thread with QObject::moveToThread and grafted into the main tree
> with QNode::setParent(placeToGraftThisSubTreeIn).
>

Thanks, Sean. Such approach with creating entity tree from another thread
is somehow clear, but what to do with updating vertex and index buffers of
geometry of entity from another thread? Can be there any nice solution else
then prepare updating data and rules how it should be applied in separate
thread and passing them through signal to the main one and only there
update geometry?

---
With regards, Oleg
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [Qt3D] Update vertex buffer data together with increasing count of vertices leads to artifacts

2017-04-21 Thread Oleg Evseev
Hi,

I frequently update geometry with help of updateData function of vertex
QBuffer, increasing vertices count with help of setCount function of
geometry position QAttribute like this:

uint vertexCount = positionAttribute->count();

vertexBuffer->updateData(vertexCount*3*sizeof(VERTEX_TYPE),appendVertexArray);
positionAttribute->setCount(vertexCount+2);

(initial data of vertexBuffer of course has enough space for updates)

Sometimes (especially with high frequency updates) I observe temporary very
short time visual artifacts - triangles (faces) based on newly added
vertices jump somewhere aside, but then "come back" to the place they
should be.

As for me it all looks like setCount get to qt3d rendering backend and
"goes down" to opengl calls before updateData, so data that is in current
(not yet updated) vertex buffer on the place of new vertices (some scrap)
is used in rendering and leads to artifacts. And only after that buffer
data is finally updates.
(sorry if I'm not correct in qt3d backend work aspects)

Also finally when I don't need updates anymore, I want to reduce size of
vertexBuffer data like this:

QByteArray vertexArray = vertexBuffer->data();
vertexArray.detach();
vertexArray.resize((vertexCount+2)*3*sizeof(VERTEX_TYPE));
...
vertexBuffer->setData(vertexArray);
positionAttribute->setCount(vertexCount+2);

This one leads sometimes (not always) to artifacts that remains, that is
faces based on new vertexes are goes somewhere out of the screen (probably
to 0 coordinate) and do not change anymore.

Also in contrast with updateData I can't understand and trace chain how
changing count of vertex attribute goes down finally to opengl calls.

Thank in advance for help.

--
With regards, Oleg.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Qt3D] Update vertex buffer data together with increasing count of vertices leads to artifacts

2017-04-23 Thread Oleg Evseev
>
> could you file a JIRA with a test case please?


Yes, I'll try to do test example later.

By the way, it seems that I was wrong blaming updateData function to cause
artifacts. In fact besides update geometry in my application new alike
entities with custom geometry are created (for simplicity let say when I
can't append buffer data through updates anymore), and if I notice
correctly, artifacts are caused only by setData followed by setCount (the
second case I wrote before). I'll try to examine this on test case.

--
With regards, Oleg.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Qt3D] Update vertex buffer data together with increasing count of vertices leads to artifacts

2017-04-26 Thread Oleg Evseev
>
> could you file a JIRA with a test case please?
>
>
> Yes, I'll try to do test example later.
>

I did https://bugreports.qt.io/browse/QTBUG-60429

(as I mentioned in bug description I thought that it was due to that
currently in qt 3d calling both QBuffer setData/functor and partial data
update can lead to unexpected behavior. Did the patch to improve that:
https://codereview.qt-project.org/#/c/192767/ but it hasn't solved this
issue)

-- 
With regards, Oleg.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [Qt3D] Smooth orbit camera

2017-05-06 Thread Oleg Evseev
Hi,

I'm looking for solution to get smooth orbit camera in qt3d. That is for
example when I need to change angle of observe it doesn't translate camera
immediately, but with some delay, just like in games: when vehicle turn
camera follow it with delay.

Does it make sense to use newest Qt3D animation framework (not yet immersed
in the study how to use it), or it would be overkill for that task and it
would be better to write special camera controller based on
QOrbitCameraController with custom logic for frameAction onTriggered
handling?

Maybe there are some relative examples with ready-to-use math? Will be much
appreciate for links.

Thanks for advices!

-- 
With best regards, Oleg.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Qt3D] Smooth orbit camera

2017-05-06 Thread Oleg Evseev
Hi Andy,

Thanks for tips!
I thought about standard animation (it's used in planets example by the
way) but I suppose it's better to use FrameAction:

https://doc.qt.io/qt-5/qt3dlogic-qframeaction.html#details

> The QFrameAction provides a way to perform tasks each frame in a
> synchronized way with the Qt3D backend. This is useful to implement some
> aspects of application logic and to prototype functionality that can later
> be folded into an additional Qt3D aspect.
>
> For example, the QFrameAction can be used to animate a property in sync
> with the Qt3D engine where a Qt Quick animation element is not perfectly
> synchronized and may lead to stutters in some cases.
>

Maybe this with camera movement is not the "some case".

> I haven't looked at the new Qt3D animation stuff, but I think its more
geared towards animated models, not moving the camera?

I suppose it's for everything related to animation in 3d :)

2017-05-06 21:22 GMT+03:00 Andy :

> Oleg:
>
> The way I did it was to implement a QVariantAnimation-derived class that
> stores the QCamera's start &end positions, view centres, and up vectors.
> Then I just set the easing curve & the duration I want and call start().
> Works great for my use case.
>
> I haven't looked at the new Qt3D animation stuff, but I think its more
> geared towards animated models, not moving the camera?
>
> (In another case I use QPropertyAnimation directly to animate some arrow
> drawing in my scene which also works great and is easy to set up.)
>
> ---
> Andy Maloney  //  https://asmaloney.com
> twitter ~ @asmaloney <https://twitter.com/asmaloney>
>
>
> On Sat, May 6, 2017 at 1:46 PM, Oleg Evseev  wrote:
>
>> Hi,
>>
>> I'm looking for solution to get smooth orbit camera in qt3d. That is for
>> example when I need to change angle of observe it doesn't translate camera
>> immediately, but with some delay, just like in games: when vehicle turn
>> camera follow it with delay.
>>
>> Does it make sense to use newest Qt3D animation framework (not yet
>> immersed in the study how to use it), or it would be overkill for that task
>> and it would be better to write special camera controller based on
>> QOrbitCameraController with custom logic for frameAction onTriggered
>> handling?
>>
>> Maybe there are some relative examples with ready-to-use math? Will be
>> much appreciate for links.
>>
>> Thanks for advices!
>>
>> --
>> With best regards, Oleg.
>>
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>>
>>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Qt3D] Smooth orbit camera

2017-05-06 Thread Oleg Evseev
Thanks Sean,

There is no any instrument in qt3d animation framework similar to
QuaternionAnimation (a PropertyAnimation for quaternions), isn't there?

2017-05-06 22:26 GMT+03:00 Sean Harmer :

> Hi,
>
> On 06/05/2017 19:34, Oleg Evseev wrote:
>
>> Hi Andy,
>>
>> Thanks for tips!
>> I thought about standard animation (it's used in planets example by the
>> way) but I suppose it's better to use FrameAction:
>>
>> https://doc.qt.io/qt-5/qt3dlogic-qframeaction.html#details
>>
>> The QFrameAction provides a way to perform tasks each frame in a
>> synchronized way with the Qt3D backend. This is useful to implement
>> some aspects of application logic and to prototype functionality
>> that can later be folded into an additional Qt3D aspect.
>>
>> For example, the QFrameAction can be used to animate a property in
>> sync with the Qt3D engine where a Qt Quick animation element is not
>> perfectly synchronized and may lead to stutters in some cases.
>>
>>
>> Maybe this with camera movement is not the "some case".
>>
>> I haven't looked at the new Qt3D animation stuff, but I think its more
>>>
>> geared towards animated models, not moving the camera?
>>
>> I suppose it's for everything related to animation in 3d :)
>>
>
> Yes, you can use it to animate any property. If animating a property of a
> QNode that is known by the aspect backends then it even avoids the
> backend->frontend->backend round trip. For regular QObjects the animation
> is stepped on the backend and property updates sent to the frontend.
>
> Any of the approaches you mention should work fine.
>
> Cheers,
>
> Sean
>
>
>> 2017-05-06 21:22 GMT+03:00 Andy > <mailto:asmalo...@gmail.com>>:
>>
>> Oleg:
>>
>> The way I did it was to implement a QVariantAnimation-derived class
>> that stores the QCamera's start &end positions, view centres, and up
>> vectors. Then I just set the easing curve & the duration I want and
>> call start(). Works great for my use case.
>>
>> I haven't looked at the new Qt3D animation stuff, but I think its
>> more geared towards animated models, not moving the camera?
>>
>> (In another case I use QPropertyAnimation directly to animate some
>> arrow drawing in my scene which also works great and is easy to set
>> up.)
>>
>> ---
>> Andy Maloney  //  https://asmaloney.com
>> twitter ~ @asmaloney <https://twitter.com/asmaloney>
>>
>>
>> On Sat, May 6, 2017 at 1:46 PM, Oleg Evseev > <mailto:ev.m...@gmail.com>> wrote:
>>
>> Hi,
>>
>> I'm looking for solution to get smooth orbit camera in qt3d.
>> That is for example when I need to change angle of observe it
>> doesn't translate camera immediately, but with some delay, just
>> like in games: when vehicle turn camera follow it with delay.
>>
>> Does it make sense to use newest Qt3D animation framework (not
>> yet immersed in the study how to use it), or it would be
>> overkill for that task and it would be better to write special
>> camera controller based on QOrbitCameraController with custom
>> logic for frameAction onTriggered handling?
>>
>> Maybe there are some relative examples with ready-to-use math?
>> Will be much appreciate for links.
>>
>> Thanks for advices!
>>
>> --
>> With best regards, Oleg.
>>
>> ___
>> Interest mailing list
>> Interest@qt-project.org <mailto:Interest@qt-project.org>
>> http://lists.qt-project.org/mailman/listinfo/interest
>> <http://lists.qt-project.org/mailman/listinfo/interest>
>>
>>
>>
>>
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>>
>>
> --
> Dr Sean Harmer | sean.har...@kdab.com | Managing Director UK
> KDAB (UK) Ltd, a KDAB Group company
> Tel. +44 (0)1625 809908; Sweden (HQ) +46-563-540090
> Mobile: +44 (0)7545 140604
> KDAB - Qt Experts
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [Qt3D] Mirrored textures aspects

2017-05-08 Thread Oleg Evseev
Sean or Paul,

Could you please explain aspects related to mirrored textures
https://bugreports.qt.io/browse/QTBUG-54881

I didn't understand why when building against qt-5.8 I don't need to mirror
textures image and SceneLoader load 3d models fine, but in qt-5.9 (like in
qt-5.7 before) I need to mirror them, or they're shown flipped for loaded
3d objects. I though working with those issues was done before qt-5.8 rc
and qt-5.9 shouldn't differ from 5.8 in this aspect.

Thanks in advance!

---
With regards, Oleg
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Qt3D] Mirrored textures aspects

2017-05-08 Thread Oleg Evseev
Ok, thanks for clarify this!
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [Qt3D] Crash with "Invalid thumbnail dimensions: 0x0" on android

2017-05-10 Thread Oleg Evseev
Hi,

I got crash in application only on Xiaomi Mi4c with MIUI based on Android
5.1.1 (opengl 3.1 V@103.0) when scene loader loads 3d model with qt-5.8.
Building against qt-5.9 works fine.

Got "Invalid thumbnail dimensions: 0x0" in logcat

*On other androids* (including Xiaomi Mi2 with MIUI based on Android 4.4.4
(opengl 3.0 V@45.0), and tablet with Android 5.1.1 (opengl 3.0 V@100.0))
app built with qt-5.8 *works*.

I think it's related to texture rendering cause before crash there is usual
warning in logcat:

[Qt3DRender::GLTexture] No QTextureData generated from Texture Generator
yet. Texture will be invalid for this frame

that is sceneloader load model as usual (I had this warning on Windows and
other androids too).Other objects in 3d scene is loaded and rendered. Also
qgltf example with sceneloaders (but objects without textures) works fine.

The reason not in particular model. Check another one - same crash.

if I rollback qt 3d up to 5.8.0 tag, app runs fines.

Thanks in advance for tips what to do with that.

--
With best regards, Oleg.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt3D: Create custom meshes and textures in C++, use in QML

2017-07-06 Thread Oleg Evseev
Hi, Helmut

I'm not sure I understand your problem in a right way, but I think my
setData example from https://bugreports.qt.io/browse/QTBUG-60429 maybe
helpful.

> Or is it possible to construct some of these in C++ and use them in QML
via setContextProperty: Buffer, Geometry, GeometryRenderer or other classes
from the Qt3D modules?

>From my point of view it would be better to construct them (Buffer,
Geometry, GeometryRenderer, Textures and so on) in C++ and use them also in
C++. Just make some of "using" functions Q_INVOKABLE to have ability to
call them from QML when need it.
Also you can "get access" to certain entities through Q_PROPERTY for QML
GUI.

---
With regards, Oleg.

2017-07-06 12:09 GMT+03:00 Helmut Mülner :

> After studying the (spare) Qt3d documentation and examples and researching
> almost all Web resources, I am still not sure how to best solve the
> following task:
>
>
>
> I have to create custom meshes and textures in C++ (the data come from a
> database) and I want to use these items in a QML GUI.
>
> At run-time I want to change or replace the meshes and/or textures.
>
>
>
> For other items (models and other QObjects) I use QQmlContext::
> setContextProperty.
>
> I also use image providers.
>
>
>
> The answer to 
> https://stackoverflow.com/questions/38847357/use-qt3d-qentity-in-qml-scene3d 
> shows how to do this with qmlRegisterType  … and a class derived from 
> Qt3DCore::QEntity.
>
> I cannot do the addComponent in the constructor, so I would have to use slots 
> do add and replace components that are called from QML.
>
> Replacements would have to use QEntity::components(), removeComponent and 
> addComponent.
>
>
>
> Will this work, and is this the best strategy?
>
>
>
> Or is it possible to construct some of these in C++ and use them in QML via 
> setContextProperty: Buffer, Geometry, GeometryRenderer or other classes from 
> the Qt3D modules?
>
>
>
> Is anybody out there who has experience with that?
>
>
>
> Regards,
>
>
>
> Helmut
>
>
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt3D: Create custom meshes and textures in C++, use in QML

2017-07-06 Thread Oleg Evseev
> I think you misunderstood me: *MY GUI is in QML, only the backend is in
C++*

This is certainly what I mean. Take a look my setData example from
https://bugreports.qt.io/browse/QTBUG-60429 it uses Scene3D in QML and C++
backend.

>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt3D: Create custom meshes and textures in C++, use in QML

2017-07-06 Thread Oleg Evseev
> This is basically the same approach as in the Stackoverflow answer

That's why I wrote "*I'm not sure I understand your problem in a right way"*
before. Why is this approach not suitable for you?
(just in case, in difference with StackOverflow approach in my example
camera and render settings are done in backend in C++)

> It would be nice if the Qt3D developers could add one or more
applications of mixed C++/QML Qt3D development to the Qt3D example
collection. Life would be so much easier.

After all there there are many articles and examples about mixed C++/QML, I
didn't see any uniqueness of Qt3D in this questions.
And after understanding this simple approach with qmlRegisterType you can
use any Qt3D example with c++ backend, why not?
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt3D: Create custom meshes and textures in C++, use in QML

2017-07-06 Thread Oleg Evseev
> no information about ownership (transfer)

It is same as usual data ownership when mix C++/QML
http://doc.qt.io/qt-5/qtqml-cppintegration-data.html

especially take into account this:
*additionally, the QML engine respects the normal QObject parent ownership
semantics of Qt C++ objects, and will never delete a QObject instance which
has a parent*

> In your World3D constructor you use 8 new command, and I do not know if
some of them are memory leaks or not.

As I think you missed main aspect of Qt3D
https://bugreports.qt.io/browse/QTBUG-58057?focusedCommentId=344161&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-344161



*The thing is everything in Qt3D relies on having a parent, as setting the
parent is what allows the backend aspects to create their nodes and perform
the rendering.*
Everything that is created in my example with "new" (and have parent) will
be in fact deleted with main root entity (World3D) deletion.


After all I agree with you about the lack of documentation of qt 3d :(

---
With regards, Oleg.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt3D: Create custom meshes and textures in C++, use in QML

2017-07-07 Thread Oleg Evseev
>
> I think the entity could also be a property (a QEntity* or a QEntity, I am
> not sure) of the controller.
>

Yes, it could, but only QEntity* of course, cause it inherits QObject in
the end so it can't be copied.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [QT3D] access geometry data of a loaded model

2017-07-11 Thread Oleg Evseev
Hi,

Take a look on qt3d\tests\manual\assimp example, from there you will
understand how to find specific entities or components of scene loader tree.

---
With regards, Oleg

2017-07-11 12:32 GMT+03:00 :

>
>
> Hi
>
> I use QT5.8 C++ API.
> I know how to create and display models with vertex and index buffers.
> How can I access data of a model loaded with Sceneloader() ?
> I.e. I load an arbitrary model and afterwards want to read out the
> vertices, indices, materials etc. in order to
> process this information.
>
> Issue:
> When I create my own models via my own buffers I have a hierarchy of
> entities & components which shows my creations (material/color,
> transformation, vertices, indices, textures)
>
> Howevr, when I load an object like .obj or .ply, I always only see the url
> referrer to the source.
> There is no entity tree other than the single child with the url apart
> from a trivial root node.
> Is this intended or a bug? Can this be related to the OS/VM? (hardly
> imaginable though)
>
>
> => How can I access the actual object data?
>
>
>
> Codewise i do the following:
>
>  m_meshEntity = new Qt3DCore::QEntity();
>  m_rootEntity = new Qt3DCore::QEntity();
>
>  Qt3DRender::QSceneLoader *loader = new
> Qt3DRender::QSceneLoader(m_meshEntity);
>
>  QString fileName = "../3dModels/someModel.obj";
>  QUrl url = QUrl::fromLocalFile(fileName);
>
>  QObject::connect(loader, &Qt3DRender::QSceneLoader::sta
> tusChanged,
>   this, 
> [](Qt3DRender::QSceneLoader::Status
> s){ qDebug() << s; return false;});
>
>
>  loader->setSource(url);
>
>  m_meshEntity->addComponent(loader);
>
>  m_meshEntity->setParent(m_rootEntity);
>  view->setRootEntity(m_rootEntity);
>  view->show();
>
> Then, m_meshEntity/m_rootEntity are trivial as described above. Its
> visible in the 3d window (view) but trivial from the "programmatical"
> content.
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt Android - Mouse Hovering Events

2017-07-16 Thread Oleg Evseev
Hi, Robert

As I saw the Material and Universal styles have gained hover effects in Qt
5.8 in Qt Quick Controls 2.1
http://blog.qt.io/blog/2016/10/06/qt-quick-controls-2-1-and-beyond/

https://youtu.be/43HrMH379-E

I suppose it works on Android.

---
With regards, Oleg

2017-07-16 10:49 GMT+03:00 Robert Iakobashvili :

> Hi,
> Android-7 has mouse hovering events and may be they are even earlier.
>
> When using Qt-5.7.1, however, I do not see the events are coming,
> at least true for widgets.
>
> Does anybody knows if they are supported by Qt?
>
> Many Chromebook devices have a mouse-keyboard experience
> and no touch screen.
>
> Kind regards,
> Robert
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [QT3D] Does anyone have an example of using QSkyboxEntity?

2017-11-16 Thread Oleg Evseev
qt3d\tests\manual\skybox\

2017-11-16 2:27 GMT+03:00 Pierre Chicoine :

> Has anyone figured out how to use a QSkyboxEntity?
>
> An example would be awesome.
>
> I've tried all sorts of techniques.  I use C++ but I'm sure I could
> translate a QML file if anyone has one available.
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [QT3D] Force qt to use qgltf.exe from mingw/bin instead of android/bin

2017-11-23 Thread Oleg Evseev
Hi all,

I've got error:

No rule to make target 'C:/Qt/5.9.3/android_armv7/bin/qgltf.exe', needed by
'xxx.qrc'.  Stop.

How to point qt to use c:\Qt\5.9.3\mingw53_32\bin\qgltf.exe for android
builds?

Thanks in advance.

-- 
With regards, Oleg.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Modify object list in qml

2017-11-29 Thread Oleg Evseev
Hi all,

I would like to push an empty object in front of objects list model of
ComboBox.
I can do this in c++:

QList SomeClass::getList() {
QList list = db.getList();
list.push_front(Q_NULLPTR);
return list;
}

then set it as model for ComboBox:

model: SomeClass.getList()

And it works, I then can check modelData for null in delegate.

But I'm interesting if there is any way I could do it in qml, something
like:

  model: [0, (or undifined), DB.getList()]
or
  model: {0, (or undifined), DB.getList()}

or push empty object in front of list in Component.onCompleted?

Thanks in advance for help!

--
With regards, Oleg.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Modify object list in qml

2017-11-29 Thread Oleg Evseev
Nice. Thanks Jérôme!

2017-11-29 23:00 GMT+03:00 Jérôme Godbout :

> model: (myCondition ? [0] : []).concat(DB.getList())
>
> Take care:
> DB.getList().concat([...])
> will not work you would need to convert the QList to JS array first
>
> [image: bodycad] <https://www.bodycad.com/>
> Jerome Godbout
> Software Developer
> 2035 rue du Haut-Bord, Québec, QC, Canada. G1N 4R7
> <https://maps.google.com/?q=2035+rue+du+Haut-Bord,+Qu%C3%A9bec,+QC,+Canada.+G1N+4R7&entry=gmail&source=g>
> T:  +1 418 527-1388
> E: jer...@bodycad.com
> www.bodycad.com
>
> The contents of this email message and any attachments are intended solely
> for the addressee(s) and may contain confidential and/or privileged
> information and may be legally protected from disclosure. If you are not
> the intended recipient of this message or their agent, or if this message
> has been addressed to you in error, please immediately alert the sender by
> reply email and then delete this message and any attachments. If you are
> not the intended recipient, you are hereby notified that any use,
> dissemination, copying, or storage of this message or its attachments is
> strictly prohibited.
>
> Le contenu de ce message et les pièces jointes sont destinés uniquement
> pour le(s) destinataire(s) et peuvent contenir des informations
> confidentielles et / ou privilégiées qui peuvent être protégées légalement
> contre toute divulgation. Si vous n'êtes pas le destinataire de ce message
> ou son agent, ou si ce message vous a été adressé par erreur, s’il vous
> plaît avertir immédiatement l'expéditeur par courriel de réponse, puis
> supprimer ce message et les pièces jointes. Si vous n'êtes pas le
> destinataire prévu, vous êtes par la présente informé que toute
> utilisation, diffusion, copie, ou stockage de ce message ou de ses pièces
> jointes est strictement interdit.
>
> On Wed, Nov 29, 2017 at 2:41 PM, Oleg Evseev  wrote:
>
>> Hi all,
>>
>> I would like to push an empty object in front of objects list model of
>> ComboBox.
>> I can do this in c++:
>>
>> QList SomeClass::getList() {
>> QList list = db.getList();
>> list.push_front(Q_NULLPTR);
>> return list;
>> }
>>
>> then set it as model for ComboBox:
>>
>> model: SomeClass.getList()
>>
>> And it works, I then can check modelData for null in delegate.
>>
>> But I'm interesting if there is any way I could do it in qml, something
>> like:
>>
>>   model: [0, (or undifined), DB.getList()]
>> or
>>   model: {0, (or undifined), DB.getList()}
>>
>> or push empty object in front of list in Component.onCompleted?
>>
>> Thanks in advance for help!
>>
>> --
>> With regards, Oleg.
>>
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>>
>>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QML ObjectOwnership for List of QObjects

2017-12-10 Thread Oleg Evseev
Hi all,

Could someone explain QObject ownershiping aspects, please.

According to
http://doc-snapshots.qt.io/qt5-dev/qtqml-cppintegration-data.html when data
is transferred from C++ to QML, the ownership of the data always remains
with C++. The exception to this rule is when a QObject is returned from an
explicit C++ method call.

And it works for c++ functions that return "single" QObject*.

But what to do with QObjectList-based models (
https://doc-snapshots.qt.io/qt5-5.9/qtquick-modelviewsdata-cppmodels.html)?
Let say in c++ application creates list of new objects:
Q_INVOKABLE QList workers();
and qml set this as the model for ListView or Combobox.

But these objects will never be destroyed. How to force qml own this
objects properly?

I did try QQmlEngine::setObjectOwnership(list[i],
QQmlEngine::JavaScriptOwnership) in loop before returning list, but qml can
destroy them immediately despite that Combobox is still displayed.

--
With regards, Oleg.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QML ObjectOwnership for List of QObjects

2017-12-10 Thread Oleg Evseev
For now I stopped at this solution:

Create QObjectListModel class (QObject) that can setList(QList)
saving list to private variable and doing parent all objects to *this*, and
also getList() for QML. And in QML:

ComboBoxCheck {
   property QObjectListModel listModel: MainClass.workers()
   model: listModel.list()
}

Property is needed to maintain pointer to QObjectListModel (QObject) so it
will not be deleted until destruction of Item (ComboBox).
So in this case QML is control lifetime of QObjects in list. And this what
I needed for now in fact.

But maybe there are other more pretty solutions?

2017-12-10 18:05 GMT+03:00 Oleg Evseev :

> Hi all,
>
> Could someone explain QObject ownershiping aspects, please.
>
> According to http://doc-snapshots.qt.io/qt5-dev/qtqml-cppintegration-data
> .html when data is transferred from C++ to QML, the ownership of the data
> always remains with C++. The exception to this rule is when a QObject is
> returned from an explicit C++ method call.
>
> And it works for c++ functions that return "single" QObject*.
>
> But what to do with QObjectList-based models (
> https://doc-snapshots.qt.io/qt5-5.9/qtquick-modelviewsdata-cppmodels.html)?
> Let say in c++ application creates list of new objects:
> Q_INVOKABLE QList workers();
> and qml set this as the model for ListView or Combobox.
>
> But these objects will never be destroyed. How to force qml own this
> objects properly?
>
> I did try QQmlEngine::setObjectOwnership(list[i],
> QQmlEngine::JavaScriptOwnership) in loop before returning list, but qml
> can destroy them immediately despite that Combobox is still displayed.
>
> --
> With regards, Oleg.
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [QT3D] Cannot set compressed data for non-compressed format error for dds textures

2017-12-16 Thread Oleg Evseev
Hi all,

I'm trying to run against Qt 5.9.3 my old qt 3d example qgltf (from Qt 5.8)
that load 3d object with dds texture (from here
https://bugreports.qt.io/browse/QTBUG-57998)

but I got errors:
Cannot set compressed data for non-compressed format 0x1908

What can be a problem?

--
With regards, Oleg.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] How to exclude files from lupdate in .pro?

2017-12-27 Thread Oleg Evseev
Hi all,

According to documentation in qt there is a workaround lupdate_only{...} -
conditional statement so the lupdate tool sees some file (for example .qml
files) but the C++ compiler ignores them.

I wonder if there is a opposite workaround some conditional statement (or
something else) so the lupdate tool doesn't check some file/dirs, but the
C++ compiler still see them.

For example scanning
INCLUDEPATH += "c:/boost_1_64_0/"

by lupdate takes too much time.

---
With regards, Oleg.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] How to exclude files from lupdate in .pro?

2017-12-27 Thread Oleg Evseev
Nice, thanks a lot!

2017-12-27 13:36 GMT+03:00 alexander golks :

> Am Wed, 27 Dec 2017 12:47:01 +0300
> schrieb Oleg Evseev :
>
> > Hi all,
> >
> > According to documentation in qt there is a workaround lupdate_only{...}
> -
> > conditional statement so the lupdate tool sees some file (for example
> .qml
> > files) but the C++ compiler ignores them.
> >
> > I wonder if there is a opposite workaround some conditional statement (or
> > something else) so the lupdate tool doesn't check some file/dirs, but the
> > C++ compiler still see them.
> >
> > For example scanning
> > INCLUDEPATH += "c:/boost_1_64_0/"
> >
> > by lupdate takes too much time.
> >
> > ---
> > With regards, Oleg.
>
> hi,
>
> we use TR_EXCLUDE to exclude qt headers and sources:
>
> lupdate_only{
> message("excluding $(QTDIR)/../Src/qtbase/*")
> TR_EXCLUDE += $(QTDIR)/../Src/qtbase/*
> message("excluding $(QTDIR)/include/*")
> TR_EXCLUDE += $(QTDIR)/include/*
> }
>
> alex
>
> --
> /*
>  *  printk("starfire_translate: Are you kidding me?\n");
>  *linux-2.6.19/arch/sparc64/kernel/starfire.c
>  */
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Connecting Signals to Methods

2018-04-23 Thread Oleg Evseev
Hi all,

Is there a way to connect signal to function using the connect() method in
javascript QML with Qt::UniqueConnection type?

---
With regards, Oleg.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [SVG] QML Image: Error decoding

2018-07-16 Thread Oleg Evseev
Hi!

Got error:
QML Image: Error decoding: qrc:/images/Bluebubble.svg: 
?? ???

for such reduced code in my big project:

ApplicationWindow {

id: application

width: 1280

height: 800
visible: true


Image {

source: "qrc:/images/Bluebubble.svg"

}
}


But accelbubble example with in fact the same code decodes and renders svg
fine!

I do not understand the difference. I do have QT += svg xml in my .pro
file, also just in case, I tried to add same modules from my project to
.pro of accelbubble example and same imports to qml - it still runs fine.
Tried different svg files with different formats - same result. accelbubble
render any file, my project - none.
It blows my mind.

Thanks in advance for any help.

--
With regards, Oleg.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [External] [SVG] QML Image: Error decoding

2018-07-17 Thread Oleg Evseev
Yes, I tried add QTPLUGIN += qsvg it doesn't help.
And by the way according to .pro file of accelbubble example this manual
plugin loading needed with older Qt and commented there.

2018-07-17 11:30 GMT+03:00 Kristoffersen, Even (NO14) <
even.kristoffer...@honeywell.com>:

> Do you have QT_PLUGIN += qsvg in your .pro file as well?
>
>
>
> -Even
>
>
>
> *From:* Interest [mailto:interest-bounces+even.kristoffersen=
> honeywell@qt-project.org] *On Behalf Of *Oleg Evseev
> *Sent:* 16. juli 2018 17:56
> *To:* Qt Project 
> *Subject:* [External] [Interest] [SVG] QML Image: Error decoding
>
>
>
> Hi!
>
>
>
> Got error:
>
> QML Image: Error decoding: qrc:/images/Bluebubble.svg: 
> ?? ???
>
>
>
> for such reduced code in my big project:
>
>
>
> ApplicationWindow {
>
> id: *application*
>
> width: 1280
>
> height: 800
> visible: true
>
>
>
> Image {
>
> source: "qrc:/images/Bluebubble.svg"
>
> }
> }
>
>
>
> But accelbubble example with in fact the same code decodes and renders svg
> fine!
>
>
>
> I do not understand the difference. I do have QT += svg xml in my .pro
> file, also just in case, I tried to add same modules from my project to
> .pro of accelbubble example and same imports to qml - it still runs fine.
>
> Tried different svg files with different formats - same result.
> accelbubble render any file, my project - none.
>
> It blows my mind.
>
>
>
> Thanks in advance for any help.
>
>
>
> --
>
> With regards, Oleg.
>
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [External] [SVG] QML Image: Error decoding

2018-07-17 Thread Oleg Evseev
Run my project on android - it display svg as should.
My current desktop is Win 10 Pro 64bit. But I don't understand how it can
be relevant, because accelbubble example shows svg fine on this desktop.

2018-07-17 11:58 GMT+03:00 Oleg Evseev :

> Yes, I tried add QTPLUGIN += qsvg it doesn't help.
> And by the way according to .pro file of accelbubble example this manual
> plugin loading needed with older Qt and commented there.
>
> 2018-07-17 11:30 GMT+03:00 Kristoffersen, Even (NO14) <
> even.kristoffer...@honeywell.com>:
>
>> Do you have QT_PLUGIN += qsvg in your .pro file as well?
>>
>>
>>
>> -Even
>>
>>
>>
>> *From:* Interest [mailto:interest-bounces+even.kristoffersen=
>> honeywell@qt-project.org] *On Behalf Of *Oleg Evseev
>> *Sent:* 16. juli 2018 17:56
>> *To:* Qt Project 
>> *Subject:* [External] [Interest] [SVG] QML Image: Error decoding
>>
>>
>>
>> Hi!
>>
>>
>>
>> Got error:
>>
>> QML Image: Error decoding: qrc:/images/Bluebubble.svg: 
>> ?? ???
>>
>>
>>
>> for such reduced code in my big project:
>>
>>
>>
>> ApplicationWindow {
>>
>> id: *application*
>>
>> width: 1280
>>
>> height: 800
>> visible: true
>>
>>
>>
>> Image {
>>
>> source: "qrc:/images/Bluebubble.svg"
>>
>> }
>> }
>>
>>
>>
>> But accelbubble example with in fact the same code decodes and renders
>> svg fine!
>>
>>
>>
>> I do not understand the difference. I do have QT += svg xml in my .pro
>> file, also just in case, I tried to add same modules from my project to
>> .pro of accelbubble example and same imports to qml - it still runs fine.
>>
>> Tried different svg files with different formats - same result.
>> accelbubble render any file, my project - none.
>>
>> It blows my mind.
>>
>>
>>
>> Thanks in advance for any help.
>>
>>
>>
>> --
>>
>> With regards, Oleg.
>>
>>
>>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Qt3d] Line culling

2018-07-25 Thread Oleg Evseev
I have the same issue but with plane.
If there is only one vertex inside camera frustum - entity get culled.

---
With regards, Oleg

2018-03-14 11:54 GMT+03:00 Saif Suleiman :

> Hi every one,
>
> Why when one of the two vertices of a line placed out side the camera
> frustum, the whole line gets culled, not clipped(show only the segment that
> is inside camera frustum) ?
>
> For now I disabled frustum culling, but I feel this will not work at some
> point in the future for my project.
>
> Thanks in advance.
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [Qt3d] Textures flickering

2018-07-29 Thread Oleg Evseev
 Hi all,

When I load big models with help QSceneLoader in assimp-cpp test example
(or small models but move camera far away from object) textures start
flickering:
https://youtu.be/5FUOWc412JE

How to fix that?
Thanks in advance for help.

---
With regards, Oleg
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Qt3d] Textures flickering

2018-07-29 Thread Oleg Evseev
 Mike, thanks.

Yes you are right. This is z-conflict.
This model is rendered fine, without flickering in another project with
disabled fragment depth writes to depth buffer.

How can I increase precision of z-buffer in qt 3d?


2018-07-29 21:28 GMT+03:00 Mike Krus :

> Hi
>
> hard to say from the short video, but it looks like you may have z
> fighting going on, two coinciding meshes and the lack on precision causing
> this flickering…
>
> Mike
>
> > On 29 Jul 2018, at 14:58, Oleg Evseev  wrote:
> >
> > Hi all,
> >
> > When I load big models with help QSceneLoader in assimp-cpp test example
> (or small models but move camera far away from object) textures start
> flickering:
> > https://youtu.be/5FUOWc412JE
> >
> > How to fix that?
> > Thanks in advance for help.
> >
> > ---
> > With regards, Oleg
> > ___
> > Interest mailing list
> > Interest@qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/interest
>
> --
> Mike Krus | mike.k...@kdab.com | Senior Software Engineer
> KDAB (UK) Ltd., a KDAB Group company
> Tel: UK Office +44 1625 809908   Mobile +44 7833 491941
> KDAB - The Qt Experts, C++, OpenGL Experts
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [Qt3D] Issues

2018-08-09 Thread Oleg Evseev
Hi,

I wonder why FirstPersonCameraController now in qt 5.11.1 by arrow up-down
keys moves camera up and down instead of moving forward like in games (like
first person view should), and as it is in 5.9.5?

Also qgltf.exe of qt 5.11.1 for windows "Failed to import" (without any
other error description) for the one of my model (for both obj and 3ds
format). qgltf.exe of qt 5.9.5 handles this obj model without problems, but
can't import 3ds model with "Qt3D.AssimpImporter: Assimp scene import
failed Chunk is too large".

I like that qt 5.11.1 renders objects loaded in SceneLoader with
phongmaterial with ambient color = "white" as should - it looks similar to
Blender, while in qt 5.9.5 I need to reduce ambient by half or objects are
overexposed to white instead of their diffuse color.

But SceneLoader of  qt 5.11.1 still has texture rendering issues that was
fixed in qt 5.8 (QTBUG-66644) once.

I mean I can't choose version. It looks like qt 3d development still can
not be stabilize :(

--
With regards, Oleg.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [Qt3D] Windows Deployment. Path to models?

2018-08-13 Thread Oleg Evseev
Hello!

Trying to deploy windows desktop application with qt3d. Application runs
but sceneloaders don't load qgltf models added through assest QT3D_MODELS.
In code models are loaded from resources:
setSceneLoaderSource(QString("qrc:/models/helicopter.qgltf"));

In qt creator everything loads fine.

Where should I copy qgltf models and theirs files? Tried root directory
(beside with exe) and "models" dir - didn't help.

Thanks in advance for help!

--
With regards, Oleg.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


  1   2   >