Fix shader issue
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
||||
#define USE_ES_SHADERS 0
|
||||
|
||||
static const GLfloat textureVertices[] =
|
||||
{
|
||||
0.0f, 1.0f,
|
||||
@@ -110,7 +112,7 @@ bool lvrcInitFrameResources(struct lvrcInstance * instance)
|
||||
//float warp_scale = 0.305f; // test
|
||||
float warp_adj = 1.0f;
|
||||
|
||||
#if 0
|
||||
#if USE_ES_SHADERS
|
||||
const char* vertex;
|
||||
ohmd_gets(OHMD_GLSL_ES_DISTORTION_VERT_SRC, &vertex);
|
||||
const char* fragment;
|
||||
@@ -172,9 +174,11 @@ static void prepare(GLuint texture)
|
||||
|
||||
static void draw()
|
||||
{
|
||||
#if USE_ES_SHADERS
|
||||
glVertexAttribPointer(glGetAttribLocation(shader, "coords"), 2, GL_FLOAT, 0, 0, textureVertices);
|
||||
glEnableVertexAttribArray(glGetAttribLocation(shader, "coords"));
|
||||
assert(GL_NO_ERROR == glGetError());
|
||||
#endif // USE_ES_SHADERS
|
||||
|
||||
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
|
||||
assert(GL_NO_ERROR == glGetError());
|
||||
|
||||
Reference in New Issue
Block a user