Does Firefox OS synchronize platform and kernel for display? - firefox-os

Can someone help me understand how display rate is synchronized between platform and kernel. Because I am unable to see the use of vsync, as we used to do in Android ?
So I wanted to know how firefox os do it ?

window.requestAnimationFrame() (or use a JavaScript framework that uses it)

Related

How to act like a input or output audio device?

I'm just i a planning phase of an app i might possibly make, and I came across a challenge. In order to accomplish my goal it seams to me that my program will need to act as a microphone and a speaker to the OS. I'm considering to make my program for both Windows and OS X, so my question is as follows:
What libraries do i need in the two operating systems to make them think my program is an audio device? I need to be able to both emulate audio input and output. On Windows i have a feeling that it might be DirectX or something, whereas on OS X i have no clue.
Also if such a library exists, and you have one to suggest, please also suggest a source of documentation. =)
Thanks in advance.
You make your program an actual device and write a device driver for it.
For device driver development on Windows start at http://msdn.microsoft.com/en-us/library/windows/hardware/gg487428.aspx
For device driver development on Os X start at https://developer.apple.com/library/mac/navigation/index.html#section=Topics&topic=Drivers%2C%20Kernel%2C%20%26amp%3B%20Hardware

Custom Linux GUI

I'm interested in creating a GUI for a Linux operating system. What I'm trying to do, is, a program will be the GUI -- the program will have be quite basic. I think this question will go into Embedded Linux development, but I'm not sure where to start neither the amount of tutorials or help available.
Thank you for any help.
I would suggest looking at using Qt with the Linux framebuffer driver. That way you can have an embedded GUI without the overhead of running an X server.
Already done? DirectFB
DirectFB adds graphical power to embedded systems and sets a new standard for graphics under Linux.
CodeTyphon can let you easily code, visually design and cross compile GUI applications for embedded linux with custom canvas if you want.
http://www.pilotlogic.com/sitejoom/index.php?option=com_content&view=article&id=96&catid=68&Itemid=147

How to detect a USB connection in linux/Qt

i am extremely new to both qt and linux , can u please tell me a way how to detect a usb device connection and disconnection using qt in linux platform .
any help , doccuments, urls/sites where i can get the basic information (in detail would be even better) is appriciated.
please help
thanks in advance,
SAMBEET KUMAR
If you have a version available on your platform (most Linux platforms do), you can look into using DBus for notifications of things like that, and Qt has DBus support built-in via a variety of classes.
since you are already working with Qt in a Linux environment, using KDE4 libraries should be easy to understand because they are built on top of Qt and follow similar design principles. With KDE4, you have access to the Solid library for managing system hardware information. This tutorial can help you to get introduced.

How to draw something with OpenGL ES in Linux?

I'm getting started developing with OpenGL ES on ARM/Linux, and I would like to draw something full-screen but don't know where to start.
I'm not developping on iPhone, nor Android. This is a Linux/OpenGL ES question.
I know it's possible to draw on the framebuffer with OpenGL ES without any library but I don't find any resources about that topic, could you help me?
I don't have any code to show how to do it but basicly you use de framebuffer device as the target of OpenGL|ES operations.
Are you developing with an embedded platform as a target? If so, you could use software implementations on your host system and then the actual driver on the embedded device.
There is a small project for supporting OpenGLES 1.1 on linux called dlges. You could also try mesa.
I imagine that the driver itself might have a header for OpenGL that you could look at and see if it supports OpenGLES calls. Alternatively, you could set up function pointers to make your OpenGL Code look more like OpenGL ES.
Good luck!
Don't forget that desktop Linux comes with OpenGL, not OpenGLES! They're similar but not quite compatible. If you want to do work on OpenGLES on a desktop Linux platform, ARM or otherwise, you'll need an OpenGLES emulator library. Sorry, can't recommend any, I'm looking for one myself.
OpenGLES just handles the process of drawing stuff into the window. You also need a windowing library, which handles the process of creating a window to draw stuff into, and an event library, which deals with input events coming back from the window.
SDL will provide both of the last two, as will a bunch of other libraries. Khronos themselves have standardised on EGL as the windowing library and OpenKODE as the event library... but I don't actually know where to get open source implementations of these for Linux. (I work for a company that does EGL and OpenKODE for embedded platforms, so I've never needed to find an open source version!)
ARM offers few GPUs that support OpenGL 2.0. You can find some examples and and emulator that runs on linux on the Mali Developer site.
Of course that's mostly to target ARM GPUs, but I am pretty sure it could be used to examine OpenGL ES programming possibilities.
Here is a tutorial showing how to use SDL in combination with OpenGL ES. It's for the OpenPandora platform, but since that runs Linux, it should be applicable on the desktop if you can get the proper library versions.
Use of SDL is more or less standard with this kind of programming, in Linux. You can of course go the longer route and open the window yourself, attach a GL rendering context and so on, but usually it's easier to learn the relevant parts of SDL. That also gives you easy-to-use API:s for input reading, which is almost always necessary.
You can use PowerVR SDK for Linux http://community.imgtec.com/developers/powervr/graphics-sdk/
There are a lot of samples.

What does the Flash VM use under the hood for drawing?

In windows, what does Flash use under the hood?
It's a relatively simple question which I can never find the answer to. Is it GDI (for windows VM implementations) or something else?
You don't need to go into any of the new GPU acceleration features of Flash. I just really want to know the inner workings because it's NEVER discussed.
On 64-bit Linux, the Flash plugin does not link against SDL (according to ldd). It does, however, link against GTK, GDK, and Cairo. It appears, therefore, that it is using either Cairo or raw Xlib calls to do its drawing on Linux.
I don't know on Windows. Flash tends to have minimal dependencies, but Direct-X may be standard enough that they use it. With some kind of a process examiner to tell you what libraries a process has loaded, you could examine a simple web browser embedding Flash and see what system facilities are actually in use.
DirectX mostly. It's hard to achieve good graphics performance with GDI.
I agree with george, GDI is very bad for speed. DirectX for Windows and SDL or similar for Linux (note this is an assumption!). In that sense it probably uses a layer that communicates with the native graphics subsystem on whatever platform it's running on.

Resources