hi,
could someone send me a simple openGL framework app ( res. switching, init code,..) for linux? i dont need special fx, just the setup would be cool...
thanks in advance,
sebastian ( sebastian_posch@c4.com )
hi,
could someone send me a simple openGL framework app ( res. switching, init code,..) for linux? i dont need special fx, just the setup would be cool...
thanks in advance,
sebastian ( sebastian_posch@c4.com )
The easiest way to get started is with GLUTOriginally posted by sebastian:
hi,
could someone send me a simple openGL framework app ( res. switching, init code,..) for linux? i dont need special fx, just the setup would be cool...
Here's a simple Makefile:Code :int main(int argc, char *argv[]) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH); glutInitWindowSize(640, 480); glutCreateWindow(argv[0]); /* Initialise stuff */ init(); /* Register callbacks */ glutDisplayFunc(displayCallback); glutMouseFunc(mouseCallback); glutIdleFunc(idleCallback); glutMainLoop(); return 0; }
Hope this helpsCode :CFLAGS = -Wall -I/usr/X11R6/include/ -O2 -g LDFLAGS = -L/usr/X11R6/lib -lGL -lGLU -lglut PROG = my_executables_name SRC = main.c somethingelse.c blah.c OBJ = $(SRC:.c=.o) all: $(PROG) $(PROG): $(OBJ) Makefile $(CC) -o $@ $(OBJ) $(LDFLAGS) $(OBJ): Makefile
You can use:
- Plain X commands, not difficult but not very friendly
- Use a third party library: glut or better, SDL, the last version (1.1.5) is really better than GLUT (true full screen, can change video mode, advanced event handling, sound support etc...). Check it at: http://www.libsdl.org/
Doh! How could I forget to mentionOriginally posted by MC:
- Use a third party library: glut or better, SDL, the last version (1.1.5)
the fine SDL library? :P
Just to second what MC says,
yes, SDL is also a good thing to use to
quickly get started.