User avatar
Maytrene
Posts: 1
Joined: Fri Oct 18, 2013 2:37 pm

GLES problems (probably trivial)

Fri Oct 18, 2013 3:07 pm

Hi, I'm extremely new here, but that's not important.

I've been playing around with my new RasPi, and I want to start properly playing around with OpenGLES, although I've hit a wall embarrassingly early.

I opened the 'hello triangle' example, and I've read through most of it. Now I'm trying to write a simple program which will just open a plane to just draw something on, a simple triangle. From what I understand, EGL is the plane I need to draw things on, and in triangle.c, there are the EGL/GLES include commands. Makes sense.

I make a new C file in Geany, include all of what the triangle.c file includes, and it says that I'm missing bcm_host.h, GLES/gl.h, EGL/egl.h and EGL/eglext.h. This confuses me though, there aren't any files in the hello_triangle folder with those names, and yet it works when I use 'make' in the terminal. I am awfully confused here, and I'm almost certain this is a very trivial issue, where I'm just misunderstanding something completely.

tldr; trying to make a tiny 'draw a triangle' program using GLES in Geany, and it's complaining about not being able to find the .h files, and I'm sure I'm assuming something quite incorrect here. Please tell me what I'm dong wrong.

Code: Select all

May*

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5502
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: GLES problems (probably trivial)

Fri Oct 18, 2013 5:01 pm

You are missing the include path. Look at:
/opt/vc/src/hello_pi/Makefile.include

Code: Select all

INCLUDES+=-I$(SDKSTAGE)/opt/vc/include/ -I$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads -I$(SDKSTAGE)/opt/vc/include/interface/vmcs_host/linux -I./ -I../libs/ilclient -I../libs/vgfont
and that gets included in the compile command line.

Return to “OpenGLES”