View Full Version : OpenGL12 fatal error

06-28-2000, 03:58 PM
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...

06-28-2000, 04:36 PM
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.

06-28-2000, 04:48 PM
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).]

07-11-2000, 08:12 PM
If yuu don't mind showing me your code, I may be able to help.


07-12-2000, 05:30 AM
Don't worry man...
i got that bug....

thanx anyway