Active Topics

 


Reply
Thread Tools
Posts: 148 | Thanked: 92 times | Joined on Oct 2009
#11
Hmm...I guess I was wrong thinking that the n900 was es 2.0 only. Then an OGRE port would be trivial. Still, I think we really want es 2.0 because of all the pretty, pretty eyecandy it gives us relative to es 1.1 .
 
Posts: 341 | Thanked: 64 times | Joined on May 2009
#12
opengl es 1.1 is stuck in the era of fixed function graphic pipelines like DX7 era kit such as the nVidia TnT cards from 2000.

opengl es 2.0 is at least the equivalent of DX9c which is pretty modern by most standards.
 
SubCore's Avatar
Posts: 850 | Thanked: 626 times | Joined on Sep 2009 @ Vienna, Austria
#13
There is some work being done on an OGRE port to the iPhone (including OpenGL ES 2.0). Screens

maybe we'll get lucky as well?
 
Posts: 341 | Thanked: 64 times | Joined on May 2009
#14
another possible option is the blender game engine.

this fellow is has been making opengl es versions of blender for some time:
http://russose.free.fr/BlenderPocket/

not quite the same thing i know, but there is nothing to stop a ES port of BGE............
 

The Following User Says Thank You to REMFwhoopitydo For This Useful Post:
Posts: 2,102 | Thanked: 1,309 times | Joined on Sep 2006
#15
What have the Pandora lot ported? That is a platform dedicated to gaming, with largely the same graphics hw & main processor, so I imagine they might have done something (especially as they've been twiddling their thumbs for the last year waiting for it be released )
 
Posts: 341 | Thanked: 64 times | Joined on May 2009
#16
oh well, i've told them we're interested:
http://www.ogre3d.org/forums/viewtop...48763&start=50
 

The Following 8 Users Say Thank You to REMFwhoopitydo For This Useful Post:
Fargus's Avatar
Posts: 1,217 | Thanked: 446 times | Joined on Oct 2009 @ Bedfordshire, UK
#17
Originally Posted by REMFwhoopitydo View Post
oh well, i've told them we're interested:
http://www.ogre3d.org/forums/viewtop...48763&start=50
Well it looks good on Flicker. If the majority of the work has been done porting to the ES 2.0 framework then it might be a simple matter of joining forces to run a port and then contribute to a joint thread for both platforms if the existing team are willing to work like that. If not then maybe fork the development and try to keep the code api compliant to allow quick ports of lower order apps from one to the other.
 
Posts: 341 | Thanked: 64 times | Joined on May 2009
#18
 

The Following 2 Users Say Thank You to REMFwhoopitydo For This Useful Post:
Posts: 15 | Thanked: 48 times | Joined on Nov 2009 @ United Kingdom
#19
Hello,

I have compiled Ogre for armel using the N900 SDK. I have not tried running it yet, but it should work. Here is how to do it:

install cmake in the SDK

check out ogre svn (tested with revision 9270)

export a clean working dir (svn export . ../ogre-maemo)

apply this patch:

----------------------------------- cut -----------------------------------
diff -Nur ogre-orig/CMakeLists.txt ogre-maemo/CMakeLists.txt
--- ogre-orig/CMakeLists.txt 2009-10-29 11:13:21.000000000 +0000
+++ ogre-maemo/CMakeLists.txt 2009-11-05 01:07:47.000000000 +0000
@@ -56,7 +56,10 @@

# Set compiler specific build flags
if (CMAKE_COMPILER_IS_GNUCXX)
- add_definitions(-msse)
+ # need a test here to only enable this flag on processors that have SSE
+ if(NOT ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "arm"))
+ add_definitions(-msse)
+ endif ()
endif ()
if (MSVC)
add_definitions(/fp:fast)
diff -Nur ogre-orig/OgreMain/src/OgrePlatformInformation.cpp ogre-maemo/OgreMain/src/OgrePlatformInformation.cpp
--- ogre-orig/OgreMain/src/OgrePlatformInformation.cpp 2009-09-15 15:24:55.000000000 +0100
+++ ogre-maemo/OgreMain/src/OgrePlatformInformation.cpp 2009-11-05 00:14:13.000000000 +0000
@@ -42,7 +42,8 @@

#if OGRE_CPU == OGRE_CPU_ARM
#include <sys/sysctl.h>
- #include <mach/machine.h>
+// This file is missing - iPhone specific?
+// #include <mach/machine.h>
#endif
#endif

@@ -530,10 +531,10 @@

static char processor[257];
size_t s = sizeof processor;
- static int mib[] = { CTL_HW, HW_MODEL };
- if (sysctl (mib, 2, processor, &s, 0, 0) >= 0)
- cpuID = processor;
- else
+// static int mib[] = { CTL_HW, HW_MODEL };
+// if (sysctl (mib, 2, processor, &s, 0, 0) >= 0)
+// cpuID = processor;
+// else
cpuID = "Unknown ARM";

#endif
----------------------------------- cut -----------------------------------

create a directory to build in eg build-n900

now you should have a directory structure something like this:

ogre
\ ogre (svn managed directory)
\ ogre-maemo (which patch applied)
\ build-n900 (where cmake will build it)

Now build it with:

cd build-n900 && cmake -DOGRE_BUILD_TOOLS=0 ../ogre-maemo && make && make install
 

The Following 2 Users Say Thank You to ali1234 For This Useful Post:
Posts: 15 | Thanked: 48 times | Joined on Nov 2009 @ United Kingdom
#20
Updated patch which actually works:
Code:
diff -Nur ogre-orig/CMakeLists.txt ogre-maemo/CMakeLists.txt
--- ogre-orig/CMakeLists.txt	2009-10-29 11:13:21.000000000 +0000
+++ ogre-maemo/CMakeLists.txt	2009-11-05 01:07:47.000000000 +0000
@@ -56,7 +56,10 @@
 
 # Set compiler specific build flags
 if (CMAKE_COMPILER_IS_GNUCXX)
-  add_definitions(-msse)
+  # need a test here to only enable this flag on processors that have SSE
+  if(NOT ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "arm"))
+    add_definitions(-msse)
+  endif ()
 endif ()
 if (MSVC)
   add_definitions(/fp:fast)
diff -Nur ogre-orig/OgreMain/src/OgrePlatformInformation.cpp ogre-maemo/OgreMain/src/OgrePlatformInformation.cpp
--- ogre-orig/OgreMain/src/OgrePlatformInformation.cpp	2009-09-15 15:24:55.000000000 +0100
+++ ogre-maemo/OgreMain/src/OgrePlatformInformation.cpp	2009-11-05 00:14:13.000000000 +0000
@@ -42,7 +42,8 @@
 
     #if OGRE_CPU == OGRE_CPU_ARM
         #include <sys/sysctl.h>
-        #include <mach/machine.h>
+//        This file is missing - iPhone specific?
+//        #include <mach/machine.h>
     #endif
 #endif
 
@@ -530,10 +531,10 @@
         
         static char processor[257];
         size_t s = sizeof processor;
-        static int mib[] = { CTL_HW, HW_MODEL };
-        if (sysctl (mib, 2, processor, &s, 0, 0) >= 0)
-            cpuID = processor;
-        else
+//        static int mib[] = { CTL_HW, HW_MODEL };
+//        if (sysctl (mib, 2, processor, &s, 0, 0) >= 0)
+//            cpuID = processor;
+//        else
             cpuID = "Unknown ARM";
 
 #endif
diff -Nur ogre-orig/OgreMain/src/nedmalloc/malloc.c.h ogre-maemo/OgreMain/src/nedmalloc/malloc.c.h
--- ogre-orig/OgreMain/src/nedmalloc/malloc.c.h	2009-01-05 15:29:00.000000000 +0000
+++ ogre-maemo/OgreMain/src/nedmalloc/malloc.c.h	2009-11-20 17:34:19.000000000 +0000
@@ -1838,7 +1838,12 @@
 /* Cope with old-style linux recursive lock initialization by adding */
 /* skipped internal declaration from pthread.h */
 #ifdef linux
-#ifndef PTHREAD_MUTEX_RECURSIVE
+
+// this test fails to give the correct result when PTHREAD_MUTEX_RECURSIVE
+// is declared as an enum rather than a #define - which is the case on 
+// recent pthreads libraries
+//#ifndef PTHREAD_MUTEX_RECURSIVE
+#if 0
 extern int pthread_mutexattr_setkind_np __P ((pthread_mutexattr_t *__attr,
 					   int __kind));
 #define PTHREAD_MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP
Compile and install with:

Code:
cmake -DOGRE_BUILD_TOOLS=0 -DOGRE_BUILD_RENDERSYSTEM_GLES=1 ../ogre-maemo && make && make install
You need to install libxaw7 and libgles1 on the device. Tested as far as opening a render window on the device. It should really work now.
 

The Following 8 Users Say Thank You to ali1234 For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 15:57.