bc-cube: add 0.2.0 with desktop file to launch it using a GUI
authorKoen Kooi <k-kooi@ti.com>
Fri, 26 Mar 2010 12:33:25 +0000 (13:33 +0100)
committerKoen Kooi <koen@openembedded.org>
Mon, 12 Apr 2010 17:43:30 +0000 (19:43 +0200)
recipes/powervr-drivers/bc-cube/bc-cat-0.1.0-BC_PIX_FMT_.patch [changed mode: 0755->0644]
recipes/powervr-drivers/bc-cube/bc-cat-0.2.0.patch [new file with mode: 0644]
recipes/powervr-drivers/bc-cube/bc-cube.desktop [new file with mode: 0644]
recipes/powervr-drivers/bc-cube_0.2.0.bb [new file with mode: 0644]

diff --git a/recipes/powervr-drivers/bc-cube/bc-cat-0.2.0.patch b/recipes/powervr-drivers/bc-cube/bc-cat-0.2.0.patch
new file mode 100644 (file)
index 0000000..99afb2c
--- /dev/null
@@ -0,0 +1,67 @@
+diff -Nurd bc-cat-0.2.0-old/test/cmem.c bc-cat-0.2.0/test/cmem.c
+--- bc-cat-0.2.0-old/test/cmem.c       2010-03-24 19:17:15.000000000 +0100
++++ bc-cat-0.2.0/test/cmem.c   2010-03-26 11:26:43.000000000 +0100
+@@ -166,7 +166,7 @@
+     modelview[9] = -sx;
+     modelview[10] = cx * cy;
+    
+-    glClearColor (0.0, 0.0, 0.0, 1.0);
++    glClearColor (0.0, 0.0, 0.0, 0.0);
+     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+    
+     glUseProgram(program[0]);
+diff -Nurd bc-cat-0.2.0-old/test/common.c bc-cat-0.2.0/test/common.c
+--- bc-cat-0.2.0-old/test/common.c     2010-03-24 19:24:56.000000000 +0100
++++ bc-cat-0.2.0/test/common.c 2010-03-26 11:23:13.000000000 +0100
+@@ -364,6 +364,7 @@
+             r = (float)w / h;
+             glViewport(0, 0, w, h);
++#ifndef GLES_20
+             glMatrixMode(GL_PROJECTION);
+             glLoadIdentity();
+@@ -376,7 +377,7 @@
+             glMatrixMode(GL_MODELVIEW);
+             glLoadIdentity();
+-
++#endif
+             break;
+         case Expose:
+             /*must handle this, otherwise, background does not redraw*/
+diff -Nurd bc-cat-0.2.0-old/test/mmap.c bc-cat-0.2.0/test/mmap.c
+--- bc-cat-0.2.0-old/test/mmap.c       2010-03-24 19:17:15.000000000 +0100
++++ bc-cat-0.2.0/test/mmap.c   2010-03-26 11:26:49.000000000 +0100
+@@ -136,7 +136,7 @@
+     modelview[9] = -sx;
+     modelview[10] = cx * cy;
+    
+-    glClearColor (0.0, 0.0, 0.0, 1.0);
++    glClearColor (0.0, 0.0, 0.0, 0.0);
+     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+    
+     glUseProgram(program[0]);
+diff -Nurd bc-cat-0.2.0-old/test/webcam.c bc-cat-0.2.0/test/webcam.c
+--- bc-cat-0.2.0-old/test/webcam.c     2010-03-24 19:17:15.000000000 +0100
++++ bc-cat-0.2.0/test/webcam.c 2010-03-26 11:27:29.000000000 +0100
+@@ -338,7 +338,7 @@
+     modelview[9] = -sx;
+     modelview[10] = cx * cy;
+    
+-    glClearColor (0.0, 0.0, 0.0, 1.0);
++    glClearColor (0.0, 0.0, 0.0, 0.0);
+     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+    
+     glUseProgram(program[0]);
+@@ -372,8 +372,8 @@
+     eglSwapBuffers(dpy, surface);
+-    rot_x += 0.01;
+-    rot_y += 0.01;
++    rot_x += 0.02;
++    rot_y += 0.02;
+ }
+ #else
diff --git a/recipes/powervr-drivers/bc-cube/bc-cube.desktop b/recipes/powervr-drivers/bc-cube/bc-cube.desktop
new file mode 100644 (file)
index 0000000..e9db6ba
--- /dev/null
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Texture streaming Demo
+Comment=TI Webcam texture streaming demo
+Exec=gles2_bc_webcam-x11
+Icon=star
+Type=Application
+Categories=Graphics;3DGraphics;
+
diff --git a/recipes/powervr-drivers/bc-cube_0.2.0.bb b/recipes/powervr-drivers/bc-cube_0.2.0.bb
new file mode 100644 (file)
index 0000000..01b6f94
--- /dev/null
@@ -0,0 +1,45 @@
+DESCRIPTION = "TI Texture streaming using bufferclass API demo (spinning video cube)"
+LICENSE = "TI-BSD/GPLv2"
+DEPENDS = "virtual/egl"
+
+SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/apps_processors/OMAP35x_AM35x_Video_Texture_Streaming/1_0/exports/bc-cat-${PV}.tar.gz;name=bccat \
+           file://bc-cat-0.2.0.patch;patch=1 \
+           file://bc-cube.desktop \
+"
+
+SRC_URI[bccat.md5sum] = "4d6f2e637f57ee6cf5f85b024ac88741"
+SRC_URI[bccat.sha256sum] = "5c486590d843da6ac38fe8c6cfcb851de94ac496cf4f3b4b3092092656bf727a"
+
+S = "${WORKDIR}/bc-cat-${PV}"
+
+CFLAGS += " -DGLES_20 -DLINUX -I../include -I${STAGING_INCDIR}/services4/3rdparty/bufferclass_ti/ -I${STAGING_INCDIR}/include4"
+LDFLAGS += "-lGLESv2 -lEGL"
+
+# build both fb and x11 version
+do_compile() {
+       cd test
+       sed -i -e s:video3:video0:g webcam.c
+       oe_runmake GLES_20=1 -e clean
+       oe_runmake GLES_20=1 -e
+       mv gles2_bc_mmap gles2_bc_mmap-fb
+       mv gles2_bc_webcam gles2_bc_webcam-fb
+
+       oe_runmake GLES_20=1 -e clean
+       CFLAGS="${CFLAGS} -DX11" oe_runmake -e GLES_20=1 X11BUILD=1
+       mv gles2_bc_webcam gles2_bc_webcam-x11
+
+}
+
+do_install() {
+       install -d ${D}${bindir}
+       install -m 0755 ${S}/test/gles2_bc_mmap-* ${D}${bindir}
+       install -m 0755 ${S}/test/gles2_bc_webcam-* ${D}${bindir}
+
+       install -d ${D}${datadir}/applications
+       install -m 0644 ${WORKDIR}/bc-cube.desktop ${D}${datadir}/applications/
+}
+
+PACKAGES =+ "${PN}-fb ${PN}-x11"
+FILES_${PN}-x11 = "${bindir}/*x11 ${datadir}/applications"
+FILES_${PN}-fb = "${bindir}/*fb"
+