How to convert an array to PGLint (ie:^integer) in delphi? -


i have opengl function declared in delphi :

pglint = ^glint; glint = integer; gltexparameteriv(target, pname: glenum; params: pglint); 

in sample found on web function must call :

int crop_rect[4] = {x, y, width, height}; gltexparameteriv(gl_texture_2d, gl_texture_crop_rect_oes, crop_rect); 

however don't know how translate crop_rect in delphi ? how pass gltexparameteriv ?

like this:

var   crop_rect: array [0..3] of glint ; .... crop_rect[0] := x; crop_rect[1] := y; crop_rect[2] := width; crop_rect[3] := height; gltexparameteriv(gl_texture_2d, gl_texture_crop_rect_oes, @crop_rect[0]); 

Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -