#21  
Old 08-06-2011, 10:18 AM
theonehumble theonehumble is offline
Junior Member
 
Join Date: Jun 2011
Posts: 18
Thanked: 8 times
Default Re: Sdl 1.2

what would be the bet way to implement this in to SDL? for all the Ports.
i am right now in research on doing a touch controler but theres no document.
Reply With Quote
  #22  
Old 08-06-2011, 02:39 PM
wicket's Avatar
wicket wicket is offline
Junior Member
 
Join Date: Feb 2011
Posts: 25
Thanked: 87 times
Default Re: Sdl 1.2

Control methods are one of my concerns too. It's not much of a problem on the N950 but we need to make our ports suitable for keyboard-less N9. It would be great if we had a common solution to avoid duplicating efforts.

We really do need some sort of touch controller. Something that allows us to divide areas of the screen into touch buttons which can be mapped to keyboard keys or joystick/joypad buttons.

Something like Accelemymote would help a lot. Is anyone working on a Harmattan port of this or something similar? The original developer (Flandry) doesn't seem to be on the community device program.

The virtual keyboard would be unsuitable in many scenarios but would be very useful whenever text entry is required. What would we need to do to display the virtual keyboard from within an SDL app?

Bluetooth or USB keyboards should work but would not be the ideal solution.
Reply With Quote
  #23  
Old 08-06-2011, 06:52 PM
javispedro's Avatar
javispedro javispedro is offline
Senior Member
 
Join Date: Feb 2010
Posts: 264
Thanked: 839 times
Default Re: Sdl 1.2

Quote:
Originally Posted by wicket View Post
Control methods are one of my concerns too. It's not much of a problem on the N950 but we need to make our ports suitable for keyboard-less N9. It would be great if we had a common solution to avoid duplicating efforts.

We really do need some sort of touch controller. Something that allows us to divide areas of the screen into touch buttons which can be mapped to keyboard keys or joystick/joypad buttons.
That is not in my plans at the moment, mostly because doing it is easy enough -- see DrNokSnes, where I did that already for N800 users.

In fact, the same code I used for that in DrNokSnes works already on the N950, and thanks to the time I spent getting multitouch to work on the N950 SDL , the touchscreen controls on DrNokSnes are already multitouch enabled on the N950 -- meaning I can finally play Mario Kart using touchscreen controls alone, and all of this before starting hacking on DrNokSnes.

Quote:
Originally Posted by wicket View Post
Something like Accelemymote would help a lot. Is anyone working on a Harmattan port of this or something similar? The original developer (Flandry) doesn't seem to be on the community device program.
On Harmattan the accelerometer should already be available as the first joystick device.

Quote:
Originally Posted by wicket View Post
The virtual keyboard would be unsuitable in many scenarios but would be very useful whenever text entry is required. What would we need to do to display the virtual keyboard from within an SDL app?
I did some experiments with this on Fremantle and Diablo: http://javispedro.com/maemo/captures/dosboxhwr.png

I did never really release that because h-i-m was crippled in the sense that you could not get individual virtual keydown/keyup events, but rather text events. The Meegotouch input method/Maliit is way better in that regard. I will do this, but it'll probably only happen after the N9 is released since it's not prioritary atm.
Reply With Quote

The Following 2 Users Say Thank You to javispedro For This Useful Post:
  #24  
Old 08-06-2011, 07:32 PM
javispedro's Avatar
javispedro javispedro is offline
Senior Member
 
Join Date: Feb 2010
Posts: 264
Thanked: 839 times
Default Re: Sdl 1.2

Quote:
Originally Posted by theonehumble View Post
what would be the bet way to implement this in to SDL? for all the Ports.
i am right now in research on doing a touch controler but theres no document.
I understand this is probably more simple than what you want, but I made a few weeks ago this program that is a very simple multitouch "doodle" SDL application. It shows how to distinguish multiple fingers using this (or WebOS') SDL.
It works on both the N950 and the Meego IdeaPad.

(If you are interested on why I draw that pattern on the videos, it's because of an old lcuk joke ).
Reply With Quote

The Following 2 Users Say Thank You to javispedro For This Useful Post:
  #25  
Old 08-11-2011, 11:37 AM
aaporantalainen aaporantalainen is offline
Junior Member
 
Join Date: Jun 2011
Posts: 23
Thanked: 28 times
Default Re: Sdl 1.2

[N950]
So what is working version of this sdl-gles example (from post14)?

I tried to add missing lines to initGL, but didn't get it working:
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 1);

It doesn't create window, but I can see
16637 frames in 5 seconds = 3327.4 FPS
19617 frames in 5 seconds = 3923.4 FPS
19637 frames in 5 seconds = 3927.4 FPS
...

And it stops when screen is touched (as expected).

I used png-image which is 256x256px.
Reply With Quote
  #26  
Old 08-11-2011, 11:46 AM
javispedro's Avatar
javispedro javispedro is offline
Senior Member
 
Join Date: Feb 2010
Posts: 264
Thanked: 839 times
Default Re: Sdl 1.2

See post 19. You need to do all SetAttribute calls before SetVideoMode.

Also, there is no need for GL_DOUBLEBUFFER; it is always enabled on the N950.

Yes, this means you cannot disable vsync on the N950. Curiously enough, we've gone from not being able to enable vsync (N900) to NOT being able to disable it (N950). Fun stuff!
At least, vsync-ed OpenGL is a great pleasure. But SwapBuffers() will _sleep_ if you try to do more than 60fps., take that into account if benchmarking!
Reply With Quote

The Following User Says Thank You to javispedro For This Useful Post:
  #27  
Old 08-11-2011, 02:59 PM
aaporantalainen aaporantalainen is offline
Junior Member
 
Join Date: Jun 2011
Posts: 23
Thanked: 28 times
Default Re: Sdl 1.2

I modified Fremantle example, and it is working on N950 / Harmattan: http://wiki.meego.com/SDL_Gles
Reply With Quote

The Following 3 Users Say Thank You to aaporantalainen For This Useful Post:
  #28  
Old 08-11-2011, 04:26 PM
ph5's Avatar
ph5 ph5 is offline
Member
 
Join Date: Feb 2010
Posts: 38
Thanked: 94 times
Default Re: Sdl 1.2

To get sound in Frogatto, I followed javispedro's advice and just compiled sdl-mixer1.2 from debian unstable (1.2.8-6.3) with the following changes:

Code:
diff --git a/debian/control b/debian/control
index 582eeea..e332d86 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
 Maintainer: Debian SDL packages maintainers <pkg-sdl-maintainers@lists.alioth.debian.org>
 Uploaders: Sam Hocevar (Debian packages) <sam+deb@zoy.org>, Aurelien Jarno <aurel32@debian.org>, Josselin Mouette <joss@debian.org>, Barry deFreese <bdefreese@debian.org>
 Standards-Version: 3.8.1
-Build-Depends: debhelper (>= 5.0), quilt, libtool, libsdl1.2-dev (>= 1.2.4), libogg-dev, libvorbis-dev (>= 1.0.0-3), libsmpeg-dev (>= 0.4.5+cvs20030824-1.3), libmikmod-dev
+Build-Depends: debhelper (>= 5.0), quilt, libtool, libsdl1.2-dev (>= 1.2.4), libogg-dev, libvorbisidec-dev (>= 1.0.0-3)
 Homepage: http://www.libsdl.org/projects/SDL_mixer/
 
 Package: libsdl-mixer1.2
@@ -18,7 +18,7 @@ Description: mixer library for Simple DirectMedia Layer 1.2
 
 Package: libsdl-mixer1.2-dev
 Architecture: any
-Depends: libsdl-mixer1.2 (= ${binary:Version}), libc6-dev, libsdl1.2-dev (>= 1.2.4), libogg-dev, libvorbis-dev, libsmpeg-dev (>= 0.4.4-7), libmikmod-dev
+Depends: libsdl-mixer1.2 (= ${binary:Version}), libc6-dev, libsdl1.2-dev (>= 1.2.4), libogg-dev, libvorbisidec-dev
 Conflicts: libsdl-mixer-dev, libsdl-mixer1.0-dev, libsdl-mixer1.1-dev
 Section: libdevel
 Description: development files for SDL1.2 mixer library
diff --git a/debian/rules b/debian/rules
index f91aeac..dbff414 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,7 +12,7 @@ else
 endif
 
 confflags += --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
-confflags += --enable-music-native-midi-gpl --enable-music-libmikmod
+confflags += --enable-music-ogg-tremor
 confflags += --disable-music-ogg-shared
 confflags += --disable-music-mp3-shared
 confflags += "CPPFLAGS=-Wall"
I guess libsmpeg and libmikmod support should be added back, and maybe harmattan resource policy support, but maybe this is good enough for a start.
Reply With Quote
  #29  
Old 08-11-2011, 09:44 PM
javispedro's Avatar
javispedro javispedro is offline
Senior Member
 
Join Date: Feb 2010
Posts: 264
Thanked: 839 times
Default Re: Sdl 1.2

Quote:
Originally Posted by ph5 View Post
sdl-mixer1.2
Palm has a version that uses FFMPEG instead of the rather large amount of libraries; that is the one I will eventually upload when I get to it
Reply With Quote

The Following 3 Users Say Thank You to javispedro For This Useful Post:
  #30  
Old 08-19-2011, 11:44 AM
theonehumble theonehumble is offline
Junior Member
 
Join Date: Jun 2011
Posts: 18
Thanked: 8 times
Default Re: Sdl 1.2

@javispedro
.deb libsdl-image1.2 has an issue with the the control (a little one) its depending on libsdl1.2debian (>> 1.2.4), if Im not mistaken shouldn't it be depending on libsdl1.2 (= 1.2.14-0maemo3)?
Reply With Quote

The Following 2 Users Say Thank You to theonehumble For This Useful Post:
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:23 PM.