| 119 | GLuint gvPositionHandle; |
| 120 | |
| 121 | bool setupGraphics(int w, int h) { |
| 122 | printGLString("Version", GL_VERSION); |
| 123 | printGLString("Vendor", GL_VENDOR); |
| 124 | printGLString("Renderer", GL_RENDERER); |
| 125 | printGLString("Extensions", GL_EXTENSIONS); |
| 126 | |
| 127 | LOGI("setupGraphics(%d, %d)", w, h); |
| 128 | gProgram = createProgram(gVertexShader, gFragmentShader); |
| 129 | if (!gProgram) { |
| 130 | LOGE("Could not create program."); |
| 131 | return false; |
| 132 | } |
| 133 | gvPositionHandle = glGetAttribLocation(gProgram, "vPosition"); |
| 134 | checkGlError("glGetAttribLocation"); |
| 135 | LOGI("glGetAttribLocation(\"vPosition\") = %d\n", gvPositionHandle); |
| 136 | |
| 137 | glViewport(0, 0, w, h); |
| 138 | checkGlError("glViewport"); |
| 139 | return true; |
| 140 | } |
| 141 | |
| 142 | const GLfloat gTriangleVertices[] = {0.0f, 0.5f, -0.5f, -0.5f, 0.5f, -0.5f}; |
| 143 |
no test coverage detected