[vtkusers] Compiling OpenGL2 on mac os x

Ken Martin ken.martin at kitware.com
Tue Oct 27 08:14:52 EDT 2015


“changed OPENGL_ES_VERSION to 3.0”



If you are building for iOS/Android then that is fine, although I’m pretty
sure ES 3.0 is broken in that version of VTK so you would be better off
using VTK master as it now has dashboards for iOS/android ES2/ES3 so we
know it is at least building etc. It sounds though like you are building
for OSX. If you are building for OSX, then you should not turn on
OPENGL_ES_VERSION as for OSX you are better off using the full OpenGL 3.2.
If you accidentally turned on ES then you just need to delete the entry
from the cache and rebuild and it should work.



Thanks

Ken





Ken Martin PhD

Chairman & CFO

Kitware Inc.

28 Corporate Drive

Clifton Park NY 12065

ken.martin at kitware.com

919 869-8871 (w)





This communication, including all attachments, contains confidential and
legally privileged information, and it is intended only for the use of the
addressee.  Access to this email by anyone else is unauthorized. If you are
not the intended recipient, any disclosure, copying, distribution or any
action taken in reliance on it is prohibited and may be unlawful. If you
received this communication in error please notify us immediately and
destroy the original message.  Thank you.



*From:* vtkusers [mailto:vtkusers-bounces at vtk.org] *On Behalf Of *Raul
Huertas
*Sent:* Monday, October 26, 2015 4:16 PM
*To:* vtkusers at vtk.org
*Subject:* [vtkusers] Compiling OpenGL2 on mac os x





Hello Everyone!



I downloaded the source release of 6.3 and I had some issues in Mac OS X.
I'm using Makefile generators. First I compiled it with the default
settings and i had no issues. Then I proceed to activate the Opengl2
engine, and I had some erros in the linking step. It was like this:



Undefined symbols:

*vtkFrameBufferObject*::methodX, referenced, from ...

*vtkFrameBufferObject*::methodY, referenced, from ...



Checking the CMakeLists.txt in "Rendering/OpenGL2" I found this:



if (NOT DEFINED OPENGL_ES_VERSION)

  set(Module_SRCS ${Module_SRCS}

    vtkDataTransferHelper.cxx

    vtkFrameBufferObject2.cxx

    *vtkPixelBufferObject.cxx*

    vtkRenderbuffer.cxx

    )

else()

  if (${OPENGL_ES_VERSION} MATCHES 3.0)

    set(Module_SRCS ${Module_SRCS}

      *vtkFrameBufferObject.cxx*

      vtkFrameBufferObject2.cxx

      vtkRenderbuffer.cxx

      )

  endif()

endif()





So I changed OPENGL_ES_VERSION to 3.0 (always in the CMake GUI)

and I had the following errors:


Undefined symbols:

*vtkPixelBufferObject*::methodZ, referenced, from ...

*vtkPixelBufferObject*::methodW, referenced, from ...



Since I'm very interested in using the opengl2 engine(specifically the new
features on vtkOpenGLPolyDataMapper described here
<http://www.kitware.com/source/home/post/163>) I modified the
CmakeLists.txt file to this:





if (NOT DEFINED OPENGL_ES_VERSION)

  set(Module_SRCS ${Module_SRCS}

    vtkDataTransferHelper.cxx

    vtkFrameBufferObject2.cxx

    *vtkPixelBufferObject.cxx*

    vtkRenderbuffer.cxx

    )

else()

  if (${OPENGL_ES_VERSION} MATCHES 3.0)

    message( STATUS "OpenGL3 ACTIVATED!!!!!!!!")

    set(Module_SRCS ${Module_SRCS}

      *vtkFrameBufferObject.cxx*

      vtkFrameBufferObject2.cxx

*      vtkPixelBufferObject.cxx*

      vtkRenderbuffer.cxx

      )

  endif()

endif()





And now it compiles perfectly and I already built an example in QtCreator.
So, is this something to be fixed? will my programs crash? will I have
conflict problems with your reflection system?



Best regards!



-- 

Piensa en el ambiente, antes de imprimir este e-mail piensa bien si es
necesario hacerlo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151027/0243f175/attachment.html>


More information about the vtkusers mailing list