Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: GLUT win management

  1. #1
    Senior Member Regular Contributor
    Join Date
    Mar 2003
    Location
    Chicago, IL US
    Posts
    101

    GLUT win management

    Hi,

    Are there any sites that show the results of the GLUT commands for window creation/management? I have the commands but would like to be able to see pictures of what they result in. (Kind of ironic that tutorials on graphics langs wouldn't do this.)

    Thanks a lot.

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: GLUT win management

    Why should a graphics tutor try to deal with all the aspects of window creation?
    It takes to much time to cover both also not all OS's have the same windowing features.

    Also for most who only want to write a game or demo, other window functions the top bar drop down menus are not needed.

    So best to only cover the basic idea of opening and closeing a window, this way you don't get traped into one OS structure.
    And get right into doing graphincs on the screen.

    Those who want advanced menu features can always go to a windows site to learn to use them.


    Originally posted by cg-hci_novice:
    Hi,

    Are there any sites that show the results of the GLUT commands for window creation/management? I have the commands but would like to be able to see pictures of what they result in. (Kind of ironic that tutorials on graphics langs wouldn't do this.)

    Thanks a lot.

  3. #3
    Senior Member Regular Contributor
    Join Date
    Mar 2003
    Location
    Chicago, IL US
    Posts
    101

    Re: GLUT win management

    What do you mean by a windows site? Do those cover GLUT commands? Still looking for an ans. to this question.

    Thanks.

  4. #4
    Senior Member Regular Contributor
    Join Date
    Mar 2003
    Location
    Chicago, IL US
    Posts
    101

    Re: GLUT win management

    Also looking for any Web site that covers error msgs?

    Because I am currently getting:

    Fatal Error: redisplay needed for window 1, but no display callback

    I tried adding glutPostRedisplay call at the end of my main window display routine but am still getting this msg.

  5. #5
    Member Contributor
    Join Date
    Jun 2003
    Location
    Blacksburg, VA 24060, USA
    Posts
    59

    Re: GLUT win management

    Are u registering a callback for display function?

    Can u post some code - where u initialize glut and create window(s)

    - Chetan

  6. #6
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: GLUT win management

    All the glut functions are listed on this website under documentation, also if you put a glut function in the search window on the main page of this website you will get a webpage with details on the useage of that function that includes errors.

    Originally posted by cg-hci_novice:
    What do you mean by a windows site? Do those cover GLUT commands? Still looking for an ans. to this question.

    Thanks.

  7. #7
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: GLUT win management

    I have glut examples on my website with details in the example as to what the functions are doing in the program.

    Go to my website and download my basic glut frame work.

    wwww.angelfire.com/linux/nexusone/

    Here is the basic stucture for setting up a glut window.
    Note that you have to have defind some basic routines before glut will work.

    Fatal Error: redisplay needed for window 1, but no display callback

    This error tell's us you have not created a display routine. glutPostRedisplay requires you define a routine for it to run when called.

    Look at my basic glut frame work and you will be able to see how everything works together.


    // Main program
    int main(int argc, char** argv)
    {
    glutInit(&argc, argv);
    glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB);
    glutInitWindowSize (500, 500);
    glutInitWindowPosition (10, 10);
    glutCreateWindow (argv[0]);
    glutSetWindowTitle("GlutWindow");
    init ();
    glutDisplayFunc(display); // Routine to call when needing to draw to the window
    glutReshapeFunc(reshape); // This is what routine glut is to call when the window is resphaped
    glutKeyboardFunc(keyboard); // What routine to call when the keyboard is pressed
    glutSpecialFunc(arrows);
    glutTimerFunc( 10, TimeEvent, 1);
    glutMainLoop(); // Always call last
    return 0;
    }




    [This message has been edited by nexusone (edited 10-13-2003).]

  8. #8
    Senior Member Regular Contributor
    Join Date
    Mar 2003
    Location
    Chicago, IL US
    Posts
    101

    Re: GLUT win management

    I was aware of the of the GLUT info on this site but since I couldn't find any pics of the wins, I couldn't tell if I needed to create subwins or just small wins that are located close to a large win (from a screen shot I was provided with) since I am not very familiar with GLUT (and didn't know what a subwin would imply).

    I talked to someone today about it and found out that I need to make additional small wins not subwins.

    I did have a display function but due to my trying to create subwins incorrectly, I was getting the error message I posted.

    I appreciate that not everyone feels pics are necessary part of every tutorial but for this specific purpose, it would probably have been helpful to me.

    Thanks very much for the info/links. I will now go ahead apply it to creating the small wins, etc.

  9. #9
    Senior Member Regular Contributor
    Join Date
    Mar 2003
    Location
    Chicago, IL US
    Posts
    101

    Re: GLUT win management

    Hi,

    I was wondering if someone could explain why you would use glutSetWindow vs just creating and displaying multiple windows? Or, maybe give an example where this is necessary?

    Thanks a lot.

  10. #10
    Senior Member Regular Contributor
    Join Date
    May 2002
    Location
    York, UK
    Posts
    128

    Re: GLUT win management

    glutSetWindow() is used to set the window (of the ones you have created) into which your OpenGL commands are rendered!

    e.g. setting which window is cleared with glClear() etc etc etc etc ...

    r

Page 1 of 2 12 LastLast

Similar Threads

  1. Memory management with cl.hpp
    By Rocko Bonaparte in forum OpenCL
    Replies: 1
    Last Post: 10-29-2013, 09:00 AM
  2. Memory management
    By Orzech in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 08-30-2003, 10:32 AM
  3. glut window management
    By glutguy in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 04-18-2002, 09:30 PM
  4. texture management
    By MarsuGL in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 03-05-2002, 07:29 AM
  5. help with data management
    By kilmon000 in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 02-08-2002, 05:53 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