glX ?

Monkey Targets Forums/Desktop/glX ?

frank(Posted 2013) [#1]
Happy to see Linux support on 68 I upgraded and it seems all better, but on my Pandora it cannot find GL/glx.h. On Google I find refs to Mesa and OpenGL, but I cannot find any useful references to installing/compling/... this on either Rasberry PI or Pandora. What is it, why is it and where can I find it? :)

Edit: Ok, so glx is for OpenGL and Pandora only has GLES. Any ideas? :)

Edit2: Here https://github.com/elmindreda/glfw it seems that the libraries of GLFW should support it (I'm on a fishing expedition here; anyone?).


slenkar(Posted 2013) [#2]
-pandora has ARM processor so your binary wont work,
there is an option in GLFW to use GLES commands but cross compiling for pandora is still difficult


frank(Posted 2013) [#3]
I don't mind compiling on the Pandora, but it seems that the GLFW delivered with Monkey doesn't support GLES?

(Sorry I know very little about this, I just want to be able to test stuff on the go and this is blocking it :)


slenkar(Posted 2013) [#4]
it sez it does

The gles11 module provides a Monkey wrapper for the OpenGL ES 1.1 API on the android, glfw and ios target.



frank(Posted 2013) [#5]
Oh boy it does... How would I switch that on? Sorry for asking so much, I have been working with HTML5/iOS/Android till now and I really would like to use the rest, but it's very rusty (web dev for the last 12 years... ... you know... or hopefully not :).


slenkar(Posted 2013) [#6]
look in config.monkey in the build folder/glfw
change to true
recompile


frank(Posted 2013) [#7]
Going to try now (excited)!


frank(Posted 2013) [#8]
Not working unfortunately; same errors; missing GL header files for full OpenGL (glx etc). Which makes sense I guess as those are compile time, while the settings in the config.monkey are runtime? At least the GLES setting is...


This version works on Rasberry / Pandora https://github.com/elmindreda/glfw however, the Monkey GLFW is very much different. They are not compatible at all it seems. Running out of ideas... Seems a last 'easy' resolution is to compile the mesa libs and use software rendering there.

Or am I missing something ?


frank(Posted 2013) [#9]
Bit later: I managed to get it to compile with GLFW 3. This required changing quite a bit of stuff I don't know much about :) But it compiles using nice compiles like:

g++ -o MonkeyGame ../stb/stb_image.o ../stb/stb_vorbis.o ../main.o -lGLESv2 -lopenal -L../glfw/src -lglfw3 -lX11 -lXrandr -lXxf86vm -lEGL

Seg faults ofcourse, but compiling is half of the work? :)

Edit: Bit later again ; resolved the seg faults, game seems to run, however, the screen is not showing anything (just black, but on the console I can see it's running the game). I think that's because of the code in int gxtkGraphics::BeginRender() => that's the only thing i'm really not sure about, why all that is needed, but it doesn't work/exist in GLES so removed /changed it.

Edit: It doesn't run that BeginRender stuff. So the window just shows, but is drawing nothing at all... That's kind of as far as my knowledge reaches unfortunately...

Edit: Using GLES_CM and mapping glOrtho to glOrthof, mojo completely compiles, but still a black window. How can I debug that? Any idea?

Edit: Persistence... Sweat... Pain. But it works now :) I have a working GLFW 3 target. Going to clean up now.


slenkar(Posted 2013) [#10]
NICE! good work mon,
could you compile my game for pandora? I was only able to get an android version for the compo.

Do you know how to compile for pandora from a desktop PC with linux?
I could do it myself then

Also, does the sound work?


This also opens up the possibility to port to other open handhelds, but not owning them is a problem :D


frank(Posted 2013) [#11]
Here you go; I'll move the convo to User targets.

https://github.com/tluyben/GLFW-3-Monkey-target

Didn't test sound yet; I've been at this for 18 hours straight (I tried a few different roads first which looked quicker but would definitely be more work).

And yes, sure I can compile your game. Tomorrow I'll get the same thing working on my Rasberry B.


frank(Posted 2013) [#12]
Rasberry Pi is the really interesting thing I think because it's so incredibly cheap. Anyone can buy some for fun and play around. Hopefully that will go smoothly (it's software, it won't, I know :).