Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7410

C/C++ • How to change resolution of display via c++ ?

$
0
0
I'm doing C++ app for Raspberry Pi 4.
I need to change a screen resolution of display to 640x480

Code:

std::system("wlr-randr --output HDMI-A-1 --mode 640x480");glutInit(&argc, argv);glutInitWindowSize( 640, 480);glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);glutCreateWindow("Example");glutDisplayFunc( render );glutIdleFunc( update );glutKeyboardFunc(on_key_events);glutFullScreen();
I did not find a working solution
system call wlr-randr --output HDMI-A-1 --mode 640x480 not works.

I need help. )

Statistics: Posted by progman — Fri Apr 12, 2024 8:33 am — Replies 0 — Views 23



Viewing all articles
Browse latest Browse all 7410

Trending Articles