Quantcast
Channel: arm - openFrameworks
Viewing all articles
Browse latest Browse all 147

ofxDOF in Rpi4 Raspberry

$
0
0

Hi! I just managed to run shaders in raspberry 4 by changing the version to gles 2 in the main.cpp. Now I am trying to run a depth of field effect in the Rpi with the ofxDOF addon. Anybody knows how to do it, as the addon will not run in raspberry.

I got this error

/home/pi/openFrameworks/addons/ofxDOF/src/ofxDOF.cpp:25:61: error: ‘GL_TEXTURE_RECTANGLE_ARB’ was not declared in this scope
     dofBuffersSettings.textureTarget = ofGetUsingArbTex() ? GL_TEXTURE_RECTANGLE_ARB : GL_TEXTURE_2D;
 ^~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/openFrameworks/addons/ofxDOF/src/ofxDOF.cpp:25:61: note: suggested alternative: ‘GL_TEXTURE_EXTERNAL_OES’
     dofBuffersSettings.textureTarget = ofGetUsingArbTex() ? GL_TEXTURE_RECTANGLE_ARB : GL_TEXTURE_2D;
 ^~~~~~~~~~~~~~~~~~~~~~~~
 GL_TEXTURE_EXTERNAL_OES

So I went to the ofxDOF.cpp and changed GL_TEXTURE_RECTANGLE_ARB by GL_TEXTURE_EXTERNAL_OES, and it compiled, but it reports several errors on the shader:

[ error ] ofShader: GL_VERTEX_SHADER shader reports:
0:1(10): error: GLSL 1.50 is not supported. Supported versions are: 1.00 ES, 3.00 ES, and 3.10 ES

[ error ] ofShader: GL_VERTEX_SHADER, offending line 10 :
	    8	
	    9	// App uniforms and attributes
	   10	out vec4 vColor;
	   11	out vec2 vTexCoord;
	   12	

[ error ] ofShader: setupShaderFromSource(): GL_FRAGMENT_SHADER shader failed to compile
[ error ] ofShader: GL_FRAGMENT_SHADER shader reports:
0:1(10): error: GLSL 1.50 is not supported. Supported versions are: 1.00 ES, 3.00 ES, and 3.10 ES

[ error ] ofShader: GL_FRAGMENT_SHADER, offending line 10 :
	    8	uniform sampler2DRect range;
	    9	uniform vec2 sampleOffset;
	   10	uniform float focalDistance;
	   11	uniform float focalRange;
	   12	

[ error ] ofShader: checkProgramLinkStatus(): program failed to link
[ error ] ofShader: ofShader: program reports:
error: linking with uncompiled/unspecialized shadererror: linking with uncompiled/unspecialized shader
[ error ] ofShader: setupShaderFromSource(): GL_VERTEX_SHADER shader failed to compile
[ error ] ofShader: GL_VERTEX_SHADER shader reports:
0:1(10): error: GLSL 1.50 is not supported. Supported versions are: 1.00 ES, 3.00 ES, and 3.10 ES

[ error ] ofShader: GL_VERTEX_SHADER, offending line 10 :
	    8	in vec2 texcoord;
	    9	
	   10	// App uniforms and attributes
	   11	out vec4 vColor;
	   12	out vec2 vTexCoord;

[ error ] ofShader: setupShaderFromSource(): GL_FRAGMENT_SHADER shader failed to compile
[ error ] ofShader: GL_FRAGMENT_SHADER shader reports:
0:1(10): error: GLSL 1.50 is not supported. Supported versions are: 1.00 ES, 3.00 ES, and 3.10 ES

[ error ] ofShader: GL_FRAGMENT_SHADER, offending line 10 :
	    8	uniform float focalRange;
	    9	
	   10	in vec4 vColor;
	   11	in vec2 vTexCoord;
	   12	

[ error ] ofShader: checkProgramLinkStatus(): program failed to link
[ error ] ofShader: ofShader: program reports:
error: linking with uncompiled/unspecialized shadererror: linking with uncompiled/unspecialized shader
[ error ] ofFbo: getDepthTexture(): frame buffer object 1 not allocated with depthStencilAsTexture

If anybody knows what should I do to make it work, would be very cool. :slight_smile:

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 147

Trending Articles