Just tried to get my engine to work with GL3 only. Most of it works, but my lightmaps, which i store in a GL_TEXTURE_2D_ARRAY are not accepted.
glGenTexture (1, …);
glBindTexture (GL_TEXTURE_2D_ARRAY, …);
This does NOT produce a gl error, so i assume array textures are supposed to work.
glTexImage3D (GL_TEXTURE_2D_ARRAY, 0, GL_RGBA8, 512, 512, layers, 0, GL_BGRA, GL_UNSIGNED_BYTE, NULL);
This next line gives me “INVALID_ENUM”. Is this a driver bug, or do i do something wrong? (note: it all works perfectly with GL 2.1)
glTexSubImage3D (GL_TEXTURE_2D_ARRAY, 0, 0, 0, i, 512, 512, 1, GL_BGRA, GL_UNSIGNED_BYTE, data);
This is the actual call to fill the texture (one layer at a time). It gives me “INVALID_VALUE”.
This is on an nVidia Geforce 9600 with the 185.66 (beta) driver.
Any ideas? Did anyone use array textures with GL3 already ?