I'm developing a media player now in qml, using the types MediaPlayer and VideoOuput. How to setting the frame rate in qml? Is there any type or property about changing a frame rate??
Related
I have a custom QQuickFramebufferObject node which renders a texture on some geometry. Now I want to render a Qml item to a texture (e.g. QOpenGLTexture) and use this texture in my custom node. I know that there is the grabToImage (http://doc.qt.io/qt-5/qquickitem.html#grabToImage) method but this method is slow because it first renders everything into a QImage and data has to be transferred from/to the GPU.
In detail, I am looking for something like ShaderEffectSource element but with direct access to the texture id which can be used as a texture in the QQuickFramebufferObject. Is there already something implemented in Qt for this scenario?
As the title suggests, I'm using Qt for OpenGL drawing, and with QOpenGLWidget I can turn on multisampling for the main screen buffer with QSurfaceFormat's setSamples() function. This works fine and looks pretty nice. However, I'm also drawing into a custom frame buffer (using glGenFramebuffers, glBindFramebuffer(), etc) in the background, where I don't want anti-aliasing (since it's drawing using color encoding for selection purposes), but it seems to be inheriting the multi-sampling from the main QOpenGLWidget somehow. Any ideas on how to disable that, to use multisampling in the main window but not in my own custom off-screen frame buffers?
Multisampled rendering is enabled or disabled by using the glEnable/Disable(GL_MULTISAMPLE). This state is not part of the framebuffer's state; it's regular context state. As such, even when you switch framebuffers, that state will be unaffected.
Additionally, the multisample enable/disable switch doesn't mean anything if your attached images don't have multiple samples. If you're creating images for non-multisampled rendering, there's no reason to create them with multiple samples. So create single-sample images.
Well, couldn't find a way to disable it or avoid it in my OpenGL code, but if I set the default format to have 0 samples and the format of the QOpenGLWidget to have 2/4/8/whatever, then the framebuffer object won't use anti-aliasing when it's created.
With JAVAFX I am trying to take a snaphot of a MediaView using the snapshot() method.
The MediaView displays a paused video frame.
The issue is that the first time I take the snapshot the video frame becomes scrambled. By resizing the view manually in my app the view becomes coherent again.
Is there a way to quickly overcome this problem? I tried to progrmatically resize but it didn't help :-(
I am using the new unity networking using unity 5.3.1 , my player prefab is a UI canvas , so when another client joins the canvas's overlap and I cannot press any button on host or client .
What i want is to disable other canvase's on each players game and just leave the local players canvase active , I have tried islocalplayer , isclient ,isserver but nothing works .
Is there a way around this please do tell.
Here are some options I can think of:
1) Instead of making canvas a player object, make panel a player object, so that all your players are different panels under same canvas. Now, when object are under same canvas, they ray casting order is determined by the order in hierarchy.
The objects that are lower in the hierarchy occlude those that are higher. So, what you can do is moving your player object to the lowest position in objects hierarchy, so that it will occlude all other players. This can be done using Transform methods SetSiblingIndex and GetSiblingIndex, like
transform.SetSiblingIndex(100000/*some big number*/);
2) Disable raycasting on all other players - what if you can click some component on canvas or not is whether it is a raycast target. Images and Text components can be raycast targets, or more generally any component that inherits from Graphics. You can iterate over all components of type Graphics in all players except the local player and mark raycastTarget = false.
I figured it out and as #NikaKasradze said use only one canvas and put all gui listeners in the islocalplayer bool check .
i am new to Qt.i have to display a huge data in qml listview and that data is divided in some headings.i wana know that how to make such listview to display heading then his data...
Regards
Adnan Shoukat
There is section.* properties in QML ListView. It automatically creates sections in view with section headers (defined in section.delegate property).