[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Public WebGL] readPixels and out of range pixels
- To: public webgl <email@example.com>
- Subject: [Public WebGL] readPixels and out of range pixels
- From: Gregg Tavares <firstname.lastname@example.org>
- Date: Sun, 7 Feb 2010 05:23:54 -0800
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1265549037; bh=r3sqWhiwju5EUjNjbjUVDnOtnFc=; h=MIME-Version:Date:Message-ID:Subject:From:To:Content-Type; b=nP/5f+/xw1X6f6T9dQvU63f2hCxhBqLP65/RXCdoXhgggK3OXQD0yJFnfFkNlF11H /N/dlmVow2yp8UpLBsNew==
- Domainkey-signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:date:message-id:subject:from:to:content-type:x-system-of-record; b=gI39ECUy7T9o2Qz9JEO4MgkgbYTaUBCQpMj/djZXlcC8dNp4TusBYb6My3i2khaVK xO1uLPC54j+i88zlOyGww==
- Sender: email@example.com
I noticed the current spec doesn't appear to mention how out of range pixels are handled by calls to readPixels.
The OpenGL ES 2.0 spec makes them undefined, meaning you can have a back buffer that is 10x10 but call glReadPixels with 100x100 and you'll get back something.
That doesn't seem like it should go undefined in WebGL.
Two solutions off the top of my head.
1) leave it the way it is but specified that out of range pixels are 0,0,0,0
2) return INVALID_OPERATION if any out of range pixels are requested.
I think I'd prefer #2 because it makes it obvious when you are asking for something that is not part of the current framebuffer unless there is some other reason to go with #1.