Comment 8 for bug 593380

Revision history for this message
Mirco Müller (macslow) wrote : Re: unity quits with CheckGLError in ./ctk-render-target.c:285

This is a driver-bug really. The OpenGL-call failing...

glTexImage2D (GL_TEXTURE_2D, 0, GL_RGBA8, self->width, self->height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL)

... is perfectly legal and works e.g. with intel's free driver and on nvidia's binary one.

Since I've no working ATI-graphics-card here right now, I can't debug the two driver to see what's exactly causing this call to fail. But my guess is that the two drivers cannot handle non-power-of-two textures correctly in this case. Working around this inside clutk isn't recommended, as "polluting" application/library code with work-arounds to cover up short-comings in OpenSource-drivers isn't reasonable.

A work-around could make use of the explicit texture-target GL_TEXTURE_RECTANGLE_ARB (form the GL_ARB_texture_rectangle extension). But that would require using non-normalized texture-coordinates everywhere in clutk too.