# Including OpenGLDrv module in plugin

**URL:** <https://forums.unrealengine.com/t/including-opengldrv-module-in-plugin/340482>\
**Category:** Plugins\
**Tags:** opengl, unreal-engine, linking, Plugins, question, CPP\
**Created:** [December 4, 2015, 11:14am UTC](https://forums.unrealengine.com/t/including-opengldrv-module-in-plugin/340482 "2015-12-04T11:14:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hmb3141](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Hmb3141](https://forums.unrealengine.com/u/Hmb3141)\
**Post date:** [December 4, 2015, 11:14am UTC](https://forums.unrealengine.com/t/including-opengldrv-module-in-plugin/340482/1 "2015-12-04T11:14:05Z")

</div>

I’m trying to include the OpenGLDrv module into a plugin as I need to access its classes directly.

I’ve tried adding it to my build script

```
namespace UnrealBuildTool.Rules
{
	public class Example: ModuleRules
	{
		public ExamplePlugin(TargetInfo Target)
		{
			AddThirdPartyPrivateStaticDependencies(Target, "Example");

			PublicDependencyModuleNames.AddRange(
				new string[]
				{
					"Core",
					"CoreUObject",
                    "Engine",
                    "RHI",
                    "RenderCore",
                    "OpenGLDrv",
					// ... add other public dependencies that you statically link with here ...
				}
				);
		}
	}
}

```

Then I add OpenGLWindows.h to my includes using with “Private/Windows/OpenGLWindows.h”. Which give me the error

Error 1 error C1083: Cannot open include file: ‘GL/glcorearb.h’: No such file or directory …Engine\Source\Runtime\OpenGLDrv\Private\Windows\OpenGLWindows.h 15 1 UE4

These are the includes in OpenGLWindows.h

```
#include "Windows/MinWindows.h"
#include "AllowWindowsPlatformTypes.h"
	#include <GL/glcorearb.h>
	#include <GL/glext.h>
	#include <GL/wglext.h>
#include "HideWindowsPlatformTypes.h"

```

---

<div class="post-metadata">

**Author:** ![hell0w0rld123](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hell0w0rld123](https://forums.unrealengine.com/u/hell0w0rld123)\
**Post date:** [February 3, 2016, 7:21pm UTC](https://forums.unrealengine.com/t/including-opengldrv-module-in-plugin/340482/2 "2016-02-03T19:21:33Z")

</div>

I think answer is here

> **[Public interface of OpenGLDrv](https://forums.unrealengine.com/questions/149639/public-interface-of-opengldrv.html)**
>
> Hi all, I’m coding a plugin to do quad buffer stereo. For this I’m trying to use the with a custom Present callback function. This plugin needs access to some opengl functions and to the opengl device context. I can add OpenGLDrv to my dependency...
