From: Virgil W. <vir...@ra...> - 2000-08-31 01:48:43
|
> > In addition, after switching to version 2.4.1.0, I see these error messages > > printed out when my app runs: > > GL ERROR : invalid operation > > GL ERROR : 1282 == 0x502 > > > Nobody will be able to help you until you send more detailed info: a piece of > code where is occurs and precise command after this error is signaled (yes it > means putting gljCheckGL() after each OpenGL command in this chunk of code to > spot the bug). > Ok, I think I've got it figured out. Version 2.3.1.1 was letting me get away with all sorts of tom foolery. For starters, the paint method of GLCanvas is being called, which is in turn calling my display. All of this is happening before I've set up appropriate data structures ,etc. My test application is written to basically do this kind of thing (rewritten for simplicity): public void run(){ setupdata(); while(true){ modifydata(); canvas.sDisplay(); } } My display method in canvas draws things based on data structures that it expects will already have been initialized in setupdata(). However, the paint method of GLCanvas is getting called before I start the above thread... and paint is calling display (So I'm trying to draw things based on uninitialized data structures... hence the errors). The paint method of GLCanvas is getting called before I Start my thread since I am creating a frame (and showing it) which holds a GLCanvas before I start the above thread. Additionally, I used to have a quad that had a texture mapped to it, but no bindtexture had been called first. (Silliness, basically) 2.3.1.1 was lets me get away with these two errors without chastising me (not sure why). 2.4.1.0 doesn't (which is a good thing :) Thanks, Virgil > Max |