Make sure you register a valid texture identification integer(the reference) by calling glGenTextures and make sure that the generated ID is different than 0. Here is a sample code:
delphis ‘opengl’ unit should have all that… it seems like you havent even created a opengl render context, becourse those functions should be in that unit as awell.
The opengl.pas that comes with Delphi isn’t that good,as some things are declared wrong and some functions are missing.
But I’m working in a OpenGL2-Port-Team for delphi and we’ve released an OpenGL1.5-Header here which should work much better than the one that comes with delphi.
Yes,sorry that I forget to tell that.You’ll have to call the function InitOpenGL before you can use the OpenGL-functions in that unit.
The rest of it is like Mike Lischke’s OpenGL12.pas.So to init your program and get a valid rendercontext you’ll have to do something like this :
var
DC : HDC;
RC : HGLRC;
...
procedure TGLForm.Init;
begin
InitOpenGL;
DC := GetDC(Handle);
RC := CreateRenderingContext(DC, [opDoubleBuffered], 32, 24, 0, 0, 0, 0);
...
end;