![]() |
Re: Xlib+OpenGLES performace
BTW, you no longer need the HILDON_NON_COMPOSITED stuff.
|
Re: Xlib+OpenGLES performace
I managed to get keyboard working in your example :)
you need to change: Code:
\\swa.event_mask = ExposureMask | PointerMotionMask;Code:
while (!quit) {note: you may need to add Code:
#include <X11/Xutil.h>It seems you need to setup this ButtonPressMask and manualy call XSetInputFocus to get keyboard running in X app... I will post in near future very simple code with implemented handling of keyboard, mouse (touchscreen), accelerometer and opengles 2.0, as I'm still working on it :) it's also very modular, splitted into files like "accelerometer.h", "glinit.h", "glrender.h", etc. ; ) Hope this helps many developers to start developing :D ( because this whole setup is the hardest part I think... ) |
Re: Xlib+OpenGLES performace
Quote:
I edited the example already. I tested this on my phone and it works as desired. |
Re: Xlib+OpenGLES performace
Quote:
Argh, you don't need the above. Please set the proper WM_HINTS (the input hint at least), read http://tronche.com/gui/x/xlib/ICC/cl.../wm-hints.html |
Re: Xlib+OpenGLES performace
I've rewritten Exoticorn's sample to make it use my "new" library (which I call SDL_gles) that allows you to easily use OpenGL|ES (either 1.1 or 2.0) within your SDL applications.
Check it out here: http://git.maemo.org/git/sdlhildon/?...egl.cc;hb=HEAD . The entire initialization code gets reduced to Code:
SDL_Init(SDL_INIT_VIDEO);As you can guess, the event handling code is also very much simplified (getting keyboard input, mouse events, is as easy as with any SDL app). The library is already available on extras-devel (package name is "libsdl-gles1.2-dev", garage project is "sdlhildon"). For now, best documentation is the header itself on SDL_gles.h, but I plan to put some simpler examples later (or see the tests directory in git) |
Re: Xlib+OpenGLES performace
Quote:
Code:
Unpacking libsdl-gles1.2-1 (from .../libsdl-gles1.2-1_1.0.0_armel.deb) ... |
Re: Xlib+OpenGLES performace
Quote:
Code:
Nokia-N900-02-8:~# dpkg -l espeak-data libsdl-gles1.2-1If this is scratchbox you're talking about, I think there was a FAQ item about something like that but iirc was fixed in recent PR1.1 onwards rootstraps. |
Re: Xlib+OpenGLES performace
small remark regarding that example as shown on http://wiki.maemo.org/SimpleGL_example:
It uses GL_TRIANGLE_STRIP to draw a quad, but since 5 vertices are given, it actually draws 3 triangles. For triangle srtip, only 4 are needed, but you need to reorder the vertices. Or you just remove the last vertices and draw a GL_TRIANGLE_FAN Stumbled across this while porting the example to Python using ctypes, http://orgetik.de/wp/wordpress/?p=131 if anyone is interested. |
| All times are GMT. The time now is 21:35. |
vBulletin® Version 3.8.8