openframeworks / openframeworks/openFrameworks

Shader demos need modification for Raspberry Pi

Open
#5,056 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

close
Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

I'm using OpenFrameworks v0.9.3 on a Raspberry Pi 3, and the shader examples don't work out of the box, failing with the following message:

[ error ] ofShader: sorry, it looks like you can't run 'ARB_shader_objects'
[ error ] ofShader: please check the capabilites of your graphics card: http://www.ozone3d.net/gpu_caps_viewer
[ error ] ofShader: setupShaderFromSource(): failed creating GL_VERTEX_SHADER shader
[ error ] ofShader: sorry, it looks like you can't run 'ARB_shader_objects'
[ error ] ofShader: please check the capabilites of your graphics card: http://www.ozone3d.net/gpu_caps_viewer
[ error ] ofShader: setupShaderFromSource(): failed creating GL_FRAGMENT_SHADER shader
[ error ] ofShader: linkProgram(): trying to link GLSL program, but no shaders created yet

However, this is easily resolved by modifying the following two lines of main.cpp

        ofGLWindowSettings settings;
        settings.setGLVersion(3,2);

to

        ofGLESWindowSettings settings;
        settings.glesVersion = 2;

Should be an easy enough fix, with appropriate $#ifdefs. I'm happy to try my hand at a PR.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the shader examples' main.cpp and inspect how the window settings are selected for Raspberry Pi. Check the platform-specific configuration and verify the shader demos on a Raspberry Pi 3; done means they create and link their shaders without the reported ARB_shader_objects errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, raspberry-pi
Domain
computer-graphics, embedded-iot
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.