I doubt that you can use SetPixelFormat() for TPanel, or even TForm. Where do you get fChwnd? Shouldn't it be FDC:=GetDC(panel1.handle); Then you should call ReadExtensions; after the InitOpenGL;