Mac OS X Porting - OpenGL transitions

From Apache OpenOffice Wiki
Revision as of 13:47, 22 August 2008 by Ericb (Talk | contribs)

Jump to: navigation, search

OpenGL transitions on Mac OS X

Description

In Impress, there are transitions between slides, or 3D effects possible. The problem is, those effects are power consumming, and without hardware acceleration -means software rendered- ,extremely slow , what is not acceptable by users.

This tasks aims to replace the software rendered transitions with hardware accelerated transitions ( OpenGL for instance on Mac OS X).

Below the technical description, the involved code, the plan, and so on. Feel free to add information if you estimate it usefull for the task.

Thanks in advance :-)

Goal

Make OpenGL transitions work in Impress, on Mac OS X Aqua

Timeline

Expected timeline: october / november 2008

Examples

FIXME: add screenshots or links for demos

Modifications

Concerned files / ideas

Ideas

Everything is based on implement a customized OpenGLView in the vcl/aqua/inc/salframe.h and/or vcl/aqua/inc/salframeview.h

Once this NSOpenGL view will work, this should be no problem to use it from the lideshow.

Communication between slideshow object and the NSApplication ( customized NSView, itself inheriting of NSWindow) will use the notification center as proxy (what is extremely fast in theory).

Pb: visibility of the vcl/aqua/inc headers from slideshow at buildtime

Update: predeclaration in vcl/inc/vcl/sysdata.hxx will help a lot. Needs to be confirmed.

Concerned files

Task : build the lib

slideshow/source/engine/OGLTrans/makefile.mk

add the case Aqua, modify CFLAGSCXX + add fremaworks OpenGL, GLUT and Cocoa for linking

Task : Deliver the libs / includes:

slideshow/prj/d.lst

deliver the new lib on Aqua ( libOGLTrans.dylib )


Modified files :

slideshow/source/engine/OGLTrans/OglTrans_TransitionImpl.cxx

slideshow/source/engine/OGLTrans/OglTrans_TransitionImpl.hxx

slideshow/source/engine/OGLTrans/OglTrans_TransitionerImpl.cxx


New files (to be confirmed) :

slideshow/source/engine/OGLTrans/aquaOpenGLView.h

slideshow/source/engine/OGLTrans/aquaOpenGLView.m

Concerned modules

  • config_office : make OpenGL default on Mac OS X Aqua => ENABLE_OPENGL=TRUE
  • slideshow : where the lib is built. This lib is linked with libvcl ( vcl must be built before slideshow )
  • vcl ( add NSOpenGLView* in salframe.h ? / implement it in NSApp + NSApp should receive notifications, maybe an object should be added and managed)
  • scp2 : to add the new lib in the package
  • other changes ?

Issues attached to the task

issue 93013

TODO (draft)

  • build the OpenGL trans lib, warning free, on Mac OS X
    • [DONE] fix warnings and breakages, with empty implementation
    • [DONE] fix linking
    • [DONE] create customized NSView (skeleton, and pre-implementation)
  • [DONE] add the lib to the package
  • register the lib
  • Design the first implementation
  • implement NSOpenGLView or customize an NSView
    • manage OpenGL context
    • manage OpenGL pixels mapping
    • manage events and notifications critical
    • initialize the view properly in splitted view
    • implement the fullscreen mode
  • finalize the transitions integration in Aqua bundle
  • make transitions work
  • test
  • integrate


LINKS

Below a now exhaustive list of links. Feel free to add interesting links !

Apple OpenGL Documentation

Cocoa OpenGL

Custom GLView

NSView + OpenGLView in Apple database

NSOpenGLView initialisation issue

COMPLETE ME

Bla bla ...


Page created Ericb 11:55, 22 August 2008 (CEST)

Personal tools