0

I am using Open GL ES 3.1 in Android app with native C++ code. So I need to run a C++ lib with Android support.

I have used some Open GL ES functions and they worked well. But when I tried to use glDispatchCompute, a linker gave a following error: undefined reference to 'glDispatchCompute'.

Here is the call:

glDispatchCompute(10, 1, 1);

Here are my includes:

#include <string>
#include <jni.h>
#include <GLES3/gl31.h>
#include <GLES/egl.h>
#include <GLES/gl.h>
#include <GLES3/gl3ext.h> 
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

Here are my options for clang:

-lGLESv3 -lGLESv2 -lGLESv1_CM -lEGL

Also I tried -lGLESv3 -lEGL with the same effect.

sooobus
  • 841
  • 1
  • 9
  • 22
  • So far I realized that the function that do not work are device-specific, and Open GL ES contains only headers for them. – sooobus Jul 11 '18 at 08:13

1 Answers1

0

The problem was in not using proper java libraries and activities. In sample app there are 3 activities in Java. After adding them everything worked well.

sooobus
  • 841
  • 1
  • 9
  • 22