Finished converting the following code to x64. In the process, with the #define GLEW static, I only needed GLFW3 and freeglut includes. I converted libglfw3dll.a to libglfw3.a and used the dll to make sure it would work as suggested on the glew site. Its working, that’s great, but is the #define GLEW still necessary – seems to work with just a regular DLL. Should I keep it there or not.
#include <cstdio>
#include <cstdlib>
#include <iostream>
#define GLEW_STATIC
#include <GL/glew.h>
#include <GL/glfw3.h>
#include <GL/freeglut.h>
int main(void)
{
GLFWwindow* window;
// Initialize the library
if (!glfwInit())
return -1;
// Create a windowed mode window and its OpenGL context
window = glfwCreateWindow(320, 240, "x64 test", NULL, NULL);
if (!window)
{
glfwTerminate();
return -1;
}
// Make the window's context current
glfwMakeContextCurrent(window);
//Start of GLEW thing
glewExperimental = GL_TRUE;
glewInit();
GLuint vertexBuffer;
glGenBuffers( 1, &vertexBuffer );
printf( "%u
", vertexBuffer );
//End of GLEW thing
// Loop until the user closes the window
while (!glfwWindowShouldClose(window))
{
// Render here
// Swap front and back buffers
glfwSwapBuffers(window);
// Poll for and process events
glfwPollEvents();
}
glfwTerminate();
return 0;
}
output:
x64 black window