Go to advanced search

by Pablo Walters
Mon May 13, 2019 6:20 pm
Forum: OpenGLES
Topic: Is there a way to use gl_InstanceID in shaders?
Replies: 4
Views: 2077

Re: Is there a way to use gl_InstanceID in shaders?

I got it working by adding this to the shaders!

#extension GL_ARB_draw_instanced : enable
#define gl_InstanceID gl_InstanceIDEXT
by Pablo Walters
Sun May 12, 2019 1:46 am
Forum: OpenGLES
Topic: Is there a way to use gl_InstanceID in shaders?
Replies: 4
Views: 2077

Is there a way to use gl_InstanceID in shaders?

I'd like to do instanced drawing like I do on iOS and OSX.

But neither

gl_InstanceID

nor

gl_InstanceIDEXT

are defined when compiling OpenGL ES shaders.

Is there a way to make this work on PI?
by Pablo Walters
Fri Sep 21, 2018 2:46 am
Forum: Troubleshooting
Topic: How to slow down mouse under X windows.
Replies: 2
Views: 455

Re: How to slow down mouse under X windows.

You can install xinput like this:

% sudo apt-get install xinput

I ended up doing this to slow the mouse down by a factor of 0.2.

% xinput -set-prop 7 130 0.200000 0.000000 0.000000 0.000000 0.200000 0.000000 0.000000 0.000000 1.000000

Thanks for the suggesting of using xinput.
by Pablo Walters
Sun Sep 16, 2018 8:14 pm
Forum: Troubleshooting
Topic: How to slow down mouse under X windows.
Replies: 2
Views: 455

How to slow down mouse under X windows.

The cursor is moving far too fast for me. Under X windows on an HD display, I've tried 3 different mice, and for all of them, moving the mouse 4cm left to right moves the cursor all the way cross the screen. I tried using the Preferences/Mouse and Keyboard Settings to slow the mouse down, but the co...
by Pablo Walters
Sun Sep 16, 2018 2:33 am
Forum: OpenGLES
Topic: Has anyone been able to get glfw running?
Replies: 21
Views: 9920

Re: Has anyone been able to get glfw running?

FYI - The source file glad.c in the GLFW distribution does not load functions to support VertexArrays, Framebuffers and Renderbuffers, etc. I added a these to glad.c to make them work: diff glad.c.orig glad.c 1402a1403,1428 > > glad_glIsRenderbuffer = (PFNGLISRENDERBUFFERPROC)load("glIsRenderbuffer"...
by Pablo Walters
Mon Sep 10, 2018 1:33 am
Forum: OpenGLES
Topic: Has anyone been able to get glfw running?
Replies: 21
Views: 9920

Re: Has anyone been able to get glfw running?

RaspPIglfw.JPG I got glfw working on Raspberry PI using rpiMike's suggestion! Here's the full sequence of things you have to do. 1. Select "GL Driver, Full KMS" by running raspi-config sudo raspi-config (Select Advanced Options, GL Driver, Full KMS. Then reboot) 2. download zip of glfw from github ...
by Pablo Walters
Sun Sep 09, 2018 5:45 am
Forum: OpenGLES
Topic: Has anyone been able to get glfw running?
Replies: 21
Views: 9920

Re: Has anyone been able to get glfw running?

That sounds great. I enabled GL Driver, Full KMS, and restarted.

Are there any simple examples that show how to compile a simple

c application using glfw on Raspberry PI?


I downloaded glfw from github and when I tried "cmake ." it failed with

a message that RandR headers were not found.
by Pablo Walters
Sun Sep 09, 2018 3:47 am
Forum: OpenGLES
Topic: Has anyone been able to get glfw running?
Replies: 21
Views: 9920

Has anyone been able to get glfw running?

I'd like to use OpenGL under X windows.
by Pablo Walters
Sat Dec 03, 2016 4:35 am
Forum: C/C++
Topic: Where to report c compiler bug?
Replies: 12
Views: 1759

Re: Where to report c compiler bug?

Thanks for this explanation - appreciate it. I was just surprised that my C code did not work on Raspoberry PI. This is from a polygon scan converter I've used for 20 years without any problem on SGI, PC, OSX, iOS and Android. I agree this is a very very bad way to write C. Always happy to learn som...
by Pablo Walters
Fri Dec 02, 2016 1:09 pm
Forum: C/C++
Topic: Where to report c compiler bug?
Replies: 12
Views: 1759

Re: Where to report c compiler bug?

You're right - this is some sketchy C that I used to use in the old days.

I'll avoid this construct in future.
by Pablo Walters
Fri Dec 02, 2016 11:15 am
Forum: C/C++
Topic: Where to report c compiler bug?
Replies: 12
Views: 1759

Where to report c compiler bug?

The bug only appears when compiling -O2 or -O3. It runs perfectly if optimization is off. C source: #include "stdio.h" typedef struct poly { struct poly *next; int v0; int v1; int v2; } poly; int main(int argc, char **argv) { poly *span, *active; span = (poly *)&active; span->next = 0; while(span->n...
by Pablo Walters
Thu Dec 01, 2016 1:33 pm
Forum: General programming discussion
Topic: How can I package an application for distribution?
Replies: 19
Views: 2447

Re: How can I package an application for distribution?

Thanks for all the help! I got it all working fine. Here's a github

repository with the project.

https://github.com/PaulHaeberli/EnvMap3d-Raspberry-PI

I hope to make the source code for this available soon.

Also working on making it work with the desktop GL driver turned on.
by Pablo Walters
Wed Nov 30, 2016 3:38 pm
Forum: General programming discussion
Topic: How can I package an application for distribution?
Replies: 19
Views: 2447

Re: How can I package an application for distribution?

If I install my application binaries in /usr/bin or /usr/local/bin, where
is a good place to install bitmap images and other resources the app
needs?

Should I compile all that data into the app, or can I install a directory
somewhere with the data?
by Pablo Walters
Wed Nov 30, 2016 11:31 am
Forum: General programming discussion
Topic: How can I package an application for distribution?
Replies: 19
Views: 2447

Re: How can I package an application for distribution?

Ok. I''ll install the app in /opt and make a temp directory in /tmp/ with the name of the app in it. What's the best way of adding my app directory to the PATH when installing? How can I make an icon for the app and install that in the right place for the window manager? Is there a way to automatica...
by Pablo Walters
Tue Nov 29, 2016 4:18 pm
Forum: General programming discussion
Topic: How can I package an application for distribution?
Replies: 19
Views: 2447

Re: How can I package an application for distribution?

Where is a good place to write application specific temp data?

For iOS, OSX, and adroid apps there is a nice sand boxed temp directory
associated with each app.
by Pablo Walters
Tue Nov 29, 2016 10:37 am
Forum: General programming discussion
Topic: How can I package an application for distribution?
Replies: 19
Views: 2447

How can I package an application for distribution?

I want to make it easy for users to install my app with an icon, resources, and execuable. This is a small graphics app that uses OpenGL and runs in an X window.
by Pablo Walters
Tue Nov 29, 2016 4:14 am
Forum: OpenGLES
Topic: Why the obsession with OpenGL?
Replies: 9
Views: 6986

Re: Why the obsession with OpenGL?

And the desktop's windows are moved, resized etc faster now. Because this new driver provides HW accelerated X11 2D support (AFAIK this is called Glamor on Linux?) and HW accelerated 3D via OpenGL. So the Pi²'s user experience is visibly better now, with the plain desktop and with 3D apps like Blen...
by Pablo Walters
Tue Nov 29, 2016 4:05 am
Forum: OpenGLES
Topic: What is the best way to do full screen OpenGL?
Replies: 2
Views: 2910

What is the best way to do full screen OpenGL?

I'd like to do fullscreen OpenGL but also have mouse input and a visible tracking cursor. What's the bast way to do this?

Thanks for any hints.
by Pablo Walters
Sun Nov 27, 2016 6:25 am
Forum: General discussion
Topic: X11 EGL on the Raspberry Pi
Replies: 74
Views: 15849

Re: X11 EGL on the Raspberry Pi

I just made this work again for Raspberry PI 3 Model B

It is a nice simple way to get OpenGLES2.0 running inside
a window when running PIXEL on RPI 3 Model B

https://github.com/PaulHaeberli/pi-eglonx
by Pablo Walters
Sun Nov 27, 2016 6:24 am
Forum: Graphics programming
Topic: Windowed OpenGLES sample
Replies: 3
Views: 2932

Re: Windowed OpenGLES sample

I just made this work again for Raspberry PI 3 Model B

It is a nice simple way to get OpenGLES2.0 running inside
a window when running PIXEL on RPI 3 Model B

https://github.com/PaulHaeberli/pi-eglonx

Go to advanced search