[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Public WebGL] Why have readpixels support 5_6_5?
- To: public webgl <email@example.com>
- Subject: [Public WebGL] Why have readpixels support 5_6_5?
- From: "Gregg Tavares (wrk)" <firstname.lastname@example.org>
- Date: Mon, 1 Nov 2010 10:47:07 -0700
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1288633630; bh=djrn0c5GVrSJoVtGPIgFyoYsm58=; h=MIME-Version:Date:Message-ID:Subject:From:To:Content-Type; b=LmYqMSCygIbNMhzgsUt81+eezCzyNywkXS1YLQvF4r1QagAIwHe/mth9NcyxvEsFZ mRJNCbfO4FgVVmmhtYA8w==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=orxDq9XqBToaICk3yehdYomVAnGUcTTGv2LCrnU1HhY=; b=yeP2tIpKioNxRgx7slXDlsRNpG2igZTF+ZlI3kqv9IlTLwqw+irrDFvsRNR8rM/cMw jtFq+3avKPyjZl4vNLVg==
- Domainkey-signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:date:message-id:subject:from:to:content-type; b=fbIzKRcYSOb4w71eqEcGd0dIDLB62Wy2hMo2K0bvSUumPeuCgQEg7SkQ2nwJh+TsIt 3YVZDDs22A6LSO2drvYw==
- Sender: email@example.com
OpenGL ES 2.0 specifically only allows readpixels to work with 2 formats.
1: RGBA / UNSIGNED_BYTE
2: Implementation defined RGB or RGBA format
I'm just guessing but the only reason for the second format is it's the "no conversion" path. In other words, if the hardware is rendering to 4_4_4_4 the second format on that implementation will be RGBA / UNSIGNED_SHORT_4_4_4_4 since no conversion = no memory needed + fast.
WebGL on the other hand is currently speced as requiring the second format to be RGB / UNSIGNED_SHORT_5_6_5 so that the second format is consistent across browsers.
The question I have is why even support a second format in WebGL? If the only reason for the existence of a second format is to avoid conversion and get speed then requiring a specific format in WebGL defeats that goal. A WebGL implementation will have to query if 5_6_5 is supported and if not do the conversion removing all the speed and memory benefits.
With that benefit removed why not just change the WebGL spec only support RGBA / UNSIGNED_BYTE as a readpixels format?