I am P/Invoking LoadLibrary
, and loading opengl32.dll. I have delegates and loading code for all the OpenGL functions, just like this example below:
internal delegate void ActiveShaderProgram(UInt32 pipeline, UInt32 program);
IntPtr glActiveShaderProgram_Ptr = Library.GetProcedureAddress("glActiveShaderProgram");
Delegates.glActiveShaderProgram = (Delegates.ActiveShaderProgram)Marshal.GetDelegateForFunctionPointer(glActiveShaderProgram_Ptr, typeof(Delegates.ActiveShaderProgram));
For some reason, Library.GetProcedureAddress
returns 0x00000000000. Does anyone know why this is the case?