mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2025-01-04 06:00:17 +00:00
Update simpleCpu example to compile under OSX after refactoring
This commit is contained in:
parent
0f6efb6aec
commit
c89b4db270
@ -101,6 +101,8 @@ if(APPLE)
|
||||
_add_glut_executable(simpleCpu
|
||||
mainApple.mm
|
||||
simpleCpuSubdivision.cpp
|
||||
${SHADER_FILES}
|
||||
${INC_FILES}
|
||||
)
|
||||
else()
|
||||
_add_glut_executable(simpleCpu
|
||||
|
@ -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
|
||||
|
@ -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];
|
||||
}
|
||||
|
||||
|
@ -55,8 +55,6 @@
|
||||
// a particular purpose and non-infringement.
|
||||
//
|
||||
|
||||
#version 330
|
||||
|
||||
//--------------------------------------------------------------
|
||||
// Vertex Shader
|
||||
//--------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user