X-Git-Url: http://pileus.org/git/?p=grits;a=blobdiff_plain;f=src%2Fgis-viewer.h;h=a4da4fc6a591fa2172699a23626e0724ccef9324;hp=848206866687ee661549531d8f9f41eb81fcca6a;hb=72643f9bd6c87e08670eb1a0aad2da5573b99774;hpb=2be8bbde8f465947d364b28c5e156631caed6d25 diff --git a/src/gis-viewer.h b/src/gis-viewer.h index 8482068..a4da4fc 100644 --- a/src/gis-viewer.h +++ b/src/gis-viewer.h @@ -15,6 +15,24 @@ * along with this program. If not, see . */ +/** + * Hack alert: gis-opengl.h needs to be included before gis-viewer + * - GisViewer depends on GisObject for add/remove functions + * - GisObject depends on GisOpenGL for load/unload functions + * - GisOpenGL depends on GisViewer for inheritance + * + * The problem here is that GisOpenGL needs the GisViewer definition + * but GisViewer only needs the typedefs (through GisObject), + * so GisViewer needs to be included after the GisOpenGL typedefs but + * before the GisOpenGL definition. This is handled internally by + * gis-opengl.h + * + * This should probably be fixed, but making a GisGLObject interface + * seems like too much work. Merging GisViewer and GisOpenGL would also work, + * but I like the separate that that's provided by having two. + */ +#include "gis-opengl.h" + #ifndef __GIS_VIEWER_H__ #define __GIS_VIEWER_H__