According to Pipeline Newsletter 4, Image data will be defined using lpImageDataD, and that’s a very bad idea IMHO.
I propose using a single lpImageData signature. Since Image dimension is part of Image Format object, it is redundant to specify its dimension again. This would mean changing offset, width, height, depth to GLint* offsets and GLint* sizes.
Another point, I added an ‘index’ parameter to specify which cubemap face ( or array element ) are we dealing with. I believe this would be somewhat similar to the ‘target’ parameter in OpenGL 2.1.
This is the result:
void lpImageData( LPimage image, LPint index, // An integer, or: CUBE_POS_X, CUBE_NEG_X, CUBE_POS_Y, ... LPint miplevel, LPint *offsets, LPint *sizes, LPenum format, LPenum type, void* data )
It’s important to note that ‘index’ would be zero in most cases ( except for cubemaps and arrays ).
This would be cooler, more elegant, generic, lean & mean, KISS, whatever, IMHO.
If you guys find it absolutely necessary to specify a dimension on ImageData calls, I believe it’s a better idea to add a ‘dimension’ parameter instead of providing 3 (or more?) different functions:
void lpImageData( LPimage image, LPenum dimension, // 1D, 2D, 3D, ... could be an integer instead. It's another option. LPint index, LPint miplevel, LPint *offsets, LPint *sizes, LPenum format, LPenum type, void* data )
Well, this is not really cool but would do the trick.
Gimme feedback please.
Sorry about the double post…