I am using 3D textures in my code and I’ve tried loading some that were NPOT. From the extension spec, it seems there isn’t any constraint on the size of the texture’s sides except the max length as before. But when loading some textures like 500498510 (1 byte per voxel), my program hangs when loading the texture with glTexImage3DEXT…
I have an Nvidia GeForce6600 256MB with the 77.77 drivers.
Anyone knows why this doesn’t work? The NPOT extension is present on my videocard driver and I can go up to 512^3 so I donnot understand…
Yeah that’s weird, it should work according to the NPOT spec. Have you tried other NPOT sizes for 3d textures? Maybe some small one like 23x40x7 for example? If others don’t work then I guess the current driver doesn’t support them yet but perhaps later once something is ironed out. This wouldn’t be out of the ordinary b/c there have been other things in the past that certain drivers didn’t support yet even though the spec talked about it, but these features did appear later. For example, at one point trying to request stencil for an FBO with nvidia cards wouldn’t work. I havn’t tried recently so I’m unsure if this has been fixed yet or not. But if not being supported yet is the case, then I’m sure it will be soon.
Perhaps it’s an alignment issue. 498 and 510 are not multiples of 4. You have only one byte per pixel, so the rows will not be word aligned in your source array. Try setting GL_UNPACK_ALIGNMENT to 1, the default is 4.
Indeed it works for smaller 3D textures like 41^3 or 256256176. So, as 41^3 isn’t a multiple of 4, I guess that the pixel pack stuff isn’t the cause of the problem.
I think I’ll have to wait for better drivers.