Well, my dglopengl apps initialize opengl the same way, but in a lazarus application, and that works fine. Note to reach opengl3+ functions more is needed (see below)
opengl32.dll is afaik a windows DLL, but the driver must provide the relevant implementation.
In the past the windows default driver was sometimes a shell, without much 3d, but afaik that doesn't happen anymore since Windows 8.
My code is like:
if FirstTime then
begin // used to do one time init stuff
InitOpenGL;
ReadExtensions;
end;
OnResize := PanelResize; // let's control our own resize, I have no idea which protected method is below this so...
FBrightness := 10.0;
FDC := GetDC(Handle);
pfd.nSize := SizeOf(pfd);
pfd.nVersion := 1;
pfd.dwFlags := PFD_DRAW_TO_WINDOW or PFD_SUPPORT_OPENGL or PFD_DOUBLEBUFFER;
pfd.iPixelType := PFD_TYPE_RGBA;
pfd.cColorBits := 32;
pf := ChoosePixelFormat(FDC, @pfd);
b:=SetPixelFormat(FDC, pf, @pfd);
FRC := wglCreateContext(FDC);
b:=wglMakeCurrent(FDC, FRC);
if FirstTime then begin // reread for opengl 3+ (?) properties.
ReadImplementationProperties;
ReadExtensions;
end;
b:=wglMakeCurrent(FDC, FRC);