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:
manuelk 2013-03-18 16:55:41 -07:00
parent 2ec61446db
commit 54856181a9
3 changed files with 7 additions and 8 deletions

View File

@ -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);

View File

@ -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);
//

View File

@ -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();