PDA

View Full Version : very stupid question!



05-10-2004, 06:31 AM
How to set-it up in fullscreen?
How to start?
How to draw text?
how to make a filled up retangle?

Yes i can program but no opengl I am new in that.

05-10-2004, 06:42 AM
try a search, there's tons of stuff here.

jean-bobby
05-10-2004, 06:49 AM
OpenGL does not provide the surface where to draw (e.g a window). So first, you need to choose a windowing system. If your application is simple and if you want to keep it portable, you should use glut. Glut allows you to create a window and to set it in full screen. An application using glut looks like this :

int main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB);
glutCreateWindow (argv[0]);
glutFullScreen();
init ();
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutMouseFunc(mouse);
glutIdleFunc(spinDisplay);
glutTimerFunc(50, timerFunction, 0);
glutPostRedisplay();
glutMainLoop();

return 0;
}

There are plenty of tutorials for glut on the web. Otherwise, you can use another windowing system and find tutorials.
Here there are a lot good tutorials :
http://nehe.gamedev.net/lesson.asp?index=01.

Hope it helps you to start

05-10-2004, 08:35 AM
hmm i use this code:
---------------------------------
#include "glut.h"
#include <gl\glu>

int main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB);
glutCreateWindow (argv[0]);
glutFullScreen();
init ();
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutMouseFunc(mouse);
glutIdleFunc(spinDisplay);
glutTimerFunc(50, timerFunction, 0);
glutPostRedisplay();
glutMainLoop();

return 0;
}
---------------------------------
and i use borland C++ builder 6
and i get those erros
what to do?
---------------------------------------
[C++ Error] test_project.cpp(11): E2268 Call to undefined function 'init'
[C++ Error] test_project.cpp(12): E2451 Undefined symbol 'display'
[C++ Error] test_project.cpp(13): E2451 Undefined symbol 'reshape'
[C++ Error] test_project.cpp(14): E2451 Undefined symbol 'mouse'
[C++ Error] test_project.cpp(15): E2451 Undefined symbol 'spinDisplay'
[C++ Error] test_project.cpp(16): E2451 Undefined symbol 'timerFunction'

ZbuffeR
05-10-2004, 12:55 PM
>> what to do?
RTFM. The code shown by jean-bobby is a skeleton, you need to write (or delete) each of the functions. The GLUT doc can be found here:
http://opengl.org/resources/libraries/glut/glut_downloads.html
A starting tutorial :
http://mind****.de-brauwer.be/articles/glut/

Edit: Putain, le forum filtre les 4 letters words...
The above url should start with (remove spaces):
m i n d f u c k.de-brauwer.be

nexusone
05-10-2004, 04:46 PM
You are getting the error's because the posters example was not a complete program. The listed items are the missing routines needed to complete the program.

I have example glut programs on my website, and links to other glut resources.

www.angelfire.com/linux/nexusone/ (http://www.angelfire.com/linux/nexusone/)


Originally posted by <me>:
hmm i use this code:
---------------------------------
#include "glut.h"
#include <gl\glu>

int main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB);
glutCreateWindow (argv[0]);
glutFullScreen();
init ();
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutMouseFunc(mouse);
glutIdleFunc(spinDisplay);
glutTimerFunc(50, timerFunction, 0);
glutPostRedisplay();
glutMainLoop();

return 0;
}
---------------------------------
and i use borland C++ builder 6
and i get those erros
what to do?
---------------------------------------
[C++ Error] test_project.cpp(11): E2268 Call to undefined function 'init'
[C++ Error] test_project.cpp(12): E2451 Undefined symbol 'display'
[C++ Error] test_project.cpp(13): E2451 Undefined symbol 'reshape'
[C++ Error] test_project.cpp(14): E2451 Undefined symbol 'mouse'
[C++ Error] test_project.cpp(15): E2451 Undefined symbol 'spinDisplay'
[C++ Error] test_project.cpp(16): E2451 Undefined symbol 'timerFunction'

05-10-2004, 11:52 PM
I get this error after compiling the example:
[Linker Error] 'F:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\GLUT32.LIB' contains
invalid OMF record, type 0x21 (possibly COFF)

how to solve?
Thank you.
ps: I know I am a opengl beginner of beginners

Myth
05-11-2004, 12:03 AM
I am now registred, now you all know my website and stuff.

Myth
05-11-2004, 12:14 AM
O it works that opengl works!
This feels nice good!

my website is http://www.myth-plac.tk

Bye myth!
ps: i first was <new> now i am Myth

Myth
05-11-2004, 12:18 AM
i mean it is http://www.myth-place.tk