PDA

View Full Version : NPOT 3D Textures



funkeejeffou
08-27-2005, 02:41 PM
Hi,

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 500*498*510 (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...

Cheers, Jeff.

SirKnight
08-27-2005, 06:10 PM
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.

-SirKnight

Overmind
08-28-2005, 12:37 AM
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.

funkeejeffou
08-29-2005, 03:34 AM
Indeed it works for smaller 3D textures like 41^3 or 256*256*176. 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.

Thanks,
Jeff.

michael.bauer
08-31-2005, 09:44 AM
Hi Jeff,




I think I'll have to wait for better drivers.

Thanks,
Jeff.[/QB]You should not wait, why don't you send a bug report to nvidia? (If this is a reproducable bug, write a short snippet of code that demonstrates the buggy behaviour and send it to the bug report address at nvidia)

Michael