make a window inorder to change parameter

Started by
6 comments, last by GameDev.net 19 years, 10 months ago
I am using Opengl to draw RE surfaces. I would like to create another window to change the parameter without qiut the program. I know how to create multiple window for drawing. How could I create two window one for drawing and the other for entering various values so that the drawing will update after new values are enter. I am using mac os 9.2...Code Warrior 8... Thank you.
Advertisement
I know nothing about Mac and only about PS2 Codewarrior. But maybe I can ask the right questions:

How are you creating your current window? Have you tried doing the same thing for your second window?
do unto others... and then run like hell.
Fact is I do not know how begin. I do know how to create two windows in opengl for drawing: The procedure is as follows:
Initialize drawing context and frame buffer using glutInit(), glutInitDisplayMode(), and glutInitWindowSize().
Create first window
Register callbacks for first window
Create second window
Position the second window
Register callbacks for second window
Register (shared) idle callback
Enter the main loop

But it seems if I just create a second window by doing
Create second window
Position the second window
there is a problem. I do not want draw in this window. I want to make some kind of panel window, so I call enter new values that will update the drawing with quit the program.

Thank you
Fact is I do not know how begin. I do know how to create two windows in opengl for drawing: The procedure is as follows:
Initialize drawing context and frame buffer using glutInit(), glutInitDisplayMode(), and glutInitWindowSize().
Create first window
Register callbacks for first window
Create second window
Position the second window
Register callbacks for second window
Register (shared) idle callback
Enter the main loop

But it seems if I just create a second window by doing
Create second window
Position the second window
there is a problem. I do not want draw in this window. I want to make some kind of panel window, so I call enter new values that will update the drawing with quit the program.

Thank you
When you say you want to create a panel window, do you mean you want to make one that uses the MAC gui elements? If so, I don''t think you want to use glut to do it, you''ll have to create the window the hard way.
Just a simple window, so I am able do the following:
Time =5.0
Energy Value =50.0
these are the values I want to change too without quiting the program. As result of entering thes new value my engery surface with be updated on the ly.


so on
lets say I started with:

these are my initial.
Time =2.0
Energy Value =3.0

Is this possible.

[Edited by - hcrogma on June 15, 2004 7:52:18 PM]
I have posted several request for help on the issue of creating a secod window to change the parameter in the program without quiting. Someone should have already done this. please help me someone.
I am just starting out with open GL. I have enough knowledge of C++. I have bought the book "Beginning OpenGL game Programming."
The problem is that I cannot even make a window to start experimenting with the code. Plus I am not sure if there are any actual errors in the code because Visual C++.NET is having quite a bit of trouble with gl/gl.h. I am not even sure how much is happenning because it stops reporting errors after 100.
The errors that show up gl/gl.h look like this:

C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1152): error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1152): error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1152): error C2146: syntax error : missing ';' before identifier 'glAccum'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1152): error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1153): error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1153): error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1153): error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1153): error C2146: syntax error : missing ';' before identifier 'glAlphaFunc'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1153): error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1153): error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1154): error C2146: syntax error : missing ';' before identifier 'GLboolean'

etc.
Can anyone help me fix this problem so I can start to make programs.
-Thanks

This topic is closed to new replies.

Advertisement