OpenGL12 fatal error

Hey …
every time i called any function of OPENGL12.PAS ( for Delphi5 users ) i got a Access Violation.

like this code, for example:
glGenTextures(2, FPrimitiveTexture[1] );

what’s happens ? ? ?

thanx in advanced…

Well, it’s been years since i’ve actually used pascal (Delphi, Visual Pascal whatever…) But it appears that in your call to glGenTextures(), you request 2 texture id’s but supply the address of the first element of an array (pascal uses a 1 based array correct?) where you really want to pass the address of the array.

FPrimitiveTexture is array[0…2] of TGluint, right ???
and that array belong to own class or object(whatever).

the solution to access violation, i’m using
a external declaration like this:
procedure glGenTextures(n: GLsizei; textures: GLuint); stdcall; external ‘opengl32.dll’;

and after the code in my first post all of three elements of FPrimitiveTexture array are 0 (zero).
So i can’t use texture man…
how can i fixed this ???

help me … ok ?

[This message has been edited by Gelero (edited 06-28-2000).]

If yuu don’t mind showing me your code, I may be able to help.

John

Don’t worry man…
i got that bug…

thanx anyway