SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Mar 2014
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Updating the Canvas with Opengl data

    Hi,

    I'm new to web technologies and I have a project where I'm trying to update the canvas of a page with graphics data gotten from the host system. Here's how it should work, I do some opengl drawing on the host system and i send that graphics data to the web page and render it in the canvas. I would like this to be relatively fast (e.g. 30fps). I tried using web sockets for transfering the data but it doesn't seem to work. I was wondering if what I'm trying to do is possible and if so, can I get pointers on how to make it work? Is there a framework that I could use to help with this? (e.g. will Node.js work for this?)

  2. #2
    Community Advisor silver trophy

    Join Date
    Nov 2006
    Location
    UK
    Posts
    2,551
    Mentioned
    40 Post(s)
    Tagged
    1 Thread(s)
    More information required. What are you trying to achieve, why is the data generated server side, what type of data are you trying to transmit (pixel data or drawing operation instructions)? Why can't the canvas data be generated on the client side, from the data source being used to generate imagery on the server?

    I'd think that transferring raw pixel data would be a non-starter from bandwidth requirements, unless the canvas is very small.

  3. #3
    SitePoint Member
    Join Date
    Mar 2014
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's pixel data I want to transfer too the canvas. I'm running within an embedded system and the pixel data is already generated on the system using opengl. I wanted to see if I could display it through a browser on the phone. I have a small server that can get the data and write it to the browser but for some reason, I'm not able to handle it in the browser. I get some errors. I read somewhere that I may need to convert the data to a string (some base64 type stuff which I'm not clear about).

    Bandwidth could be a problem but I was hoping that since it's a small device and the picture size is similar to that of a phone's screen, I wouldn't hit bandwidth issues.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •