mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-11-14 16:01:08 +00:00
fix simpleCpu example :
- assign default widht / height to the window - fix reshape callback - downgrade GL profile hint to 3.3
This commit is contained in:
parent
2ec61446db
commit
54856181a9
@ -39,8 +39,8 @@ setGLCoreProfile()
|
||||
|
||||
glfwOpenWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
|
||||
#if not defined(__APPLE__)
|
||||
glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 4);
|
||||
glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 2);
|
||||
glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 3);
|
||||
glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 3);
|
||||
glfwOpenWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
|
||||
#else
|
||||
glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 3);
|
||||
|
@ -150,8 +150,8 @@ a particular purpose and non-infringement.
|
||||
// The screen width & height; current frame for animation; and the desired
|
||||
// subdivision level.
|
||||
//
|
||||
int g_width = 0,
|
||||
g_height = 0,
|
||||
int g_width = 1024,
|
||||
g_height = 1024,
|
||||
g_frame = 0,
|
||||
g_level = 4;
|
||||
|
||||
@ -468,7 +468,7 @@ updateGeom()
|
||||
//
|
||||
// Send the animated coarse positions and normals to the vertex buffer.
|
||||
//
|
||||
std::cout << vertex.size() << " - " << nverts << std::endl;
|
||||
//std::cout << vertex.size() << " - " << nverts << std::endl;
|
||||
g_vertexBuffer->UpdateData(&vertex[0], 0, nverts);
|
||||
|
||||
//
|
||||
|
@ -146,8 +146,8 @@ a particular purpose and non-infringement.
|
||||
// The screen width & height; current frame for animation; and the desired
|
||||
// subdivision level.
|
||||
//
|
||||
int g_width = 0,
|
||||
g_height = 0,
|
||||
int g_width = 1024,
|
||||
g_height = 1024,
|
||||
g_frame = 0,
|
||||
g_level = 4;
|
||||
|
||||
@ -176,7 +176,6 @@ std::vector<float> g_orgPositions,
|
||||
// defined.
|
||||
//
|
||||
void idle();
|
||||
void reshape(int width, int height);
|
||||
void createOsdMesh(int level, int kernel);
|
||||
void display();
|
||||
void updateGeom();
|
||||
|
Loading…
Reference in New Issue
Block a user