Pointers to Blitz arrays?
BlitzMax Forums/BlitzMax Programming/Pointers to Blitz arrays?
| ||
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[] |
| ||
glMaterialfv( GL_FRONT, GL_DIFFUSE, params ) should work. If not, do glMaterialfv( GL_FRONT, GL_DIFFUSE, Varptr params[0] ) |
| ||
Cool, I think it works. |