What are the differences between WebGL, WebGPU and WASM with OpenGL? [closed] - webgl

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 24 days ago.
Improve this question
I'm confused about the technologies listed above.
I understand that WebGPU is somehow faster than WebGL. Why is that, I couldn't find...
WebGL, WebGPU and OpenGL (C++) all need WebAssembly to run in the browser.
OpenGL with WASM will be always faster than WebGPU / WebGL.
Am I correct?

I understand that WebGPU is somehow faster than WebGL. Why is that, I couldn't find...
WebGPU is a standardized interface to graphics hardware, WebGL is a different one. Both have different approaches, capabilities and hence slightly different target audiences, I'd say.
So, you can't find reasons because your statement is not generally true.
WebGL, WebGPU and OpenGL (C++) all need WebAssembly to run in the browser.
Definitely not true.
At least WebGPU works directly from JavaScript.
WebGL is a javascript API to begin with
OpenGL (C++): For one, OpenGL is a C API, not C++, but you can use it from C++. Since the only way to do OpenGL on something that doesn't support OpenGL directly is an emulation, and the only feasible OpenGL emulator for browser platforms is a WASM library, that's true.
OpenGL with WASM will be always faster than WebGPU / WebGL.
Definitely not right. Much of OpenGL needs to be emulated on basis of the techniques actually supported by the browser. So, should you choose for some reason to use the OpenGL emulation instead of writing WebGL with the supported subset of OpenGL ES (not the same as OpenGL), you're likely to be slower, but your mileage might vary, depending on how bad (or good) your code is.

Related

Should webgl be used for simple websites? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
Should webgl be used for simple websites?
I'm not sure or it is wise to use webgl for a simple website just to give it a better look. Will this work on all devices?
WebGL is widely supported today https://www.caniuse.com/#feat=webgl
Whether you "should" use it or not is a broad question. Remember that you aim at improving the user experience. People are forgiving when they play video games, but they don't want to hear their computer fans spin, witness their battery discharging very fast or feel their device getting hot when all they wanted was to read a cooking recipe. Try to be user friendly.
You may for instance want to cap the framerate and/or reduce the resolution on high definition devices, pause the animation loop when the window looses focus (which is not the default behaviour of requestAnimationFrame) or when there is nothing changing on the screen (if the WebGL element is interactive for example). Also, try to write efficient algorithms: it's easy to start writing things on the fragment shader or the CPU when they should be done on the vertex shader. There are many ways to accomplish the same thing and they don't put the same stress on the computer.

How to run synthesized VHDL code on Xilinx Zynq-7000 All Programmable SoC ZC702 Evaluation Kit (FPGA SDSoC) [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
In my work I have to prove that the synthesized C++ visual algorithm code in VHDL (made via Vivado HLS) running on FPGA part on Zynq702 from Xilinx is quicker then classic C++ code on conventional CPU.
The main problem witch I am not able to resolve is - how is possible to "load" the synthesized code into SDK tool from Vivado 2016 tool, in other words - how is possible to run the synthesized VHDL code (bitstream) on the board?
In my opinion, the SDK program is only for C / C++ code. Is there any way how can I get the bitstream of VHDL code on the processor and prove that the synthesized code running on FPGA is quicker then the original C++ code?
Can you give me an advise ? I went through several YouTube tutorials and forums but it didn't help me.
Basically you need two versions of your code. One C/C++ version meant to run on the CPU and a version in C/C++ (slightly adapted) to use with HLS (targeting programmable logic) .
Xilinx offers a tool named SDSoC which does that for you. Basically you write your application once in C/C++. A profiler tells you which function uses most computational power and you can mark these functions to be off-loaded to programmable logic. The tool will use Vivado HLS in the background to convert your C/C++ to RTL code. SDSoC will tell you what the expected speedup is compared to the original code which runs entirely in the CPU.
I would suggest you to read through UG1028

Getting started with Metal [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I'm an Objective-C / Swift software developer (in training) currently with an application in the App Store. But I have recently really been interested in Metal, Apple's new alternative to OpenGL. But I'm not exactly sure how to begin... Apple's documentation is handy, but only if you really know what you are doing in the first place. Are there any good tips to beginning? I really haven't explored the area of 3D game programming so would you recommend I learn another language first? And if so which?
I'm just looking for good tutorial books or sites that get in depth with the how and why. I like to understand what exactly I'm doing instead of just typing in code, but there are so many languages and beginner's books that I really don't know where to start... Can anyone help me with this?
Metal is a newer graphics API. So if you are new to graphics and 3D game programming you may want to start with OpenGL- specifically since there are many textbooks out there that teaches you fundamentals of graphics using OpenGL. As for a web page on OpenGL, one of my favorite ones is songho. Books on OpenGL ES2.0 and OpenGL ES3.0 includes sections on programming with OpenGLES for iOS.
If you would specifically like to explore Metal API itself, there are multiple videos from WWDC 2014 that details on the basics and has demos on how to do work with Metal in Xcode. An introductory article that details on what and why with respect to Metal is the objc.io one. And a more detailed one is metalbyexample.
To understand in depth as to how these graphics APIs work, you might need a grasp on GPU architecture. The Real-Time Rendering is probably the best book on the subject. These lecture videos from Prof. John Owens at UC Davis also describes the architecture in a clear and concise manner.
I would definitely recommend Marius Horga's blog as a starting point. It is how I started and Marius is always willing to help.
Another place to go is metalbyexample.com by Warren Moore and of course his book. However, it has a significant amount of code written in Objective-C, but it is fairly easy to translate to Swift.
Download the sample code from Apple at: https://developer.apple.com/metal/
Recently I created a GitHub repo how to translate Shadertoy shader code into Metal, which you can access it in here.
[Important Note] - Some of the sample code given is already incompatible with Xcode 8 and Swift 3 and you will need to work out the changes needed to prevent the compiler from choking on them. If you need three great code samples by Apple showing how to use textures, multithreading at the CPU and GPU level, and how to draw primitives in Metal, being also Xcode 8 beta 6, Swift 3 compatible, just send me an email and I will send them to you.

What is Webgl ? How it work on it? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
What is Webgl and How to make something in it ?
I have given an assignment to make rotating globe in Webgl but I donot know that what it is and how to work on it, I only know how to code this in HTML. What should I do ? please help.
WebGL is a branch of OpenGL based on OpenGL Embedded Systems (ES). It is run in browsers through a <canvas> element after getting a context from said element. All calls are done through JavaScript. You can find a ton of tutorials through google. One that I used a lot when I was starting can be found here: Mozilla WebGL Tutorial
Additionally, WebGL is still growing and while most modern browsers support it, you may need to enable it. There are also some features or caveats between implimentations. For example, Internet Explorer 11 supports WebGL but I found that you cannot use structs in your GLSL yet, a feature that Chrome and Firefox both support. To find out if you can run WebGL, either go to a demo page such as the one found here: Chrome Experiments or just go here: Get WebGL
WebGL is a JavaScript library for drawing 3D graphics (based on the OpenGL ES 2.0 API) in a web browser inside of an HTML5 canvas element. Using it will require some knowledge of writing OpenGL vertex and fragment shaders, and computer graphics in general.
There are many sites on the internet that contain samples (very likely for precisely what you've been asked to do). However, if you want to learn, there are some simple examples at Ed Angel's web site.

Open source machine vision libraries [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Which free/open source machine/computer vision libraries do exist?
Summary of answers
Libraries
OpenCV
SimpleCV
VxL
VLFeat
LibCVD
iceWing
CImg
Motion
ccv
Other
RoboRealm Vision Software Applications
Wikipedia: List of SIFT implementations
Stack Overflow: What is the best image manipulation library
What language are you using? VLFeat seems like a pretty good one for C++ (and actively maintained), though I haven't actually used it. I'm mainly familiar with SIFT - there's a number of implementations listed at the bottom of the Wikipedia article.
libCVD http://savannah.nongnu.org/projects/libcvd
Cambridge Video Dynamics - Library for images, video capture, display, computer vision and more. Integrates well with TooN for a linear algebra framework. Language: C++
This is actively developed, and has a lot of useful features and algorithms, and generally those guys make things to work very fast.
It is LGPL.
It is possible to compile it on Win, Linux and MacOS X.
There is also an intention to provide port for Python with this one, to allow
to prototype Computer Vision algorithms with Python and SciPy very fast (i am not sure at which stage it is now, but there was a paper about it in a Python conference.)
If you are trying to do anything in real-time you should seriously consider libCVD.
For example,
PTAM (Parallel Tracking And Mapping) framework by Georg Klein uses this library.
RoboRealm compiled a huge list of vision software.
This older question mentions lots of libraries.
My university works with IceWing a rapid prototyping for vision tasks that is used to add tasks make chains out of them and have a GUI for seeing the results etc.
The library is widely used for vision related tasks in all the robots that are developed in Bielefeld
You can find the library here
If you are programing C++ you could check out CImg. While it may not be the most optimized library out there I have found it to be user friendly. It's also neat that it does not force you to deploy additional dlls.
If you need only motion detection, you could get away with Motion

Resources