Part Number:AM4379
Tool/software: Linux
Hi forum,
I am using am437xgpevm and i am trying to render a simple rectangle using sitara sdk.
#include<GLES/gl.h> #include <GLES/glplatform.h> void colored_rect(GLfloat left, GLfloat bottom, GLfloat right, GLfloat top, GLfloat R, GLfloat G, GLfloat B) { GLfloat rect[] = { left, bottom, right, bottom, right, top, left, top }; glEnableClientState(GL_VERTEX_ARRAY); glColor3f(R,G,B); glVertexPointer(2, GL_FLOAT, 0, rect); glDrawArrays(GL_TRIANGLE_FAN, 0, 4); } void main(){ colored_rect(0,50,150,0,255,0,0); }
I can see that the libraries are in the header files specfied but when i compile i get the following errors.
10:22:39 **** Incremental Build of configuration Debug for project gles **** make all Building target: gles Invoking: Cross GCC Linker arm-linux-gnueabihf-gcc -o "gles" ./main.o ./main.o: In function `colored_rect': /home/alpha/workspace_v6_2/gles/Debug/../main.c:18: undefined reference to `glEnableClientState' /home/alpha/workspace_v6_2/gles/Debug/../main.c:19: undefined reference to `glColor3f' /home/alpha/workspace_v6_2/gles/Debug/../main.c:20: undefined reference to `glVertexPointer' /home/alpha/workspace_v6_2/gles/Debug/../main.c:21: undefined reference to `glDrawArrays' collect2: error: ld returned 1 exit status make: *** [gles] Error 1
Any help would be appreciated or am i missing something here ?
Regards
-Parker