-#include <vector>
+#include <GLES2/gl2.h>
+#include <string>
+
+const char* vertShaderSrc = R"(
+ attribute vec4 vertPos;
+ void main() {
+ gl_Position = vertPos;
+ }
+)";
+
extern "C" int foo() {
- std::vector<int> *xs = new std::vector<int>();
- xs->push_back(42);
- return (*xs)[0];
+ GLuint vertShader = glCreateShader(GL_VERTEX_SHADER);
+ const char* sources[1] = { vertShaderSrc };
+ const GLint lengths[1] = { (GLint)strlen(vertShaderSrc) };
+ glShaderSource(vertShader, 1, sources, lengths);
+ glCompileShader(vertShader);
+ return 0;
}