[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] off-line opengl render?

I wrote something to render print resolution images with WebGL a while ago. Its hacky and extremely ugly but it served the purpose.

1.click on the "stop" link at the top to pause animation

The result will be a 10K image rendered as 1K buckets. Most time is spent in jpeg encoding and everything is stored in DOM elements. Did I mention its ugly? :)

The bucket division and rendering logic is here:

I'm using Vlad's mjsÂlibraryÂfor projection matrices and I added a custom perspective projector withÂfrustumÂoffsets for the buckets:

Aleksandar RodiÄ
+1 510 761 5522

On Tue, Jun 19, 2012 at 10:20 AM, Florian BÃsch <pyalot@gmail.com> wrote:
On Tue, Jun 19, 2012 at 12:31 PM, Tom Sparks <tom_a_sparks@yahoo.com.au> wrote:
I don't know if my local webgl runtime can deal with large images, but then there are limitation with url length
ÂAll WebGL implementations support 2048x2048 and most (91%) support 4096x4096.
You don't need dataURL, you can obtain the image rendered if you attach a texture to an FBO and perform a readPixels from the FBO, you will get a typed Uint8Array back.
Upload to your server can be done with XHR2 that can transmit binary data, so no expensive conversion to base64 or the like required.