View Full Version : Problems in creating a display list!

Vinícius Reis
05-02-2005, 07:03 AM
I’m having problems in creating a display list in Fortran! Am I doing something wrong?

write(*,*)indice !This line returns me 0

write(*,*)auxl !This line returns me False

CALL glNewList(indice,GL_COMPILE)
!Block with my draw
CALL glEndList()

write(*,*)auxl !This line returns me False
This is the first display list not just in my program, but in my life, so, why the program is returning me 0, like if there was no display list that could be created?

Thanks for the help!

05-02-2005, 10:46 AM
I guess you have to submit the indice variable to glIsList instead of 1

Vinícius Reis
05-03-2005, 05:09 AM
I'd already done that, but it didn't, that's why I've putted 1 instead indice.

05-03-2005, 07:44 AM
you cannot call glGenLists(..) between a call to glBegin(..) and the corresponding call to glEnd()... Perhaps you did something like that ?

05-03-2005, 11:36 AM
some calls are not allowed between glbeginlist and glendlist you better check for those command if you have not done this yet

05-03-2005, 11:40 AM
if glgenlists returns 0 then the call to glGenLists has failed according to the online help

you have 2 possibilities

1. range is negative - which is not true in your case

2. you call glGenList between glBegin and glEnd which has been noted before

so you have to check the 2nd case

Vinícius Reis
05-04-2005, 05:32 AM
Nope, none of these situations are happening! There's no invalid call inside glNewList() and glEndList(), the rage is not negative and there's no outer glBegin().

Vinícius Reis
05-04-2005, 06:06 AM
I've just used this subroutine in a small program, and it worked pretty well! The problem is somewhere else! Thanks everybody for your help!