Update simpleCpu example to compile under OSX after refactoring

This commit is contained in:
Jeremy Cowles 2012-11-11 23:18:48 -08:00
parent 0f6efb6aec
commit c89b4db270
4 changed files with 5 additions and 8 deletions

View File

@ -101,6 +101,8 @@ if(APPLE)
_add_glut_executable(simpleCpu
mainApple.mm
simpleCpuSubdivision.cpp
${SHADER_FILES}
${INC_FILES}
)
else()
_add_glut_executable(simpleCpu

View File

@ -139,9 +139,9 @@ compileShader(GLenum shaderType, const char *section, const char *define)
GLuint
linkProgram(const char *define)
{
GLuint vertexShader = compileShader(GL_VERTEX_SHADER, "VERTEX_SHADER", define);
GLuint geometryShader = compileShader(GL_GEOMETRY_SHADER, "GEOMETRY_SHADER", define);
GLuint fragmentShader = compileShader(GL_FRAGMENT_SHADER, "FRAGMENT_SHADER", define);
GLuint vertexShader = compileShader(GL_VERTEX_SHADER, "VERTEX_SHADER", define);
GLuint program = glCreateProgram();
glAttachShader(program, vertexShader);
@ -179,8 +179,8 @@ initGL()
glEnable(GL_CULL_FACE);
glDepthFunc(GL_LEQUAL);
g_quadFillProgram = linkProgram("#define PRIM_QUAD\n#define GEOMETRY_OUT_FILL\n");
g_quadLineProgram = linkProgram("#define PRIM_QUAD\n#define GEOMETRY_OUT_LINE\n");
g_quadFillProgram = linkProgram("#version 330\n#define PRIM_QUAD\n#define GEOMETRY_OUT_FILL\n");
g_quadLineProgram = linkProgram("#version 330\n#define PRIM_QUAD\n#define GEOMETRY_OUT_LINE\n");
}
void

View File

@ -95,9 +95,6 @@ extern int g_width, g_height, g_frame;
// run the example code
display();
// make sure GL state is clean
assert(glGetError() == GL_NO_ERROR);
[[self openGLContext] flushBuffer];
}

View File

@ -55,8 +55,6 @@
// a particular purpose and non-infringement.
//
#version 330
//--------------------------------------------------------------
// Vertex Shader
//--------------------------------------------------------------