<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Djbclark</id>
	<title>WebOS Internals - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Djbclark"/>
	<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/wiki/Special:Contributions/Djbclark"/>
	<updated>2026-04-20T01:03:01Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=LibSDL_Research&amp;diff=8456</id>
		<title>LibSDL Research</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=LibSDL_Research&amp;diff=8456"/>
		<updated>2010-01-16T18:12:43Z</updated>

		<summary type="html">&lt;p&gt;Djbclark: /* SDL_vnc */ Someone got this to work :-)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: SDL]]&lt;br /&gt;
&lt;br /&gt;
== Source material ==&lt;br /&gt;
&lt;br /&gt;
[ http://palm.cdnetworks.net/opensource/1.3.5/libsdl-1.2.tgz (base SDL Lib)] &lt;br /&gt;
&lt;br /&gt;
[ http://palm.cdnetworks.net/opensource/1.3.5/libsdl-1.2-patch.gz (Palm patches)]&lt;br /&gt;
&lt;br /&gt;
== New files in patch == &lt;br /&gt;
&lt;br /&gt;
patch -p0 &amp;lt; ../libsdl-1.2-patch &amp;gt; /dev/null     gives us only new files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Patching ==&lt;br /&gt;
&lt;br /&gt;
tar xvzf libsdl-1.2.tgz &amp;amp;&amp;amp; zcat libsdl-1.2-patch.gz | patch -p0&lt;br /&gt;
&lt;br /&gt;
== Compiling ==&lt;br /&gt;
&lt;br /&gt;
Currently this fails to compile due to missing Piranha headers:&lt;br /&gt;
&lt;br /&gt;
sh autogen.sh; ./configure --disable-ipod --enable-webos --enable-video-opengles&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 gcc -g -O2 -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -Werror-implicit-function-declaration -DPALM -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/video/fbcon/SDL_fbvideo.c -o build/SDL_fbvideo.o &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
/bin/sh ./libtool --mode=compile gcc -g -O2  -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -Werror-implicit-function-declaration -DPALM -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/video/fbcon/SDL_fbvfb.cc  -o build/SDL_fbvfb.lo&lt;br /&gt;
 gcc -g -O2 -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -Werror-implicit-function-declaration -DPALM -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/video/fbcon/SDL_fbvfb.cc  -fPIC -DPIC -o build/.libs/SDL_fbvfb.o&lt;br /&gt;
cc1plus: warning: command line option &amp;quot;-Werror-implicit-function-declaration&amp;quot; is valid for C/ObjC but not for C++&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:5:30: error: Piranha/PContext.h: No such file or directory&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:6: error: 'PContext2D' does not name a type&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc: In function 'void FB_VfbBlit(FB_VfbBlitSurface*, FB_VfbBlitSurface*, int)':&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:13: error: 'PPixmap' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:13: error: 'DstPix' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:13: error: 'Context' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:14: error: 'PFORMAT_8888' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:18: error: 'SrcPix' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:21: error: 'PMatrix3D' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:21: error: expected `;' before 'Transform'&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:23: error: 'Transform' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:23: error: 'PValue' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:24: error: 'PVertex2D' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:26: error: 'Transform' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:28: error: 'PVertex2D' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:28: error: expected `;' before 'DstStart'&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:29: error: expected `;' before 'DstEnd'&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:31: error: expected `;' before 'SrcStart'&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:32: error: expected `;' before 'SrcEnd'&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:37: error: 'DstStart' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:37: error: 'DstEnd' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:37: error: 'SrcStart' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:37: error: 'SrcEnd' was not declared in this scope&lt;br /&gt;
make: *** [build/SDL_fbvfb.lo] Error 1&lt;br /&gt;
root@castle:~/libsdl-1.2#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== SDL Extensions on Pre ==&lt;br /&gt;
SDL_Image &amp;lt;br&amp;gt;&lt;br /&gt;
SDL_TTF&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== SDL Nuances ==&lt;br /&gt;
- Only supports SDSURFACE and .. &amp;lt;br&amp;gt;&lt;br /&gt;
- Does not support Double Buffering = SDL_Flip&amp;lt;br&amp;gt;&lt;br /&gt;
- SDL_Image did not appear to handle PNG files correctly (zonyl)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== SDL Input Devices ==&lt;br /&gt;
=== Joysticks ===&lt;br /&gt;
&lt;br /&gt;
== SDL Applications ==&lt;br /&gt;
Via WebOS 1.3.5+ - [http://www.palminfocenter.com/news/10016/palms-native-webos-app-secrets-revealed/ Palm's Native webOS App Secrets Revealed]&lt;br /&gt;
&lt;br /&gt;
=== SDL_vnc ===&lt;br /&gt;
If SDL_vnc works, would be a way of running arbitrary X11 applications on the Palm Pre: &lt;br /&gt;
[http://www.ferzkopp.net/Software/SDL_vnc/ SDL_vnc]&lt;br /&gt;
&lt;br /&gt;
'''Update:''' This has now been done; see [[Application:SdlVNC]] :-)&lt;br /&gt;
&lt;br /&gt;
=== SDL Terminal ===&lt;br /&gt;
A pseudo-ansi SDL terminal (or console) library - [http://sourceforge.net/projects/sdl-terminal/ sdl-terminal]&lt;/div&gt;</summary>
		<author><name>Djbclark</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Category:SDL&amp;diff=8166</id>
		<title>Category:SDL</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Category:SDL&amp;diff=8166"/>
		<updated>2010-01-06T17:03:38Z</updated>

		<summary type="html">&lt;p&gt;Djbclark: Added brief summary text&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SDL, the [http://www.libsdl.org/ Simple DirectMedia Layer], also called libsdl, is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.&lt;br /&gt;
&lt;br /&gt;
You can [http://www.palminfocenter.com/news/10016/palms-native-webos-app-secrets-revealed run SDL applications from a Luna card] in WebOS 1.3.5 and later.&lt;/div&gt;</summary>
		<author><name>Djbclark</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=LibSDL_Research&amp;diff=8165</id>
		<title>LibSDL Research</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=LibSDL_Research&amp;diff=8165"/>
		<updated>2010-01-06T17:00:47Z</updated>

		<summary type="html">&lt;p&gt;Djbclark: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: SDL]]&lt;br /&gt;
&lt;br /&gt;
== Source material ==&lt;br /&gt;
&lt;br /&gt;
[ http://palm.cdnetworks.net/opensource/1.3.5/libsdl-1.2.tgz (base SDL Lib)] &lt;br /&gt;
&lt;br /&gt;
[ http://palm.cdnetworks.net/opensource/1.3.5/libsdl-1.2-patch.gz (Palm patches)]&lt;br /&gt;
&lt;br /&gt;
== New files in patch == &lt;br /&gt;
&lt;br /&gt;
patch -p0 &amp;lt; ../libsdl-1.2-patch &amp;gt; /dev/null     gives us only new files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Patching ==&lt;br /&gt;
&lt;br /&gt;
tar xvzf libsdl-1.2.tgz &amp;amp;&amp;amp; zcat libsdl-1.2-patch.gz | patch -p0&lt;br /&gt;
&lt;br /&gt;
== Compiling ==&lt;br /&gt;
&lt;br /&gt;
Currently this fails to compile due to missing Piranha headers:&lt;br /&gt;
&lt;br /&gt;
sh autogen.sh; ./configure --disable-ipod --enable-webos --enable-video-opengles&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 gcc -g -O2 -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -Werror-implicit-function-declaration -DPALM -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/video/fbcon/SDL_fbvideo.c -o build/SDL_fbvideo.o &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
/bin/sh ./libtool --mode=compile gcc -g -O2  -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -Werror-implicit-function-declaration -DPALM -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/video/fbcon/SDL_fbvfb.cc  -o build/SDL_fbvfb.lo&lt;br /&gt;
 gcc -g -O2 -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -Werror-implicit-function-declaration -DPALM -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/video/fbcon/SDL_fbvfb.cc  -fPIC -DPIC -o build/.libs/SDL_fbvfb.o&lt;br /&gt;
cc1plus: warning: command line option &amp;quot;-Werror-implicit-function-declaration&amp;quot; is valid for C/ObjC but not for C++&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:5:30: error: Piranha/PContext.h: No such file or directory&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:6: error: 'PContext2D' does not name a type&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc: In function 'void FB_VfbBlit(FB_VfbBlitSurface*, FB_VfbBlitSurface*, int)':&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:13: error: 'PPixmap' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:13: error: 'DstPix' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:13: error: 'Context' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:14: error: 'PFORMAT_8888' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:18: error: 'SrcPix' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:21: error: 'PMatrix3D' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:21: error: expected `;' before 'Transform'&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:23: error: 'Transform' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:23: error: 'PValue' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:24: error: 'PVertex2D' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:26: error: 'Transform' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:28: error: 'PVertex2D' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:28: error: expected `;' before 'DstStart'&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:29: error: expected `;' before 'DstEnd'&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:31: error: expected `;' before 'SrcStart'&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:32: error: expected `;' before 'SrcEnd'&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:37: error: 'DstStart' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:37: error: 'DstEnd' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:37: error: 'SrcStart' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:37: error: 'SrcEnd' was not declared in this scope&lt;br /&gt;
make: *** [build/SDL_fbvfb.lo] Error 1&lt;br /&gt;
root@castle:~/libsdl-1.2#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== SDL Applications ==&lt;br /&gt;
Via WebOS 1.3.5+ - [http://www.palminfocenter.com/news/10016/palms-native-webos-app-secrets-revealed/ Palm's Native webOS App Secrets Revealed]&lt;br /&gt;
&lt;br /&gt;
=== SDL_vnc ===&lt;br /&gt;
If SDL_vnc works, would be a way of running arbitrary X11 applications on the Palm Pre: &lt;br /&gt;
[http://www.ferzkopp.net/Software/SDL_vnc/ SDL_vnc]&lt;br /&gt;
&lt;br /&gt;
=== SDL Terminal ===&lt;br /&gt;
A pseudo-ansi SDL terminal (or console) library - [http://sourceforge.net/projects/sdl-terminal/ sdl-terminal]&lt;/div&gt;</summary>
		<author><name>Djbclark</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=OpenGL_Triangle_of_Doom&amp;diff=8164</id>
		<title>OpenGL Triangle of Doom</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=OpenGL_Triangle_of_Doom&amp;diff=8164"/>
		<updated>2010-01-06T16:52:55Z</updated>

		<summary type="html">&lt;p&gt;Djbclark: Added Category:SDL&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:SDL]]&lt;br /&gt;
&lt;br /&gt;
== The demo app ==&lt;br /&gt;
&lt;br /&gt;
[[Image:Opengldemo.png|160px|left]]This app is loosely based on a [http://wiki.maemo.org/SimpleGL_Example an OpenGL example from the maemo project] and is ported from X11 OpenGL code to SDL to function in webos&lt;br /&gt;
&lt;br /&gt;
First, follow the tutorial [[ScratchBox2 cross compiling with SDL]] to set up the cross compilation environment.&lt;br /&gt;
&lt;br /&gt;
Next, copy the source below into a file doomtriangle.c &lt;br /&gt;
&lt;br /&gt;
Now run scratchbox2 with the webos / pre mapping file:&lt;br /&gt;
 $ sb2 -M /srv/preware/cross-compile/staging/mapping-armv7&lt;br /&gt;
&lt;br /&gt;
You will get a different prompt indicating you are in a scratchbox shell, like:&lt;br /&gt;
 [SB2 mapping-armv7 armv7] $&lt;br /&gt;
&lt;br /&gt;
Now just &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gcc -Wl,-rpath-link=/usr/local/lib -I/usr/local/include/SDL -L/usr/local/lib -o doomtriangle doomtriangle.c -lSDL -lGLESv2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, copy the resulting binary doomtriangle to your pre and run it.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===doomtriangle.c===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;quot;SDL.h&amp;quot;&lt;br /&gt;
#include &amp;quot;SDL_opengles.h&amp;quot;&lt;br /&gt;
#include &amp;quot;SDL_video.h&amp;quot;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/time.h&amp;gt;&lt;br /&gt;
#include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
const char* vertexSrc = &amp;quot;attribute vec4 position; varying mediump vec2 pos; void main() { gl_Position = position; pos = position.xy; }&amp;quot;;&lt;br /&gt;
const char* fragmentSrc = &amp;quot;varying mediump vec2 pos; uniform mediump float phase; void main() { gl_FragColor = vec4(1, 1, 1, 1) * sin((pos.x * pos.x + pos.y * pos.y) * 40.0 + phase); }&amp;quot;;&lt;br /&gt;
//const char* fragmentSrc = &amp;quot;varying mediump vec2 pos; uniform mediump float phase; void main() { gl_FragColor = vec4(1, 1, 1, 1) * step(pos.x * pos.x + pos.y * pos.y, phase * 0.2); }&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
void printShaderInfoLog(GLuint shader) {&lt;br /&gt;
    GLint length;&lt;br /&gt;
    glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &amp;amp;length);&lt;br /&gt;
    if(length) {&lt;br /&gt;
        char* buffer = (char *)malloc( sizeof(char) * length ) ;&lt;br /&gt;
        glGetShaderInfoLog(shader, length, NULL, buffer);&lt;br /&gt;
        printf(&amp;quot;%s&amp;quot;, buffer);&lt;br /&gt;
        free( buffer ) ;&lt;br /&gt;
        GLint success;&lt;br /&gt;
        glGetShaderiv(shader, GL_COMPILE_STATUS, &amp;amp;success);&lt;br /&gt;
        if(success != GL_TRUE) {&lt;br /&gt;
            exit(1);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
GLuint createShader(GLenum type, const char* pSource) {&lt;br /&gt;
    GLuint shader = glCreateShader(type);&lt;br /&gt;
    glShaderSource(shader, 1, &amp;amp;pSource, NULL);&lt;br /&gt;
    glCompileShader(shader);&lt;br /&gt;
    printShaderInfoLog(shader);&lt;br /&gt;
    return shader;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int phaseLocation ;&lt;br /&gt;
&lt;br /&gt;
const float vertexArray[] = {&lt;br /&gt;
    0, -1, 0, 1,&lt;br /&gt;
    1, 1, 0, 1,&lt;br /&gt;
    -1, 1, 0, 1&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#define false 0&lt;br /&gt;
#define true 1&lt;br /&gt;
#define bool int&lt;br /&gt;
&lt;br /&gt;
void render() {&lt;br /&gt;
        static float offset = 0;&lt;br /&gt;
&lt;br /&gt;
        glViewport(0, 0, 320, 480 ) ;&lt;br /&gt;
        glClearColor(0, 1, 0, 1);&lt;br /&gt;
        glClear(GL_COLOR_BUFFER_BIT);&lt;br /&gt;
        &lt;br /&gt;
        glUniform1f(phaseLocation, offset);&lt;br /&gt;
        &lt;br /&gt;
        glVertexAttribPointer(0, 4, GL_FLOAT, false, 0, vertexArray);&lt;br /&gt;
        glEnableVertexAttribArray(0);&lt;br /&gt;
        glDrawArrays(GL_TRIANGLE_STRIP, 0, 3);&lt;br /&gt;
        &lt;br /&gt;
        SDL_GL_SwapBuffers( ) ;&lt;br /&gt;
        &lt;br /&gt;
        offset = fmodf(offset + 0.2, 2*3.141f);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int main() {&lt;br /&gt;
&lt;br /&gt;
    if( SDL_Init( SDL_INIT_VIDEO ) &amp;lt; 0 ) {&lt;br /&gt;
        fprintf( stderr, &amp;quot;Couldn't initialize SDL: %s\n&amp;quot;, SDL_GetError() ) ;&lt;br /&gt;
        exit( 1 ) ;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if ( SDL_SetVideoMode( 320, 480, 32, SDL_OPENGLES ) == NULL ) {&lt;br /&gt;
        fprintf(stderr, &amp;quot;Couldn't set GL mode: %s\n&amp;quot;, SDL_GetError());&lt;br /&gt;
        SDL_Quit();&lt;br /&gt;
        exit(1);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    printf(&amp;quot;Screen BPP: %d\n&amp;quot;, SDL_GetVideoSurface()-&amp;gt;format-&amp;gt;BitsPerPixel);&lt;br /&gt;
    printf(&amp;quot;\n&amp;quot;);&lt;br /&gt;
    printf( &amp;quot;Vendor     : %s\n&amp;quot;, glGetString( GL_VENDOR ) );&lt;br /&gt;
    printf( &amp;quot;Renderer   : %s\n&amp;quot;, glGetString( GL_RENDERER ) );&lt;br /&gt;
    printf( &amp;quot;Version    : %s\n&amp;quot;, glGetString( GL_VERSION ) );&lt;br /&gt;
    printf( &amp;quot;Extensions : %s\n&amp;quot;, glGetString( GL_EXTENSIONS ) );&lt;br /&gt;
    printf(&amp;quot;\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    GLuint shaderProgram = glCreateProgram();&lt;br /&gt;
    GLuint vertexShader = createShader(GL_VERTEX_SHADER, vertexSrc);&lt;br /&gt;
    GLuint fragmentShader = createShader(GL_FRAGMENT_SHADER, fragmentSrc);&lt;br /&gt;
    &lt;br /&gt;
    glAttachShader(shaderProgram, vertexShader);&lt;br /&gt;
    glAttachShader(shaderProgram, fragmentShader);&lt;br /&gt;
    &lt;br /&gt;
    glLinkProgram(shaderProgram);&lt;br /&gt;
    &lt;br /&gt;
    glUseProgram(shaderProgram);&lt;br /&gt;
    &lt;br /&gt;
    phaseLocation = glGetUniformLocation(shaderProgram, &amp;quot;phase&amp;quot;);&lt;br /&gt;
    if(phaseLocation &amp;lt; 0) {&lt;br /&gt;
        printf(&amp;quot;Unable to get uniform location\n&amp;quot;);&lt;br /&gt;
        return 1;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    bool quit = false;&lt;br /&gt;
    &lt;br /&gt;
    //timeval startTime;&lt;br /&gt;
    //timezone tz;&lt;br /&gt;
    //gettimeofday(&amp;amp;startTime, &amp;amp;tz);&lt;br /&gt;
    int numFrames = 0;&lt;br /&gt;
    &lt;br /&gt;
    while(!quit) {&lt;br /&gt;
        SDL_Event event ;&lt;br /&gt;
        while( SDL_PollEvent( &amp;amp;event ) ) {&lt;br /&gt;
            if( event.type == SDL_KEYDOWN &amp;amp;&amp;amp; event.key.keysym.sym == SDLK_ESCAPE ) quit = 1 ;&lt;br /&gt;
        }&lt;br /&gt;
                render();&lt;br /&gt;
                numFrames++;&lt;br /&gt;
                if(numFrames % 100 == 0) {&lt;br /&gt;
                    //timeval now;&lt;br /&gt;
                    //gettimeofday(&amp;amp;now, &amp;amp;tz);&lt;br /&gt;
                    //float delta = now.tv_sec - startTime.tv_sec + (now.tv_usec - startTime.tv_usec) * 0.000001f;&lt;br /&gt;
                    //printf(&amp;quot;fps: %f\n&amp;quot;, numFrames / delta);&lt;br /&gt;
                }&lt;br /&gt;
    }&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Djbclark</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=WebOS_Internals_PDK&amp;diff=8163</id>
		<title>WebOS Internals PDK</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=WebOS_Internals_PDK&amp;diff=8163"/>
		<updated>2010-01-06T16:51:35Z</updated>

		<summary type="html">&lt;p&gt;Djbclark: Add Category:SDL&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: SDL]]&lt;br /&gt;
&lt;br /&gt;
Scratchbox 2 is a cross-compilation engine, it can be used to create a highly flexible SDK.&lt;br /&gt;
&lt;br /&gt;
As installed below, the install process uses a script which extracts the required Palm provided files from a copy of webos doctor, and  downloads from other sources, and builds a complete compilation environment automatically which can compile SDL and openGLES apps for webOS.  &lt;br /&gt;
&lt;br /&gt;
SB2 ''itself'' is totally distribution neutral but the webOS cross-compile environment is designed and tested on Ubuntu 9.10 32 bit. (At least one user in #webos-internals reports complete success running the cross compile environment in Ubuntu 9.10 64 bit after installing curl via apt-get.) &lt;br /&gt;
&lt;br /&gt;
The webOS Internals team ''strongly suggest'' apt-get install into that environment only for this purpose. The same installation of Sun Virtualbox which hosts the Palm SDK emulator can host an Ubuntu 9.10 server with very little effort. &lt;br /&gt;
&lt;br /&gt;
==SB2 Homepage==&lt;br /&gt;
[http://www.freedesktop.org/wiki/Software/sbox2 http://www.freedesktop.org/wiki/Software/sbox2]&lt;br /&gt;
&lt;br /&gt;
==License==&lt;br /&gt;
Scratchbox 2 is distributed under LGPL version 2.1, portions are under GPL version 2. Some minor stuff is under MIT style license.&lt;br /&gt;
&lt;br /&gt;
== Sample installation on Ubuntu for Palm Pre cross compiling ==&lt;br /&gt;
&lt;br /&gt;
Create a preware folder, copy the cros-compile tools into it (if you have not installed git, apt-get install git-core), and use a make script to set up the compilation toolchain. &lt;br /&gt;
&lt;br /&gt;
 sudo mkdir -p /srv/preware&lt;br /&gt;
 cd /srv/preware&lt;br /&gt;
 git clone git://git.webos-internals.org/preware/cross-compile.git&lt;br /&gt;
 cd cross-compile&lt;br /&gt;
 make toolchain&lt;br /&gt;
&lt;br /&gt;
The following commands appear redundant.  They are not.  The install this fixes your mmap config to fix an mmap: permission denied error, but we don't need the package itself.&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install qemu-arm-static&lt;br /&gt;
 sudo apt-get remove qemu-arm-static&lt;br /&gt;
&lt;br /&gt;
Now, use apt-get to setup scratchbox...&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install scratchbox2 qemu-kvm-extras&lt;br /&gt;
&lt;br /&gt;
...and set it up for compiling for webOS. &lt;br /&gt;
&lt;br /&gt;
 cd /srv/preware/cross-compile/toolchain/arm-2007q3/arm-none-linux-gnueabi/libc&lt;br /&gt;
 PATH=/srv/preware/cross-compile/toolchain/arm-2007q3/bin:${PATH} sb2-init -c /usr/bin/qemu-arm armv7 arm-none-linux-gnueabi-gcc&lt;br /&gt;
 cd /srv/preware/cross-compile&lt;br /&gt;
 make stage&lt;br /&gt;
&lt;br /&gt;
Once this setup is complete, compiling sdl apps for webOS is very simple.  Below is a sample of compiling ScummVM. &lt;br /&gt;
&lt;br /&gt;
==Sample build of [[Application:Doom]]==&lt;br /&gt;
&lt;br /&gt;
Now, go to [[Building DOOM with scratchbox2]] and follow the simple directions.&lt;/div&gt;</summary>
		<author><name>Djbclark</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Building_DOOM_with_scratchbox2&amp;diff=8162</id>
		<title>Building DOOM with scratchbox2</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Building_DOOM_with_scratchbox2&amp;diff=8162"/>
		<updated>2010-01-06T16:51:11Z</updated>

		<summary type="html">&lt;p&gt;Djbclark: Add Category:SDL&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:SDL]]&lt;br /&gt;
&lt;br /&gt;
First, follow the tutorial [[ScratchBox2_cross_compiling_with_SDL]] to set up the cross compilation environment.&lt;br /&gt;
&lt;br /&gt;
Next, download the sdlDOOM source code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://www.libsdl.org/projects/doom/src/sdldoom-1.10.tar.gz&lt;br /&gt;
tar xzf sdldoom-1.10.tar.gz&lt;br /&gt;
cd sdldoom-1.10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now run scratchbox2 with the webos / pre mapping file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sb2 -M /srv/preware/cross-compile/staging/mapping-armv7&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will get a different prompt indicating you are in a scratchbox shell, like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[SB2 mapping-armv7 armv7] $&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-sdl-prefix=/usr/local&lt;br /&gt;
make &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Build should complete successfully with no problems.  Download a DOOM shareware WAD:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://www.libsdl.org/projects/doom/data/doom1.wad.gz&lt;br /&gt;
gunzip doom1.wad.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the DOOM program binary and wad to root's home directory on the pre:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
scp doom doom1.wad  root@pre:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SSH to the device (novaterm would also work to get there, or an on-device terminal)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh root@pre&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the device, run DOOM:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./doom&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Yay, it should now run.  You may want to customize the code for better controls on the device.&lt;br /&gt;
&lt;br /&gt;
Now let's package it up for all your friends to install.  You should be back in your sdldoom-1.1.0 directory. For this, we'll use the Palm SDK, so make sure you have it installed.&lt;br /&gt;
&lt;br /&gt;
First off:  Unfortunately palm-package doesn't _quite_ make game packages properly.  First, we want type to be &amp;quot;game&amp;quot; and palm-package doesn't understand that (will reject it as an invalid type in the 1.3.5 SDK).  Secondly, the executables need to be set with executable permissions.  For all this, we need a script to fix up the ipk for you.&lt;br /&gt;
&lt;br /&gt;
palm-game-fix   (I put it in /usr/local/bin and chmod 755 /usr/local/bin/palm-game-fix)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
TMPDIR=&amp;quot;fix-game-ipk-tmp.$$&amp;quot;&lt;br /&gt;
if [ ! -f &amp;quot;$1&amp;quot; ]; then echo &amp;quot;$1&amp;quot; not found; exit 1; fi&lt;br /&gt;
mkdir &amp;quot;$TMPDIR&amp;quot;; cd &amp;quot;$TMPDIR&amp;quot;&lt;br /&gt;
ar x &amp;quot;../$1&amp;quot;&lt;br /&gt;
tar xvzf data.tar.gz&lt;br /&gt;
cd usr/palm/applications/*&lt;br /&gt;
chmod 755 *&lt;br /&gt;
sed -i 's/&amp;quot;type&amp;quot;:.*&amp;quot;web&amp;quot;,/&amp;quot;type&amp;quot;:     &amp;quot;game&amp;quot;,/' appinfo.json&lt;br /&gt;
cd ../../../..&lt;br /&gt;
tar cvzf data.tar.gz usr&lt;br /&gt;
rm -rf usr; rm &amp;quot;../$1&amp;quot;&lt;br /&gt;
ar -r &amp;quot;../$1&amp;quot; *&lt;br /&gt;
cd ..;rm -rf &amp;quot;$TMPDIR&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have this, you should be ready to go.  Obviously this only needs to  be done once.&lt;br /&gt;
&lt;br /&gt;
First make an installation directory with just the files we want to package.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir package&lt;br /&gt;
cp doom doom1.wad package&lt;br /&gt;
cd package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, create a start script that will be launched by the icon for your application. It can do things like changing the working directory (cd) into the right directory and start your program with the right command line arguments, if any.&lt;br /&gt;
&lt;br /&gt;
Create the file start-doom.sh with your favorite text editor like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
cd /media/cryptofs/apps/usr/palm/applications/com.example.doom&lt;br /&gt;
./doom&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create the file appinfo.json with your favorite text editor like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;title&amp;quot;:    &amp;quot;DOOM&amp;quot;,&lt;br /&gt;
	&amp;quot;type&amp;quot;:     &amp;quot;web&amp;quot;,&lt;br /&gt;
	&amp;quot;main&amp;quot;:     &amp;quot;start-doom.sh&amp;quot;,&lt;br /&gt;
	&amp;quot;id&amp;quot;:       &amp;quot;com.example.doom&amp;quot;,&lt;br /&gt;
	&amp;quot;vendor&amp;quot;:   &amp;quot;example.com&amp;quot;,&lt;br /&gt;
        &amp;quot;version&amp;quot;:  &amp;quot;0.1.0&amp;quot;,&lt;br /&gt;
        &amp;quot;icon&amp;quot;:     &amp;quot;icon.png&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure you change id to a reversed domain name like com.example (example.com)  but don't use example.com.  Get a domain name to use or ask a friend if you can use theirs.  This domain should be unique.&lt;br /&gt;
&lt;br /&gt;
Now we need to package it up and fix up the package to be game-compatible. Run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
palm-package .&lt;br /&gt;
palm-game-fix *ipk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can do a test install and launch.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
palm-install com.example.doom_0.1.0_all.ipk&lt;br /&gt;
palm-launch com.example.doom&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hopefully, DOOM should open in all its glory. &lt;br /&gt;
&lt;br /&gt;
Have fun making native apps.&lt;/div&gt;</summary>
		<author><name>Djbclark</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:Doom&amp;diff=8161</id>
		<title>Application:Doom</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:Doom&amp;diff=8161"/>
		<updated>2010-01-06T16:49:45Z</updated>

		<summary type="html">&lt;p&gt;Djbclark: Add Category:SDL&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:SDL]]&lt;br /&gt;
&lt;br /&gt;
{{application&lt;br /&gt;
|name=DOOM!&lt;br /&gt;
|type=webOS&lt;br /&gt;
|version=Version: Alpha 1.1.2 &amp;lt;br /&amp;gt;(1 Jan 2010)&lt;br /&gt;
|tag=Utilities&lt;br /&gt;
|screenshot=Doom-in-a-card.png&lt;br /&gt;
|description=&lt;br /&gt;
&lt;br /&gt;
== Summary == &lt;br /&gt;
{{icon|Tux_as_Zombie.png|float:right;}}&lt;br /&gt;
&lt;br /&gt;
== Status ==&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
DOOM! for the Palm Pre is distributed under the ID Software License, which allows for non-commercial use only.&lt;br /&gt;
&lt;br /&gt;
http://doom.wikia.com/wiki/SDL_Doom&lt;br /&gt;
&lt;br /&gt;
== Operating notes ==&lt;br /&gt;
&lt;br /&gt;
Tap the screen or hit &amp;quot;Sym&amp;quot; to shoot.&lt;br /&gt;
&lt;br /&gt;
H - forward at slow speed&lt;br /&gt;
&lt;br /&gt;
Y - left&lt;br /&gt;
&lt;br /&gt;
B - right&lt;br /&gt;
&lt;br /&gt;
G - forward at fast speed&lt;br /&gt;
&lt;br /&gt;
SPACE - open doors&lt;br /&gt;
&lt;br /&gt;
COMMA - strafe right&lt;br /&gt;
&lt;br /&gt;
ORANGE + # - Change weapon. 1 - fist, 2 - pistol, 3 - shotgun, 4 - chaingun (havent gotten other weapons yet but should be the same concept)&lt;br /&gt;
&lt;br /&gt;
ENTER - display last message (picked up Medikit, etc)&lt;br /&gt;
&lt;br /&gt;
ORANGE + = : Zoom In&lt;br /&gt;
&lt;br /&gt;
ORANGE + - : Zoom Out &lt;br /&gt;
&lt;br /&gt;
- = siderun right?&lt;br /&gt;
&lt;br /&gt;
. = sidestep right&lt;br /&gt;
&lt;br /&gt;
Back Gesture - Brings up in-game menu (Save, Load, Options, etc...)&lt;br /&gt;
&lt;br /&gt;
G + H - Move up and down in the menu, enter to select&lt;br /&gt;
&lt;br /&gt;
(feel free to add to this list)&lt;br /&gt;
&lt;br /&gt;
If you want to edit the key bindings the .doomrc file is located here: &lt;br /&gt;
 /media/cryptofs/apps/usr/palm/applications/org.webosinternals.sdldoom/bin/.doomrc&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
*Editing the key bindings works for everything but back and strafe left, that is, left strafe always goes turboright strafe and back always goes turbo forwards&lt;br /&gt;
=== Known bugs ===&lt;br /&gt;
&lt;br /&gt;
== Installing Doom ==&lt;br /&gt;
====Requirements====&lt;br /&gt;
*Preware&lt;br /&gt;
====Steps====&lt;br /&gt;
#Install [http://www.webos-internals.org/wiki/Application:Preware Preware and the Package Manager.] &lt;br /&gt;
#next install DOOM using PreWare.  Launch Preware, search for DOOM and click Install.&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
Play DOOM! using the keys above, when done exit the game in the normal way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Repository ==&lt;br /&gt;
&lt;br /&gt;
DOOM! is housed in the games/sdldoom git repository at http://git.webos-internals.org/&lt;br /&gt;
&lt;br /&gt;
For commit permission to the open source project, contact rwhitby on #webos-internals or email [[mailto:support@webos-internals.org support@webos-internals.org]]&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Djbclark</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=LibSDL_Research&amp;diff=8160</id>
		<title>LibSDL Research</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=LibSDL_Research&amp;diff=8160"/>
		<updated>2010-01-06T16:48:56Z</updated>

		<summary type="html">&lt;p&gt;Djbclark: Added Category:SDL&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: SDL]]&lt;br /&gt;
&lt;br /&gt;
== Source material ==&lt;br /&gt;
&lt;br /&gt;
[ http://palm.cdnetworks.net/opensource/1.3.5/libsdl-1.2.tgz (base SDL Lib)] &lt;br /&gt;
&lt;br /&gt;
[ http://palm.cdnetworks.net/opensource/1.3.5/libsdl-1.2-patch.gz (Palm patches)]&lt;br /&gt;
&lt;br /&gt;
== New files in patch == &lt;br /&gt;
&lt;br /&gt;
patch -p0 &amp;lt; ../libsdl-1.2-patch &amp;gt; /dev/null     gives us only new files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Patching ==&lt;br /&gt;
&lt;br /&gt;
tar xvzf libsdl-1.2.tgz &amp;amp;&amp;amp; zcat libsdl-1.2-patch.gz | patch -p0&lt;br /&gt;
&lt;br /&gt;
== Compiling ==&lt;br /&gt;
&lt;br /&gt;
Currently this fails to compile due to missing Piranha headers:&lt;br /&gt;
&lt;br /&gt;
sh autogen.sh; ./configure --disable-ipod --enable-webos --enable-video-opengles&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 gcc -g -O2 -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -Werror-implicit-function-declaration -DPALM -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/video/fbcon/SDL_fbvideo.c -o build/SDL_fbvideo.o &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
/bin/sh ./libtool --mode=compile gcc -g -O2  -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -Werror-implicit-function-declaration -DPALM -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/video/fbcon/SDL_fbvfb.cc  -o build/SDL_fbvfb.lo&lt;br /&gt;
 gcc -g -O2 -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -Werror-implicit-function-declaration -DPALM -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/video/fbcon/SDL_fbvfb.cc  -fPIC -DPIC -o build/.libs/SDL_fbvfb.o&lt;br /&gt;
cc1plus: warning: command line option &amp;quot;-Werror-implicit-function-declaration&amp;quot; is valid for C/ObjC but not for C++&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:5:30: error: Piranha/PContext.h: No such file or directory&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:6: error: 'PContext2D' does not name a type&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc: In function 'void FB_VfbBlit(FB_VfbBlitSurface*, FB_VfbBlitSurface*, int)':&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:13: error: 'PPixmap' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:13: error: 'DstPix' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:13: error: 'Context' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:14: error: 'PFORMAT_8888' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:18: error: 'SrcPix' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:21: error: 'PMatrix3D' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:21: error: expected `;' before 'Transform'&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:23: error: 'Transform' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:23: error: 'PValue' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:24: error: 'PVertex2D' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:26: error: 'Transform' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:28: error: 'PVertex2D' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:28: error: expected `;' before 'DstStart'&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:29: error: expected `;' before 'DstEnd'&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:31: error: expected `;' before 'SrcStart'&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:32: error: expected `;' before 'SrcEnd'&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:37: error: 'DstStart' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:37: error: 'DstEnd' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:37: error: 'SrcStart' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:37: error: 'SrcEnd' was not declared in this scope&lt;br /&gt;
make: *** [build/SDL_fbvfb.lo] Error 1&lt;br /&gt;
root@castle:~/libsdl-1.2#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== SDL Applications ==&lt;br /&gt;
&lt;br /&gt;
=== SDL_vnc ===&lt;br /&gt;
If SDL_vnc works, would be a way of running arbitrary X11 applications on the Palm Pre: &lt;br /&gt;
[http://www.ferzkopp.net/Software/SDL_vnc/ SDL_vnc]&lt;br /&gt;
&lt;br /&gt;
=== SDL Terminal ===&lt;br /&gt;
A pseudo-ansi SDL terminal (or console) library - [http://sourceforge.net/projects/sdl-terminal/ sdl-terminal]&lt;/div&gt;</summary>
		<author><name>Djbclark</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=LibSDL_Research&amp;diff=8157</id>
		<title>LibSDL Research</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=LibSDL_Research&amp;diff=8157"/>
		<updated>2010-01-06T16:34:57Z</updated>

		<summary type="html">&lt;p&gt;Djbclark: Added some SDL apps to look into - VNC, Terminal&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Source material ==&lt;br /&gt;
&lt;br /&gt;
[ http://palm.cdnetworks.net/opensource/1.3.5/libsdl-1.2.tgz (base SDL Lib)] &lt;br /&gt;
&lt;br /&gt;
[ http://palm.cdnetworks.net/opensource/1.3.5/libsdl-1.2-patch.gz (Palm patches)]&lt;br /&gt;
&lt;br /&gt;
== New files in patch == &lt;br /&gt;
&lt;br /&gt;
patch -p0 &amp;lt; ../libsdl-1.2-patch &amp;gt; /dev/null     gives us only new files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Patching ==&lt;br /&gt;
&lt;br /&gt;
tar xvzf libsdl-1.2.tgz &amp;amp;&amp;amp; zcat libsdl-1.2-patch.gz | patch -p0&lt;br /&gt;
&lt;br /&gt;
== Compiling ==&lt;br /&gt;
&lt;br /&gt;
Currently this fails to compile due to missing Piranha headers:&lt;br /&gt;
&lt;br /&gt;
sh autogen.sh; ./configure --disable-ipod --enable-webos --enable-video-opengles&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 gcc -g -O2 -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -Werror-implicit-function-declaration -DPALM -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/video/fbcon/SDL_fbvideo.c -o build/SDL_fbvideo.o &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
/bin/sh ./libtool --mode=compile gcc -g -O2  -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -Werror-implicit-function-declaration -DPALM -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/video/fbcon/SDL_fbvfb.cc  -o build/SDL_fbvfb.lo&lt;br /&gt;
 gcc -g -O2 -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -Werror-implicit-function-declaration -DPALM -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/video/fbcon/SDL_fbvfb.cc  -fPIC -DPIC -o build/.libs/SDL_fbvfb.o&lt;br /&gt;
cc1plus: warning: command line option &amp;quot;-Werror-implicit-function-declaration&amp;quot; is valid for C/ObjC but not for C++&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:5:30: error: Piranha/PContext.h: No such file or directory&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:6: error: 'PContext2D' does not name a type&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc: In function 'void FB_VfbBlit(FB_VfbBlitSurface*, FB_VfbBlitSurface*, int)':&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:13: error: 'PPixmap' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:13: error: 'DstPix' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:13: error: 'Context' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:14: error: 'PFORMAT_8888' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:18: error: 'SrcPix' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:21: error: 'PMatrix3D' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:21: error: expected `;' before 'Transform'&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:23: error: 'Transform' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:23: error: 'PValue' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:24: error: 'PVertex2D' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:26: error: 'Transform' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:28: error: 'PVertex2D' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:28: error: expected `;' before 'DstStart'&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:29: error: expected `;' before 'DstEnd'&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:31: error: expected `;' before 'SrcStart'&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:32: error: expected `;' before 'SrcEnd'&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:37: error: 'DstStart' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:37: error: 'DstEnd' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:37: error: 'SrcStart' was not declared in this scope&lt;br /&gt;
./src/video/fbcon/SDL_fbvfb.cc:37: error: 'SrcEnd' was not declared in this scope&lt;br /&gt;
make: *** [build/SDL_fbvfb.lo] Error 1&lt;br /&gt;
root@castle:~/libsdl-1.2#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== SDL Applications ==&lt;br /&gt;
&lt;br /&gt;
=== SDL_vnc ===&lt;br /&gt;
If SDL_vnc works, would be a way of running arbitrary X11 applications on the Palm Pre: &lt;br /&gt;
[http://www.ferzkopp.net/Software/SDL_vnc/ SDL_vnc]&lt;br /&gt;
&lt;br /&gt;
=== SDL Terminal ===&lt;br /&gt;
A pseudo-ansi SDL terminal (or console) library - [http://sourceforge.net/projects/sdl-terminal/ sdl-terminal]&lt;/div&gt;</summary>
		<author><name>Djbclark</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=OpenVPN_for_Palm_Pre&amp;diff=3890</id>
		<title>OpenVPN for Palm Pre</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=OpenVPN_for_Palm_Pre&amp;diff=3890"/>
		<updated>2009-08-06T13:01:27Z</updated>

		<summary type="html">&lt;p&gt;Djbclark: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The OpenVPN ipkg is a clean installation as the clipboard below proves. The Palm Pre's Linux OS is compiled with the /dev/tun driver built in, so you can ignore the module dependency warning. There is a project to create a GUI for the pre [http://gitorious.org/pre-openvpn].&lt;br /&gt;
&lt;br /&gt;
The OpenVPN IRC channel ##OpenVPN exists on the same Freenode server #WebOS-Internals is located on. Please stop either channel with questions after visiting [http://openvpn.net]&lt;br /&gt;
&lt;br /&gt;
OpenVPN is deployed quickly and easily. The OpenVPN.net website and source installations contain scripts that can make OpenVPN connect to your home or work when WiFi is activated. oc80z&lt;br /&gt;
&lt;br /&gt;
note: oinstall is alias oinstall=&amp;quot;sudo ipkg-opt install&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
┌─(box@castle)-(09:28:44)-&amp;gt;&lt;br /&gt;
└─(~)--&amp;gt; $ oinstall openvpn&lt;br /&gt;
Installing openvpn (2.1_rc15-1) to root...&lt;br /&gt;
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/openvpn_2.1_rc15-1_arm.ipk&lt;br /&gt;
openvpn: unsatisfied recommendation for kernel-module-tun&lt;br /&gt;
Installing lzo (1.08-2) to root...&lt;br /&gt;
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/lzo_1.08-2_arm.ipk&lt;br /&gt;
Configuring lzo&lt;br /&gt;
Configuring openvpn&lt;br /&gt;
Successfully terminated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
┌─(root@castle)-(10:17:05)-&amp;gt;&lt;br /&gt;
└─(/opt/etc/openvpn)--&amp;gt; # unzip palmpre.zip&lt;br /&gt;
Archive:  palmpre.zip&lt;br /&gt;
   creating: palmpre/&lt;br /&gt;
  inflating: palmpre/ca.crt&lt;br /&gt;
  inflating: palmpre/palmpre.key&lt;br /&gt;
  inflating: palmpre/palmpre.crt&lt;br /&gt;
  inflating: palmpre/palmpre.conf&lt;br /&gt;
  inflating: palmpre/dh2048.pem&lt;br /&gt;
  inflating: palmpre/palmpre.ovpn&lt;br /&gt;
&lt;br /&gt;
┌─(root@castle)-(10:19:33)-&amp;gt;&lt;br /&gt;
└─(/opt/etc/openvpn)--&amp;gt; # openvpn --config /opt/etc/openvpn/palmpre/palmpre.ovpn &amp;gt;&amp;gt;/dev/null&amp;amp;&lt;br /&gt;
&lt;br /&gt;
(...While pinging google, dropped wifi and monitored via SSH over Bluetooth PAN)&lt;br /&gt;
&lt;br /&gt;
64 bytes from 74.125.67.100: seq=5 ttl=52 time=46.505 ms&lt;br /&gt;
64 bytes from 74.125.67.100: seq=6 ttl=52 time=45.603 ms&lt;br /&gt;
64 bytes from 74.125.67.100: seq=7 ttl=52 time=49.132 ms&lt;br /&gt;
64 bytes from 74.125.67.100: seq=8 ttl=52 time=101.013 ms &lt;br /&gt;
64 bytes from 74.125.67.100: seq=9 ttl=52 time=1556.213 ms &amp;lt;-- cutover wifi to evdo&lt;br /&gt;
64 bytes from 74.125.67.100: seq=10 ttl=52 time=561.371 ms&lt;br /&gt;
64 bytes from 74.125.67.100: seq=11 ttl=52 time=54.932 ms&lt;br /&gt;
64 bytes from 74.125.67.100: seq=12 ttl=50 time=109.436 ms&lt;br /&gt;
64 bytes from 74.125.67.100: seq=13 ttl=50 time=105.896 ms&lt;br /&gt;
64 bytes from 74.125.67.100: seq=14 ttl=50 time=104.523 ms&lt;br /&gt;
&lt;br /&gt;
┌─(root@castle)-(10:33:54)-&amp;gt;&lt;br /&gt;
└─(/opt/etc/openvpn/palmpre)--&amp;gt; # ping 192.218.1.10&lt;br /&gt;
PING 192.218.1.10 (192.218.1.10): 56 data bytes&lt;br /&gt;
64 bytes from 192.218.1.10: seq=0 ttl=42 time=456.665 ms&lt;br /&gt;
64 bytes from 192.218.1.10: seq=1 ttl=42 time=260.773 ms&lt;br /&gt;
64 bytes from 192.218.1.10: seq=2 ttl=42 time=268.189 ms&lt;br /&gt;
&lt;br /&gt;
┌─(root@castle)-(10:35:13)-&amp;gt;&lt;br /&gt;
└─(/opt/etc/openvpn/palmpre)--&amp;gt; # ping 192.218.0.1&lt;br /&gt;
PING 192.218.0.1 (192.218.0.1): 56 data bytes&lt;br /&gt;
64 bytes from 192.218.0.1: seq=0 ttl=64 time=259.552 ms&lt;br /&gt;
64 bytes from 192.218.0.1: seq=1 ttl=64 time=114.898 ms&lt;br /&gt;
64 bytes from 192.218.0.1: seq=2 ttl=64 time=118.958 ms&lt;br /&gt;
&lt;br /&gt;
┌─(root@castle)-(10:35:40)-&amp;gt;&lt;br /&gt;
└─(/opt/etc/openvpn/palmpre)--&amp;gt; # ping 192.218.0.218&lt;br /&gt;
PING 192.218.0.218 (192.218.0.218): 56 data bytes&lt;br /&gt;
64 bytes from 192.218.0.218: seq=0 ttl=64 time=502.137 ms&lt;br /&gt;
64 bytes from 192.218.0.218: seq=1 ttl=64 time=182.556 ms&lt;br /&gt;
64 bytes from 192.218.0.218: seq=2 ttl=64 time=123.016 ms&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Djbclark</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Talk:Portal:Accessing_Linux&amp;diff=1166</id>
		<title>Talk:Portal:Accessing Linux</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Talk:Portal:Accessing_Linux&amp;diff=1166"/>
		<updated>2009-07-20T23:39:21Z</updated>

		<summary type="html">&lt;p&gt;Djbclark: Added  Accuracy in Terminology section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Accuracy in Terminology =&lt;br /&gt;
If we really are caring about accuracy in terms now, we should be calling this page &amp;quot;Accessing GNU/Linux&amp;quot; [http://www.gnu.org/gnu/linux-and-gnu.html], since it's about getting to the mostly GNU userland. I'm not sure what &amp;quot;accessing (the kernel called) linux&amp;quot; would mean, but I assume it would involve a debugger. This is actually also an important distinction between the Palm Pre and Android/Linux based phones, since the Pre seems pretty &amp;quot;normal&amp;quot; to anyone who has used other GNU/Linux distributions from the command line, whereas the Android userland is pretty completely different, both in license (Apache) and use. If there aren't any objections here by the weekend, I'll take a stab at fixing terminology on this page and other pages that refer to it. -- [[User:Djbclark|djbclark]] 23:39, 20 July 2009 (UTC)&lt;/div&gt;</summary>
		<author><name>Djbclark</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=User:Djbclark&amp;diff=1140</id>
		<title>User:Djbclark</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=User:Djbclark&amp;diff=1140"/>
		<updated>2009-07-20T23:26:32Z</updated>

		<summary type="html">&lt;p&gt;Djbclark: New page: http://pobox.com/~dclark&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://pobox.com/~dclark&lt;/div&gt;</summary>
		<author><name>Djbclark</name></author>
	</entry>
</feed>