Results 1 to 4 of 4

Thread: Open GL Error

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2001
    Location
    Liverpool
    Posts
    6

    Open GL Error

    I have just installed Open GL and the GLUT libraries and when I run a program I get the following error : -

    --------------------Configuration: OpenGL - Win32 Debug--------------------
    Compiling...
    openGL.cpp
    Linking...
    e:\visual c\VC\LIB\glut32.lib : fatal error LNK1106: invalid file or disk full: cannot seek to 0x39d50e15
    Error executing link.exe.

    OpenGL.exe - 1 error(s), 0 warning(s)

    Does anyone know what the problem is here as I cant find it, I have pasted the program at the bottom.
    Thanks, Brian

    #include<windows.h>
    #include<gl/glut.h>
    #include<iostream.h>
    #include<stdlib.h>

    void display(void) {
    glClear(GL_COLOR_BUFFER_BIT); //clear all pixels
    glColor3f(1.0, 1.0, 1.0);
    glBegin(GL_POLYGON);
    glVertex3f(0.5, 0.5, 0.0);
    glVertex3f(1.0, 0.5, 0.0);
    glVertex3f(1.0, 1.0, 0.0);
    glVertex3f(0.5, 1.0, 0.0);
    glEnd();
    glFlush();
    }

    void init(void) {
    glClearColor(0.0, 0.0, 0.0, 0.0);
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0);
    }

    int main(int argc, char** argv) {
    glutInit(&argc, argv);
    glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
    glutInitWindowSize(250,250);
    glutInitWindowPosition(100, 100);
    glutCreateWindow("Rectangle");
    init();
    glutDisplayFunc(display);
    glutMainLoop();
    return 0;
    }

  2. #2
    Senior Member Regular Contributor
    Join Date
    Mar 2000
    Location
    Germany
    Posts
    235

    Re: Open GL Error

    Hi!
    I had the same problem a long time ago so I donīt remember properly but I think my glut-files(glut.h,....) were from a newer version than my glut32.lib and that causes the problem....

    HTH, XBTC!

  3. #3
    Senior Member Regular Contributor
    Join Date
    Jun 2000
    Location
    B.C., Canada
    Posts
    367

    Re: Open GL Error

    Also, you don't need windows.h for glut. When using glut, you build a Win32 console app. I have also had some trouble in the past using iostream with glut. stdio works fine.

    j

  4. #4
    Junior Member Newbie
    Join Date
    Jan 2001
    Location
    Liverpool
    Posts
    6

    Re: Open GL Error

    Right I have chandged the iostream to stdio and removed windows.h but no dice. I also checked the version of GLUT, it is the version from Nate Robbins page, is this the latest or is this my problem, if so where do I get the latest.

    Thanks
    Brian

Similar Threads

  1. Open Gl ES Error
    By tommohawkaction in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-07-2017, 03:20 AM
  2. open gl error
    By mixter in forum OpenGL: Windows
    Replies: 8
    Last Post: 07-11-2005, 05:29 PM
  3. Replies: 0
    Last Post: 08-20-2002, 09:16 PM
  4. error:can not open GL\glut.h
    By Lily in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 03-16-2001, 12:21 AM
  5. Open GL Error!
    By EssayGeon in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 02-26-2001, 05:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean