Hi Michael, That sounds like an interesting project!
In terms of hooks to the WebGL implementation - looking at https://github.com/servo/servo/blob/master/components/canvas_traits/webgl.rs#L26 is a reasonable place to start. That defines the interface to a WebGL context. In particular, the WebGLCommand field in that enum defines the WebGL commands you'd need to implement.
Another idea for a similar project could be to hook your renderer up as a rendering backend for WebRender itself (which is the hardware accelerated rendering library that Servo uses to display web pages).
Right now, WebRender targets OpenGL 3.2 on desktop and ES 3.0 on mobile devices. We try to keep all GL specific code in one source file (https://github.com/servo/webrender/blob/master/webrender/src/device.rs). You could potentially implement the functionality in device.rs in a way that targets your renderer, instead of OpenGL.
Cheers On 30/08/17 07:57, michael.brod...@unseen.is wrote:
Hi Devs! My name is Michael Brodeur and I am interested in learning more about the rendering back-ends for Servo? In particular, I wanted to learn more about the architecture for handling 3D graphics. I've written a 3D software renderer that relies upon OpenMP for scaling purposes, but want to rewrite it in Rust and see if I could plug it into Servo somewhere to handle any WebGL calls. Where would I begin looking inside of the codebase in order to accomplish this? Please let me know! Thank you for your help. Best, Michael _______________________________________________ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo
_______________________________________________ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo