Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualUbermeowmix

Posted 11 May 2013 - 09:02 AM

Yeah good point, but literally getting a basic window running on windows seems to be a nightmare.

 

Running the code from the intro link (http://duriansoftware.com/joe/An-intro-to-modern-OpenGL.-Table-of-Contents.html):

 

#include <stdlib.h>
#include <GL/glew.h>
#ifdef __APPLE__
# include <GLUT/glut.h>
#else
# include <GL/glut.h>
#endif
#include <stdio.h>
 
static int make_resources(void)
{
    return 1;
}
 
/*
* GLUT callbacks:
*/
static void update_fade_factor(void)
{
}
 
static void render(void)
{
    glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
    glClear(GL_COLOR_BUFFER_BIT);
 
    glutSwapBuffers();
}
 
/*
* Entry point
*/
int main(int argc, char** argv)
{
    glutInit(&argc, argv);
    glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
    glutInitWindowSize(400, 300);
    glutCreateWindow("Hello World");
    glutIdleFunc(&update_fade_factor);
    glutDisplayFunc(&render);
 
    glewInit();
    if (!GLEW_VERSION_2_0) {
        fprintf(stderr, "OpenGL 2.0 not available\n");
        return 1;
    }
 
    if (!make_resources()) {
        fprintf(stderr, "Failed to load resources\n");
        return 1;
    }
 
    glutMainLoop();
    return 0;
}
 
Receiving:
 
LINK : fatal error LNK1104: cannot open file 'freeglut.lib'
 
P.S. this is as a console application opened in Visual Studio 10

#1Ubermeowmix

Posted 11 May 2013 - 09:01 AM

Yeah good point, but literally getting a basic window running on windows seems to be a nightmare.

 

Running the code from the intro link (http://duriansoftware.com/joe/An-intro-to-modern-OpenGL.-Table-of-Contents.html):

 

#include <stdlib.h>
#include <GL/glew.h>
#ifdef __APPLE__
# include <GLUT/glut.h>
#else
# include <GL/glut.h>
#endif
#include <stdio.h>
 
static int make_resources(void)
{
    return 1;
}
 
/*
* GLUT callbacks:
*/
static void update_fade_factor(void)
{
}
 
static void render(void)
{
    glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
    glClear(GL_COLOR_BUFFER_BIT);
 
    glutSwapBuffers();
}
 
/*
* Entry point
*/
int main(int argc, char** argv)
{
    glutInit(&argc, argv);
    glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
    glutInitWindowSize(400, 300);
    glutCreateWindow("Hello World");
    glutIdleFunc(&update_fade_factor);
    glutDisplayFunc(&render);
 
    glewInit();
    if (!GLEW_VERSION_2_0) {
        fprintf(stderr, "OpenGL 2.0 not available\n");
        return 1;
    }
 
    if (!make_resources()) {
        fprintf(stderr, "Failed to load resources\n");
        return 1;
    }
 
    glutMainLoop();
    return 0;
}
 
Receiving:
 
LINK : fatal error LNK1104: cannot open file 'freeglut.lib'

PARTNERS