Pointers to Blitz arrays?

BlitzMax Forums/BlitzMax Programming/Pointers to Blitz arrays?

JoshK(Posted 2006) [#1]
Here is one way to call a certain GL function:
bank:tbank=CreateBank(16)
PokeFloat bank,0,1.0
PokeFloat bank,4,1.0
PokeFloat bank,8,1.0
PokeFloat bank,12,1.0
glMaterialfv GL_FRONT,GL_DIFFUSE,BankBuf(bank)
bank=Null

Blitz arrays are a little more intuitive:
Local params#[3]
params[0]=1.0
params[1]=1.0
params[2]=1.0
params[3]=1.0

But how do you call the function?:
glMaterialfv GL_FRONT,GL_DIFFUSE,params[]



N(Posted 2006) [#2]
glMaterialfv( GL_FRONT, GL_DIFFUSE, params ) should work. If not, do glMaterialfv( GL_FRONT, GL_DIFFUSE, Varptr params[0] )


JoshK(Posted 2006) [#3]
Cool, I think it works.