Hey fellas. I made an app that simulates motion sensor and sends it to the iOS application. The app is done in JME ( GitHub - nmarkovic04/PhoneyUI: Camera and sensor simulator UI, tutorial and readme is yet to come… I’m planning to open an introduction topic when I’m done 100%). The data is sent to the localhost using a UDP socket. Now… I wanted to try to simulate the camera input by flushing the frame buffer via UDP. I’ve tried getting the plain byte data array from the FrameBuffer class but no luck. Is there a way to get a framebuffer as a byte array? Do you see any problems that might occur ?
Cool! Although I do not have an iOS-enabled device…
From your post it is unclear, how and where you want to simulate the camera input and I have never used FrameBuffer, but I’ll try to advice: from javadoc it is evident that FrameBuffer can render to a Texture. And you can get the byte array from the Texture. Recently I made a video player for JME, based on JavaCV 0.5. It outputs the picture to a textured Quad. And I used that technique. However, from your question, it is unclear if this is what you want.
Also, as for problems, there was a lag (framerate fell below 1 fps) on Intel HD 3000 videocards. I suppose it has no good bus speed. Not a good idea to use something like Intel HD 3000 for games either.
<cite>@noncom said:</cite>
Cool! Although I do not have an iOS-enabled device...
From your post it is unclear, how and where you want to simulate the camera input and I have never used FrameBuffer, but I’ll try to advice: from javadoc it is evident that FrameBuffer can render to a Texture. And you can get the byte array from the Texture. Recently I made a video player for JME, based on JavaCV 0.5. It outputs the picture to a textured Quad. And I used that technique. However, from your question, it is unclear if this is what you want.
Also, as for problems, there was a lag (framerate fell below 1 fps) on Intel HD 3000 videocards. I suppose it has no good bus speed. Not a good idea to use something like Intel HD 3000 for games either.
Sorry for the off-tpic comment, I was wondering if this is a project you shared? As, eventually I (and everyone else) will have a need for this and would love to either see how you accomplished this… or just use it!
Well, just to give the full picture: that player is a part of a framework that I wrote some time ago… I have posted a message in which I introduced the framework built on top of JME that I used for my own projects, but it did not draw attention.
That framewok features:
TUIO multitouch input support with mouse emulation + a bunch of touch-related Controls
GUI module that I used to create my 2D GUIs, which is built on top of Quads and other geometry (No Nifty GUI, no way!), which features images, animations, video playback and easy gui screens creation.
Fast registry of all created objects
A hyperlink system for AppStates
Simplified loaders for different kinds of media…
Maybe something else…
As I was writing it while learning JME, it also has several terrible implementation details that I would kill myself for now but it’s too late…
But:
It does not pretend to be a real finished product, but I found it very comfortable for creating 2D+3D applications, what was required on my job. It is not finished, but I found that most applications did not require more features, but if they did, I just added them to the framework.
It is not supported anymore for the reason:
It is written in Scala, and now I finally migrated to Clojure and it seems like a place to stay. Now I am creating a totally new framework for Clojure.
I published it, see the links below. As it is written in Scala, you would to either have to use Scala, or compile it in a JAR (idk how much will it be compatible with Java programs though), or take the parts that you like and re-implement them in Java… The only thing that I could help with - is to answer questions if any.
Link for the framework: JmeTouch
Also a library of mine, upon which JmeTouch depends: BundleLib
It also depends on such stuff as JavaCV… and some other jars… afaik they’re not in the repo, so if there is a need, I will upload them…