Framebuffer access

Monkey Forums/Monkey Programming/Framebuffer access

frank(Posted 2011) [#1]
Due to this post;

http://www.monkeycoder.co.nz/Community/posts.php?topic=1910

I'm wondering if it is not possible to make cross platform framebuffer access? Aka get a mojo.graph version x:DirectBuffer = getDirectBuffer() , setDirectBuffer(x:DirectBuffer, start:Int = 0) or something like that?

Note : therevills already did most of that, so finishing it and putting it into production version would be a good idea or not?


visionastral(Posted 2011) [#2]
It would be REALLY cool if Mark could expand the mojo framework to support this, since it's VERY usefull for plenty of things like level editors and the like.
Right now I'm making my editors in Blitz Basic, but it's not very handy when you are making an engine for xna in monkey...


frank(Posted 2011) [#3]
What is the problem doing that? I mean it shouldn't be that hard should it?


AdamRedwoods(Posted 2011) [#4]
You mean like openGL's framebuffers? You don't have that in Flash or XNA, and since Mark wants to keep mojo for all targets, you'd need another angle.

GetPixel/SetPixel can be done for all platforms, I think someone has code around.


Samah(Posted 2011) [#5]
I'm pretty sure Android's implementation of GLES doesn't support framebuffers either as I found out when trying to render to textures in libGDX.


AdamRedwoods(Posted 2011) [#6]
It should, but aim for Android 2.2 (Opengl es 2.0) to be sure, for libgdx. But monkey is ONLY Opengl 1.1!
https://secure.wikimedia.org/wikipedia/en/wiki/OpenGL_ES#Usage

List of Android devices and extensions, FBO is there for some of them:
http://stackoverflow.com/questions/2093594/opengl-extensions-available-on-different-android-devices


Samah(Posted 2011) [#7]
It should, but aim for Android 2.2 (Opengl es 2.0) to be sure, for libgdx.

This was compiled for Honeycomb, running on a Xoom.


AdamRedwoods(Posted 2011) [#8]
framebuffer should work. Odd if it doesn't. Did you check glError()?


Samah(Posted 2011) [#9]
Trying to use this: http://code.google.com/p/libgdx/source/browse/trunk/gdx/src/com/badlogic/gdx/graphics/glutils/FrameBuffer.java
I got a GdxException, something about unsupported extension. I told it to use 2.0 but apparently it wasn't. Given that the app I was developing is Honeycomb-only, I can probably ignore < 2.0 support.


AdamRedwoods(Posted 2011) [#10]
you may have to enable opengl2.0 in the android manifest, too, but maybe you tried that. can't think of why it wouldnt work without compiling it myself.