[Ves] Using Ipad 5.1 Simulator

Pat Marion pat.marion at kitware.com
Mon Nov 12 18:27:28 EST 2012


I'm afraid there's no such thing as a main.cxx example for iOS.  You can't
compile a main.cxx file to produce an iOS program using VES.  You have to
build a complete iOS app, and iOS apps require some code in Objective-C and
several resource files.  You have to use XCode to generate a new iOS
project, or copy the existing Kiwi project.

Your iOS app has to contain a GKLView in order to initialize the rendering
context for VES.  If you're not already familiar with GLKit in iOS, you
should try following some of the online tutorials for GLKit.  After you
have some familiarity with GLKit, the best way to get started is to create
a new project in XCode and select File -> New Project and then choose
OpenGL Game as the base project template.  Then, you have to add VTK and
VES library and include search paths to the XCode project, this can be a
tricky step.  In the next release of VES we will have a build step that
creates frameworks which greatly simplify using VTK and VES in XCode.
We'll also have an example using GLKit, the current release version of Kiwi
uses EAGLView because it was developed before Apple had released GLKit.  If
you've never created an iOS project from scratch, you might find it easiest
to just copy the existing Kiwi project and use that as a template.  Just
make sure you modify the xcconfig file to set the currect path locations.

Pat

On Tue, Nov 13, 2012 at 3:50 AM, Thiago Tavares Magalhães <
ttavaresm at gmail.com> wrote:

> Hello all,
>
> A short time since I sent my last question, sorry for my insistence, but
> I'm still new to VES.
>
> I want to develop a simple example using VES, but on a common text editor, such
> as gedit, for example, and compiling with cmake.
> I've specified the directory VES (already installed) in CMAkeList. My
> CMakeList is thus:
>
> / / ----------------------------------- / / -----------
> ------------------------ / /
> cmake_minimum_required (VERSION 2.8)
>
> PROJECT (Step1)
>
> set (CMAKE_OSX_SYSROOT iphoneos4.3)
> set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iPhoneOS;-iphonesimulator")
>
> include_directories ($ CMAKE_CURRENT_SOURCE_DIR {})
>
> Find_package (VES REQUIRED)
> Include_directories ($ VES_INCLUDE_DIRS {})
>
> Find_package (VTK REQUIRED)
> INCLUDE ($ {} VTK_USE_FILE)
>
> ADD_EXECUTABLE (EsferaMalhaDeArestas .. / main.cxx)
> TARGET_LINK_LIBRARIES (EsferaMalhaDeArestas vtkRendering)
> / / ----------------------------------- / / -----------
> ------------------------ / /
>
> How do I run the application within that iPadSimulator? Could someone show
> me a code example that does something very simple, such as instantiating a
> coneSource and display it on the screen of iPadSimulator, please?
>
> I promise I'll give a reasonable space of time between this and my next
> question.
>
> Thank you!
> Thiago
>
> --
> Thiago Tavares Magalhães <http://lattes.cnpq.br/1989532473555107>
> Instituto Superior de Tecnologia em Ciências da Computação de Petrópolis -
> *FAETERJ*
> Laboratório Nacional de Computação Científica -* LNCC*
>
>
> _______________________________________________
> Ves mailing list
> Ves at public.kitware.com
> http://public.kitware.com/cgi-bin/mailman/listinfo/ves
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ves/attachments/20121113/56f1d63d/attachment-0001.html>


More information about the Ves mailing list