Git Product home page Git Product logo

rpi-opengl-without-x's Issues

RPI4: failed to add service - already in use?

I also get the

failed to add service - already in use?

message, every time. Your troubleshooting suggestion:

"Failed to add service - already in use?

As mentioned in this issue, you have to remove both vc4-kms-v3d and vc4-fkms-v3d from R-Pi config."

seems to be in direct contradiction to enabling DRM which is necessary for the Pi4 to work using your code, isn't it? Am I missing something?

DRM failed to get resources

Hi @matusnovak,

First of all thank you for all the work here and for the RPI4 example.

I've been trying to migrate or try to port this: https://github.com/boydm/scenic_driver_nerves_rpi (for Nerves, an Elixir project) in order to let the driver draw on the screen.

I've tried to follow the instructions you setup but so far no luck. It gets stuck on the Unable to get DRM resources.

Any thoughts?

I can push my branch and link you to it if you need to.

Thank you.

~ bjufre

Pi4 with LCD output has no vsync

On Pi3 it has the correct 60 FPS, but Pi4 i can more than 60 (LCD refresh is especially 60Hz).

If I do the same on HDMI, it is OK, no more than 60 FPS happens.

I use the same gbmSwapBuffers...

raspbian eGL issue

Linux raspberrypi 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux

sudo apt-get install mesa-utils
Reading package lists... Done
Building dependency tree       
Reading state information... Done
mesa-utils is already the newest version (8.3.0-3).
mesa-utils set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 27 not upgraded.

pi@raspberrypi:~/rpi-opengl-without-x $ 

pi@raspberrypi:~/rpi-opengl-without-x $ ./triangle 
libEGL warning: DRI3: xcb_connect failed
libEGL warning: DRI2: xcb_connect failed
libEGL warning: DRI2: xcb_connect failed
Failed to get EGL version! Error: 

PI4 dual display with common context

Hi!

I ran an issue:
when I use the code with LCD and HDMI display together, I can not activate the second display (and surface) errorless.

First I use context 1:
eglMakeCurrent(ctx->eglDisplay, ctx->eglSurface, ctx->eglSurface, ctx->eglContext)

Than the context 2 with the same eglContext:
eglMakeCurrent(ctx2->eglDisplay, ctx2->eglSurface, ctx2->eglSurface, ctx->eglContext)

And the second gives EGL_BAD_CONTEXT.

Anyway if I use in the second one with ctx2->eglContext at the 4th parameter, it succeeded, but it gives a blank screen (because the ctx2 contains nothing)

What is the problem? Can U give me an example for using 2 displays with the same eglContext?

Problem with Raspberry PI 2 and Raspbian 11 (bullseye)

Hi,

I have been last using C++ when I was working at university 15 years ago, since that I had no need and I am really out of the topic. However, I found an interesting Project which uses OpenGL without X and I found this project but I used OpenGL last time when I was still a student (and not over C++), so forgive me if I am missing obvious connections.

I just installed Raspbian 11 (bullseye) and found nothing to work for me. After a lot of trial I got the thing compiled and under the desktop it even rendered a file but not over SSH connection. I tested and read and finally as I was finding mesa all the time, I wondered if I installed that. I just reinstalled the OS and made the following observations:

user@host:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

First thing I found ist, that there is no directory "/opt/vc/lib"

user@host:~ $ ls /opt/
pigpio/      WidevineCdm/

Aparently it has been moved to /usr/lib/arm-linux-gnueabihf/ due to some postings I found and it seems correct. In that folder I see:

user@host:~ $ ls /usr/lib/arm-linux-gnueabihf/libEGL*
/usr/lib/arm-linux-gnueabihf/libEGL_mesa.so.0  /usr/lib/arm-linux-gnueabihf/libEGL_mesa.so.0.0.0  /usr/lib/arm-linux-gnueabihf/libEGL.so.1  /usr/lib/arm-linux-gnueabihf/libEGL.so.1.1.0

However, I read again mesa, which seems not to be working with this project, right?

I also found that in recent versions of Raspbian I need to use
-lGLESv2 instead -lbrcmGLESv2
-lEGL instead -lbrcmEGL

Probably I am heavily messing with libraries in "bullseye" but as I don't know how it is meant to be, can you maybe check what to do under fresh installed Raspbian 11 optimally over SSH as I do not have a monitor connected usually)?

* failed to add service - already in use?

I'm sure it's something with my configuration, but I'm doing my darnedest to figure out what's going on here. If I try to compile my own OGLES-without-X stuff or use this example, this error is all I get when the executable runs. Any ideas of where to go or how to figure things out from here?

* failed to add service - already in use?

Running triangle_rpi4.c does not require HDMI connection

I'm running Buster on RPI4

Some info:

$ uname -a
Linux raspberrypi 5.4.51-v7l+ #1333 SMP Mon Aug 10 16:51:40 BST 2020 armv7l GNU/Linux
$ cat /proc/cpuinfo
...
Hardware	: BCM2711
Revision	: c03112
Model		: Raspberry Pi 4 Model B Rev 1.2

Steps followed:

  1. sudo apt-get install libegl1-mesa-dev libgbm-dev libgles2-mesa-dev libdrm-dev -y
  2. git clone https://github.com/matusnovak/rpi-opengl-without-x && cd rpi-opengl-without-x
  3. gcc -o triangle_rpi4 triangle_rpi4.c -ldrm -lgbm -lEGL -lGLESv2 -I/usr/include/libdrm -I/usr/include/GLES2
  4. Execute, no X server, no HDMI output connected.
$./triangle_rpi4 
resolution: 1680x720
Initialized EGL version: 1.4
GL Viewport size: 1680x720

PI4 support?

Hi! - I just saw, the pi4 support todo. Will it work on Pi4?

Double buffer issue

Thanks for sharing the RPI4 example - much appreciated!

The "gbmSwapBuffers" function uses two independent buffers. This is all clever as it prevents disturbance/flickering while preparing/rendering the next screen. The fact that these buffers are alternating however is also creating an issue. When only parts of a screen needs updating, you want to leave everything else untouched.

The way the two buffers are used cause the display to mix new and old content. Another approach is to make sure every refresh cycle starts with the latest content.

Do you see a way to make sure the background buffer used for rendering inherits whatever was displayed during the previous refresh/redraw cycle?

The examples below show how the display keeps alternating whenever I redraw the left part only. The right part is a leftover only present in one of the two buffers. It may seem obvious to just redraw everything, but this may not be trivial for applications that rely on buffer content being preserved.

image

image

Compiling Error on RPI 3

Hey,

please help me with this fault :)
I have done everything like in the description.

I get this error if i want to compile it on my RPI 3:

pi@raspberrypi:~ $ sudo gcc -c triangle.c -o triangle.o -I/opt/vc/include
triangle.c:7:1: error: expected identifier or ‘(’ before ‘<’ token

^
triangle.c:51:52: error: stray ‘\302’ in program

<title>rpi-opengl-without-x/triangle.c at master ?? matusnovak/rpi-opengl-without-x · GitHub</title> ^ triangle.c:51:53: error: stray ‘\267’ in program <title>rpi-opengl-without-x/triangle.c at master ?? matusnovak/rpi-opengl-without-x · GitHub</title> ^ triangle.c:51:87: error: stray ‘\302’ in program l-without-x/triangle.c at master · matusnovak/rpi-opengl-without-x ?? GitHub</title> ^

triangle.c:51:88: error: stray ‘\267’ in program
-without-x/triangle.c at master · matusnovak/rpi-opengl-without-x ?? GitHub</title>
^

triangle.c:91:44: warning: unknown escape sequence: '&'

triangle.c:91:44: warning: unknown escape sequence: '&'
triangle.c:91:44: warning: unknown escape sequence: '&'
triangle.c:91:44: warning: unknown escape sequence: '&'
triangle.c:91:44: warning: unknown escape sequence: '&'
triangle.c:91:44: warning: unknown escape sequence: '&'
triangle.c:91:44: warning: unknown escape sequence: '&'
triangle.c:91:44: warning: unknown escape sequence: '&'
triangle.c:91:44: warning: unknown escape sequence: '&'
triangle.c:91:44: warning: unknown escape sequence: '&'
triangle.c:91:44: warning: unknown escape sequence: '&'
triangle.c:91:44: warning: unknown escape sequence: '&'
triangle.c:91:44: warning: unknown escape sequence: '&'
triangle.c:91:44: warning: unknown escape sequence: '&'
triangle.c:91:44: warning: unknown escape sequence: '&'
triangle.c:91:44: warning: unknown escape sequence: '&'
triangle.c:91:44: warning: unknown escape sequence: '&'
triangle.c:91:44: warning: unknown escape sequence: '&'
triangle.c:169:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘<’ token

^
triangle.c:176:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘<’ token

^
triangle.c:202:275: error: expected identifier or ‘(’ before ‘<’ token
link-symbol float-right text-normal color-text-tertiary pr-3">→
^

triangle.c:204:251: error: expected identifier or ‘(’ before ‘<’ token
link-symbol float-right text-normal color-text-tertiary pr-3">→
^

triangle.c:205:262: error: expected identifier or ‘(’ before ‘<’ token
link-symbol float-right text-normal color-text-tertiary pr-3">→
^

triangle.c:206:268: error: expected identifier or ‘(’ before ‘<’ token
link-symbol float-right text-normal color-text-tertiary pr-3">→
^

triangle.c:207:264: error: expected identifier or ‘(’ before ‘<’ token
link-symbol float-right text-normal color-text-tertiary pr-3">→
^

triangle.c:208:264: error: expected identifier or ‘(’ before ‘<’ token
link-symbol float-right text-normal color-text-tertiary pr-3">→
^

triangle.c:209:271: error: expected identifier or ‘(’ before ‘<’ token
link-symbol float-right text-normal color-text-tertiary pr-3">→
^

triangle.c:210:285: error: expected identifier or ‘(’ before ‘<’ token
link-symbol float-right text-normal color-text-tertiary pr-3">→
^

triangle.c:211:272: error: expected identifier or ‘(’ before ‘<’ token
link-symbol float-right text-normal color-text-tertiary pr-3">→
^

triangle.c:215:323: error: expected identifier or ‘(’ before ‘<’ token
link-symbol float-right text-normal color-text-tertiary pr-3">→
^

triangle.c:216:339: error: expected identifier or ‘(’ before ‘<’ token
link-symbol float-right text-normal color-text-tertiary pr-3">→
^

triangle.c:239:307: error: expected identifier or ‘(’ before ‘<’ token
link-symbol float-right text-normal color-text-tertiary pr-3">→
^

triangle.c:244:299: error: expected identifier or ‘(’ before ‘<’ token
link-symbol float-right text-normal color-text-tertiary pr-3">→
^

triangle.c:245:316: error: expected identifier or ‘(’ before ‘<’ token
link-symbol float-right text-normal color-text-tertiary pr-3">→
^

triangle.c:246:305: error: expected identifier or ‘(’ before ‘<’ token
link-symbol float-right text-normal color-text-tertiary pr-3">→
^

triangle.c:247:327: error: expected identifier or ‘(’ before ‘<’ token
link-symbol float-right text-normal color-text-tertiary pr-3">→
^

triangle.c:248:340: error: expected identifier or ‘(’ before ‘<’ token
link-symbol float-right text-normal color-text-tertiary pr-3">→
^

triangle.c:253:279: error: expected identifier or ‘(’ before ‘<’ token
link-symbol float-right text-normal color-text-tertiary pr-3">→
^

triangle.c:254:317: error: expected identifier or ‘(’ before ‘<’ token
link-symbol float-right text-normal color-text-tertiary pr-3">→
^

triangle.c:255:334: error: expected identifier or ‘(’ before ‘<’ token
link-symbol float-right text-normal color-text-tertiary pr-3">→
^

triangle.c:256:340: error: expected identifier or ‘(’ before ‘<’ token
link-symbol float-right text-normal color-text-tertiary pr-3">→
^

triangle.c:257:349: error: expected identifier or ‘(’ before ‘<’ token
link-symbol float-right text-normal color-text-tertiary pr-3">→
^

triangle.c:277:270: error: expected identifier or ‘(’ before ‘<’ token
link-symbol float-right text-normal color-text-tertiary pr-3">→
^

triangle.c:280:333: error: expected identifier or ‘(’ before ‘<’ token
link-symbol float-right text-normal color-text-tertiary pr-3">→
^

triangle.c:281:343: error: expected identifier or ‘(’ before ‘<’ token
link-symbol float-right text-normal color-text-tertiary pr-3">→
^

triangle.c:285:343: error: expected identifier or ‘(’ before ‘<’ token
link-symbol float-right text-normal color-text-tertiary pr-3">→
^

triangle.c:303:10: warning: missing terminating ' character


^
triangle.c:303:10: error: missing terminating ' character

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
triangle.c:350:75: error: stray ‘\342’ in program
???
^

triangle.c:350:76: error: stray ‘\206’ in program
???
^

triangle.c:350:77: error: stray ‘\265’ in program
??
^

triangle.c:355:56: error: stray ‘\342’ in program
???
^
triangle.c:355:57: error: stray ‘\206’ in program
???
^
triangle.c:355:58: error: stray ‘\265’ in program
??
^
triangle.c:391:75: error: stray ‘\342’ in program
???
^

triangle.c:391:76: error: stray ‘\206’ in program
???
^

triangle.c:391:77: error: stray ‘\265’ in program
??
^

triangle.c:396:56: error: stray ‘\342’ in program
???
^
triangle.c:396:57: error: stray ‘\206’ in program
???
^
triangle.c:396:58: error: stray ‘\265’ in program
??
^
triangle.c:423:75: error: stray ‘\342’ in program
???
^

triangle.c:423:76: error: stray ‘\206’ in program
???
^

triangle.c:423:77: error: stray ‘\265’ in program
??
^

triangle.c:428:56: error: stray ‘\342’ in program
???
^
triangle.c:428:57: error: stray ‘\206’ in program
???
^
triangle.c:428:58: error: stray ‘\265’ in program
??
^
triangle.c:455:75: error: stray ‘\342’ in program
???
^

triangle.c:455:76: error: stray ‘\206’ in program
???
^

triangle.c:455:77: error: stray ‘\265’ in program
??
^

triangle.c:460:56: error: stray ‘\342’ in program
???
^
triangle.c:460:57: error: stray ‘\206’ in program
???
^
triangle.c:460:58: error: stray ‘\265’ in program
??
^
triangle.c:519:25: error: expected identifier or ‘(’ before ‘<’ token

{{ message }}

^
triangle.c:712:50: error: invalid suffix "f68d0d9ae15f0b54b3bdb6b92e35971d3c6d6527745ee6e71ee3fb1" on floating constant

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
triangle.c:758:25: warning: missing terminating " character
data-action="
^
triangle.c:758:25: error: missing terminating " character
triangle.c:759:41: error: stray ‘#’ in program
input-entered:ref-selector#inputEntered
^
triangle.c:760:40: error: stray ‘#’ in program
tab-selected:ref-selector#tabSelected
^
triangle.c:761:38: error: stray ‘#’ in program
focus-list:ref-selector#focusFirstListMember
^
triangle.c:762:13: warning: missing terminating " character
"
^
triangle.c:762:13: error: missing terminating " character
triangle.c:775:80: warning: missing terminating ' character

                                                                 ^

triangle.c:775:80: error: missing terminating ' character

                                                                 ^~~~~~~~~~~~~~~~~~~~

triangle.c:788:109: error: expected identifier or ‘(’ before ‘<’ token
css-truncate css-truncate-overflow {{ isFilteringClass }}">{{ refName }}
^

triangle.c:800:25: warning: missing terminating " character
data-action="
^
triangle.c:800:25: error: missing terminating " character
triangle.c:801:41: error: stray ‘#’ in program
input-entered:ref-selector#inputEntered
^
triangle.c:802:40: error: stray ‘#’ in program
tab-selected:ref-selector#tabSelected
^
triangle.c:803:38: error: stray ‘#’ in program
focus-list:ref-selector#focusFirstListMember
^
triangle.c:804:13: warning: missing terminating " character
"
^
triangle.c:804:13: error: missing terminating " character
triangle.c:820:109: error: expected identifier or ‘(’ before ‘<’ token
css-truncate css-truncate-overflow {{ isFilteringClass }}">{{ refName }}
^

triangle.c:902:43: warning: missing terminating " character
<a data-pjax="true" title="Added Raspberry Pi 4 example
^
triangle.c:902:43: error: missing terminating " character
<a data-pjax="true" title="Added Raspberry Pi 4 example
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
triangle.c:904:133: warning: missing terminating " character
rpi-opengl-without-x/commit/c04a155601184c0bf14901dca2f89d6a96cac519">Added Raspberry Pi 4 example
^

triangle.c:904:133: error: missing terminating " character
rpi-opengl-without-x/commit/c04a155601184c0bf14901dca2f89d6a96cac519">Added Raspberry Pi 4 example
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

triangle.c:909:111: error: expected identifier or ‘(’ before ‘<’ token
s="ellipsis-expander js-details-target" aria-expanded="false">…
^

triangle.c:973:16: warning: missing terminating " character
<div class="Box mt-3 position-relative
^
triangle.c:973:16: error: missing terminating " character
<div class="Box mt-3 position-relative
^~~~~~~~~~~~~~~~~~~~~~~~~~~
triangle.c:974:7: warning: missing terminating " character
">
^
triangle.c:974:7: error: missing terminating " character
">
^~
triangle.c:1019:69: error: stray ‘#’ in program
#include <EGL/egl.h>
^
triangle.c:1019:148: error: expected identifier or ‘(’ before ‘<’ token
s="pl-k">include <EGL/egl.h>
^

triangle.c:1019:189: error: expected identifier or ‘(’ before ‘<’ token
"><EGL/egl.h>
^

triangle.c:1023:69: error: stray ‘#’ in program
#include <GLES2/gl2.h>
^
triangle.c:1023:148: error: expected identifier or ‘(’ before ‘<’ token
s="pl-k">include <GLES2/gl2.h>
^

triangle.c:1023:191: error: expected identifier or ‘(’ before ‘<’ token
<GLES2/gl2.h>
^

triangle.c:1027:69: error: stray ‘#’ in program
#include <stdio.h>
^
triangle.c:1027:148: error: expected identifier or ‘(’ before ‘<’ token
s="pl-k">include <stdio.h>
^

triangle.c:1027:187: error: expected identifier or ‘(’ before ‘<’ token
-s"><stdio.h>
^

triangle.c:1031:69: error: stray ‘#’ in program
#include <stdlib.h>
^
triangle.c:1031:148: error: expected identifier or ‘(’ before ‘<’ token
s="pl-k">include <stdlib.h>
^

triangle.c:1031:188: error: expected identifier or ‘(’ before ‘<’ token
s"><stdlib.h>
^

triangle.c:1035:69: error: stray ‘#’ in program
#include <unistd.h>
^
triangle.c:1035:148: error: expected identifier or ‘(’ before ‘<’ token
s="pl-k">include <unistd.h>
^

triangle.c:1035:188: error: expected identifier or ‘(’ before ‘<’ token
s"><unistd.h>
^

triangle.c:1091:125: error: expected identifier or ‘(’ before ‘<’ token
nner js-file-line"> EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_NONE};
^

triangle.c:1128:72: error: expected identifier or ‘(’ before ‘<’ token
};
^
triangle.c:1141:120: error: expected identifier or ‘(’ before ‘<’ token
ode-inner js-file-line"> EGL_NONE};
^

triangle.c:1162:124: error: invalid suffix "f" on integer constant
js-file-line"> -1.0f,
^~

triangle.c:1166:124: error: invalid suffix "f" on integer constant
js-file-line"> -1.0f,
^~

triangle.c:1170:123: error: invalid suffix "f" on integer constant
js-file-line"> 0.0f,
^~

triangle.c:1174:123: error: invalid suffix "f" on integer constant
js-file-line"> 1.0f,
^~

triangle.c:1178:124: error: invalid suffix "f" on integer constant
js-file-line"> -1.0f,
^~

triangle.c:1182:123: error: invalid suffix "f" on integer constant
js-file-line"> 0.0f,
^~

triangle.c:1186:123: error: invalid suffix "f" on integer constant
js-file-line"> 0.0f,
^~

triangle.c:1190:123: error: invalid suffix "f" on integer constant
js-file-line"> 1.0f,
^~

triangle.c:1194:123: error: invalid suffix "f" on integer constant
js-file-line"> 0.0f,
^~

triangle.c:1198:72: error: expected identifier or ‘(’ before ‘<’ token
};
^
triangle.c:1211:70: error: stray ‘#’ in program
#define STRINGIFY(x) #x
^

triangle.c:1211:170: error: stray ‘#’ in program
span> STRINGIFY(x) #x
^

triangle.c:1219:94: error: expected identifier or ‘(’ before ‘<’ token
ss="blob-code blob-code-inner js-file-line"> attribute vec3 pos; void main() { gl_Position = vec4(pos, 1.0); });
^

triangle.c:1219:246: error: expected identifier or ‘(’ before ‘)’ token
vec4(pos, 1.0); });
^

triangle.c:1219:248: error: expected identifier or ‘(’ before ‘<’ token
vec4(pos, 1.0); });
^

triangle.c:1232:131: error: expected identifier or ‘(’ before ‘<’ token
-line"> STRINGIFY(uniform vec4 color; void main() { gl_FragColor = vec4(color); });
^

triangle.c:1232:254: error: expected identifier or ‘(’ before ‘)’ token
main() { gl_FragColor = vec4(color); });
^

triangle.c:1232:256: error: expected identifier or ‘(’ before ‘<’ token
main() { gl_FragColor = vec4(color); });
^

triangle.c:1445:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
triangle.c:1495:259: error: stray ‘\’ in program
L display! Error: %s\n",
^

triangle.c:1524:259: error: stray ‘\’ in program
L version! Error: %s\n",
^

triangle.c:1549:267: error: stray ‘\’ in program
"pl-c1">%d.%d\n", major, minor);
^

triangle.c:1574:258: error: stray ‘\’ in program
GL config! Error: %s\n",
^

triangle.c:1615:262: error: stray ‘\’ in program
L surface! Error: %s\n",
^

triangle.c:1665:262: error: stray ‘\’ in program
L context! Error: %s\n",
^

triangle.c:1774:260: error: stray ‘\’ in program
"pl-c1">%dx%d\n", viewport[2], viewport[3]);
^

triangle.c:1803:189: error: stray ‘\’ in program
lass="pl-pds">"EGL might be faulty!\n");
^

triangle.c:1820:164: error: invalid suffix "f" on integer constant
lClearColor(0.0f, 0.0f, 0.0f, 1.0f);
^~

triangle.c:1820:224: error: invalid suffix "f" on integer constant
"pl-c1">0f, 0.0f, 0.0f, 1.0f);
^~

triangle.c:1820:284: error: invalid suffix "f" on integer constant
"pl-c1">0f, 0.0f, 1.0f);
^~

triangle.c:1820:344: error: invalid suffix "f" on integer constant
"pl-c1">0f, 1.0f);
^~

triangle.c:1948:205: error: invalid suffix "f" on integer constant
pl-c1">1.0, 0.0f, 0.5, 1.0);
^~

triangle.c:2069:241: error: stray ‘\’ in program
n>Failed to open file triangle.raw for writing!\n");
^

triangle.c:2115:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
triangle.c:2150:12: warning: missing terminating ' character


^
triangle.c:2150:12: error: missing terminating ' character

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
triangle.c:2173:39: error: expected identifier or ‘(’ before numeric constant
  • © 2021 GitHub, Inc.

  • ^~~~
    triangle.c:2207:12: error: stray ‘\342’ in program
    You can???t perform that action at this time.
    ^
    triangle.c:2207:13: error: stray ‘\200’ in program
    You can???t perform that action at this time.
    ^
    triangle.c:2207:14: error: stray ‘\231’ in program
    You can??t perform that action at this time.

    "Unable to get connector" when using a Pi Compute Module 4

    It appears that the resources->count_connectors is 0 in my case. Perhaps I have something configured incorrectly, but I suspect that this is because I do not have an HDMI connector on the host board (this is intentionally designed as a headless board).

    It appears that the connector is used to find the encoder, which is used to get the Crtc (whatever that is) which appears to be used to change buffers in other places.

    Technically I don't even need display buffer or to render anything, I'm just trying to run an OpenGL ES Compute Shader, but I figured this would be a good place to start in terms of getting GL running headless. I'm going to try to remove all the display buffer related code and get a compute shader running; does anyone know if that should work?

    [click click click]

    Okay, with removing all that, I appear to have gotten it to run through creating an EGLContext. I'm not certain, yet, but that might be all I need to proceed to compiling and running a compute shader.

    Alterations to the code to generate animations?

    Hi,
    So this isn't an issue with your code, and I know this project is old, but I thought it couldn't hurt to ask. I'm trying to alter your code to animate a shader. Ignoring the shader stuff, if I follow your code, I can call gbmSwapBuffers and see your lovely triangle on the screen:

            glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
            glDrawArrays(GL_TRIANGLES, 0, 3);
            gbmSwapBuffers(&display, &surface);
            sleep(1);

    However, if I put that code within a for loop, even one that only runs once, I get nothing on the screen

    for (int q = 0; q < 1; q++) {
            glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
            glDrawArrays(GL_TRIANGLES, 0, 3);
            gbmSwapBuffers(&display, &surface);
            sleep(1);
    }

    Does that make any sense to you?

    Recommend Projects

    • React photo React

      A declarative, efficient, and flexible JavaScript library for building user interfaces.

    • Vue.js photo Vue.js

      🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

    • Typescript photo Typescript

      TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    • TensorFlow photo TensorFlow

      An Open Source Machine Learning Framework for Everyone

    • Django photo Django

      The Web framework for perfectionists with deadlines.

    • D3 photo D3

      Bring data to life with SVG, Canvas and HTML. 📊📈🎉

    Recommend Topics

    • javascript

      JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

    • web

      Some thing interesting about web. New door for the world.

    • server

      A server is a program made to process requests and deliver data to clients.

    • Machine learning

      Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

    • Game

      Some thing interesting about game, make everyone happy.

    Recommend Org

    • Facebook photo Facebook

      We are working to build community through open source technology. NB: members must have two-factor auth.

    • Microsoft photo Microsoft

      Open source projects and samples from Microsoft.

    • Google photo Google

      Google ❤️ Open Source for everyone.

    • D3 photo D3

      Data-Driven Documents codes.