I commented out nearly all code now. Only these are executed:
Code:
in formCreate:
nx.CreateGlWindow(self);
in onTimer:
if cube=nil then begin
// Do glCheckFramebufferStatus
if not nx.CanRender then exit;
err:=glGetError();
if err>0 then ShowMessage(format('Model_before: glGetError, code: %d',[err]));
model:=TGLModel.Create;
model.LoadFromW3D('cube.w3d');
model.UseMaterials:=false;
model.MakeDisplayList(cube);
model.Free;
err:=glGetError();
if err>0 then ShowMessage(format('Model_after: glGetError, code: %d',[err]));
// Seen code 1286 (GL_INVALID_FRAMEBUFFER_OPERATION)
exit;
end;
I get only 1 messagedialog with "Model_after...1286".
So FBO is not being used at all, just rendering vertex array to displaylist. If i comment out "model.MakeDisplayList(cube);", then no error comes.
I also made a guide in the nxPascal wiki to show how to easily install the SVN version. It shouldn't take more than 1 minute if you already have SVN environment in your system, something like TortoiseSVN, or linux comparative. This whole demo is included there.
Bookmarks