Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QT-OpenGL example now builds with Qt6 #59

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SiddhantRanade
Copy link

No description provided.

@@ -13,7 +13,7 @@ Item {

MouseArea {
anchors.fill: parent
onClicked: renderer.command(["loadfile", "test.mkv"])
onClicked: renderer.command(["loadfile", "C:/Users/Siddhant/Downloads/orig cut.mp4"])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please leave this as a generic test.mkv instead of a file on your own computer.

FILENAME_VARIABLE deploy_script
NO_UNSUPPORTED_PLATFORM_ERROR
)
install(SCRIPT ${deploy_script})

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This entire file is unncessary. The .pro file should be updated instead.

Comment on lines -9 to +10
setlocale(LC_NUMERIC, "C");
//setlocale(LC_NUMERIC, "C");
// Commented because it's not compiling on macOS

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use #ifndef Q_OS_MAC so that other platforms will work as expected. Don't comment out the correct way of running libmpv.

mpv_opengl_fbo mpfbo{static_cast<int>(defaultFramebufferObject()), width(), height(), 0};
mpv_opengl_fbo mpfbo{static_cast<int>(defaultFramebufferObject()), (int) (width() * devicePixelRatio()), (int) (height() * devicePixelRatio()), 0};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use qreal dpr = devicePixelRatio() once and refer to that variable instead of calling devicePixelRatio twice.

Use new-style casts such as int(width()*dpr), not C-style casts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants