I want to add an error check to glTexImage2D(), but I don't know where to put it.
Basically, what I want to do is check that the given width and height dimensions are of the form: 2^k +2(border) : for some positive integer k and throw an GL_INVALID_VALUE error if one of them fails the check, as per the description in the OpenGL Reference Manual (4th ed, p.546). I want to make the check in one place, before dispatching to the driver specific function, which I think is done by CALL_TexImage2D() (is this right?). The file dlist.c has two functions that call CALL_TexImage2D(): save_TexImage2D() execute_list() Do I have to put my check before each of these calls, or is there somewhere higher up the function call stack that would be more appropriate? James ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev