diff --git a/openvdb_cmd/vdb_view/RenderModules.cc b/openvdb_cmd/vdb_view/RenderModules.cc index 01912f8e3f..6c49fd1917 100644 --- a/openvdb_cmd/vdb_view/RenderModules.cc +++ b/openvdb_cmd/vdb_view/RenderModules.cc @@ -14,6 +14,13 @@ #include #if defined(_WIN32) +// GL/glu.h requires APIENTRY and CALLBACK from windows.h. GL/glew.h only defines +// them temporarily (undefining them at the end of the header), so windows.h must +// be included before GL/glu.h rather than relying on a transitive include. +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include #include #endif