Shader version raspberry pi 2?

Hello,

I just get an RPi 2 on which i installed Raspbian Jessie + oF 084

I built a project involving some shaders. Build seems ok. But when i run it it keeps complaining about #version which is not good and fails to load the shader. App starts but only a black screen.

i have the following line on the very top of the vertex shader :

 #version 150

thank you

Hi,

The Raspberry Pi runs OpenGL ES shaders, rather than desktop OpenGL.

Me and @jvcleave put together a workshop using OF on the Raspberry Pi a while back, might help you get started:

OK.
I deleted the version line and i don’t have this error any more but i still have the black screen problem with other problems.

Sorry i am really a noob about anything dealing with shaders and armv7

Here is the console log when running make run

armv7l
checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gtk+-3.0 
[warning] ofAppEGLWindow: init(): X11 not availble on RPI yet, using a native window instead
[notice ] ofAppEGLWindow: setupRPiNativeWindow(): screenRect: 1280x1024
[notice ] ofAppEGLWindow: setupRPiNativeWindow(): windowRect: 1280x720
[notice ] ofAppEGLWindow: createSurface(): setting up EGL Display
[notice ] ofAppEGLWindow: createSurface(): EGL Display correctly set
[notice ] ofAppEGLWindow: createSurface(): current renderer type: ProgrammableGL
[notice ] ofAppEGLWindow: createSurface(): GLES2 renderer detected
[notice ] ofAppEGLWindow: createSurface(): surface created correctly
[notice ] ofAppEGLWindow: createSurface(): API bound correctly
[notice ] ofAppEGLWindow: createSurface(): -----EGL-----
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION_MAJOR = 1
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION_MINOR = 4
[notice ] ofAppEGLWindow: createSurface(): EGL_CLIENT_APIS = OpenGL_ES OpenVG
[notice ] ofAppEGLWindow: createSurface(): EGL_VENDOR = Broadcom
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION = 1.4
[notice ] ofAppEGLWindow: createSurface(): EGL_EXTENSIONS = EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_vg_parent_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_lock_surface 
[notice ] ofAppEGLWindow: createSurface(): GL_RENDERER = VideoCore IV HW
[notice ] ofAppEGLWindow: createSurface(): GL_VERSION  = OpenGL ES 2.0
[notice ] ofAppEGLWindow: createSurface(): GL_VENDOR   = Broadcom
[notice ] ofAppEGLWindow: createSurface(): -------------
[ error ] ofShader: begin(): couldn't begin, shader not loaded
[ error ] ofShader: begin(): couldn't begin, shader not loaded
[ error ] ofShader: begin(): couldn't begin, shader not loaded
[ error ] ofShader: begin(): couldn't begin, shader not loaded
[notice ] ofAppEGLWindow: setupPeripherals(): peripheral setup complete
[notice ] ofAppEGLWindow: setupNativeUDev(): created udev object
[notice ] ofAppEGLWindow: setupMouse(): mouse_fd= 5 devicePath=/dev/input/by-path/platform-3f980000.usb-usb-0:1.4.3:1.0-event-mouse
[notice ] ofAppEGLWindow: setupMouse(): mouse device name = Logitech USB Optical Mouse
[notice ] ofAppEGLWindow: setupKeyboard(): keyboard_fd= 6 devicePath=/dev/input/by-path/platform-3f980000.usb-usb-0:1.4.2:1.0-event-kbd
[notice ] ofAppEGLWindow: setupKeyboard(): keyboard device name = Apple, Inc Apple Keyboard
[notice ] ofAppEGLWindow: setupPeripherals(): native event setup complete
[notice ] ofAppEGLWindow: setupOpenGL(): peripheral setup complete
[warning] ofShader: GL_VERTEX_SHADER shader reports:
Compiled
[warning] ofShader: GL_FRAGMENT_SHADER shader reports:
Compiled
[notice ] ofAppEGLWindow: runAppViaInfiniteLoop(): entering infinite loop
[warning] ofFbo: allocate(): multisampling not supported in OpenGL ES
[ error ] ofFbo: FRAMEBUFFER_INCOMPLETE_ATTACHMENT
glGetError 0x500
[warning] ofShader: GL_VERTEX_SHADER shader reports:
Compiled
[warning] ofShader: GL_FRAGMENT_SHADER shader reports:
Compiled
[ error ] ofShader: checkProgramLinkStatus(): program failed to link
[ error ] ofShader: program reports:
ERROR:LEX/PARSE-1 (vertex shader, line 6) Syntax error
[notice ] ofAppEGLWindow: runAppViaInfiniteLoop(): setting up notifications complete
[notice ] ofAppEGLWindow: destroyNativeKeyboard()
[notice ] ofAppEGLWindow: destroySurface(): destroying EGL surface

my fragment shader

    uniform sampler2D tex;
    
    in vec4 colorVarying;
    
    out vec4 fragColor;
    
    void main (void) {
    	gl_fragColor = texture(tex, gl_PointCoord) * colorVarying;

}

and the vertex shader

uniform mat4 projectionMatrix;
uniform mat4 modelViewMatrix;
uniform mat4 textureMatrix;
uniform mat4 modelViewProjectionMatrix;

in vec4  position;
in vec2  texcoord;
in vec4  color;
in vec3  normal;

out vec4 colorVarying;
out vec2 texCoordVarying;
out vec4 normalVarying;

void main()
{
	colorVarying = color;
	texCoordVarying = (textureMatrix*vec4(texcoord.x,texcoord.y,0,1)).xy;
	gl_Position = modelViewProjectionMatrix * position;
}

thanks