How i created this package:
This is a patch against a 1.4.2 CVS version. For 1.5.0 i recommend to include only some of them (ffmpegTexture.h, ffmpegAudioCursor.cxx, ffmpegVideoCursor.cxx), my 1.5.0 binary was built using this (iirc).
my patch against panda3d. It’s still not usuable to be integrated into the “normal” panda3d, but works better then the previous versions…
Note that this requires a ffmpeg from darwinports and openAl cvs (built with xcode)…
also check out Adrians post in discourse.panda3d.org/viewtopic … &start=150, he did the changes based on a fresh checkout…
Index: panda3d/dtool/Config.OSX.pp
===================================================================
RCS file: /cvsroot/panda3d/dtool/Config.OSX.pp,v
retrieving revision 1.4
diff -u -r1.4 Config.OSX.pp
--- panda3d/dtool/Config.OSX.pp 29 Jun 2007 01:39:09 -0000 1.4
+++ panda3d/dtool/Config.OSX.pp 21 Nov 2007 19:37:14 -0000
@@ -21,6 +21,9 @@
#define IS_OSX 1
+// doesnt work?
+//#defer interrogate_ipath $[install_parser_inc_dir:%=-S%] $[target_ipath:%=-I%]
+
// Assume that OSX has OpenGL available.
#define HAVE_GL 1
Index: panda3d/dtool/Config.pp
===================================================================
RCS file: /cvsroot/panda3d/dtool/Config.pp,v
retrieving revision 1.217
diff -u -r1.217 Config.pp
--- panda3d/dtool/Config.pp 29 Jun 2007 01:39:09 -0000 1.217
+++ panda3d/dtool/Config.pp 21 Nov 2007 19:37:14 -0000
@@ -776,6 +776,13 @@
#define FMODEX_LIBS fmodex
#defer HAVE_FMODEX $[libtest $[FMODEX_LPATH],$[FMODEX_LIBS]]
+// Info for the OpenAL audio engine
+// note this may be overwritten in wintools Config.pp
+#define OPENAL_IPATH /usr/include
+#define OPENAL_LPATH /usr/lib
+#define OPENAL_LIBS openal
+#defer HAVE_OPENAL $[libtest $[OPENAL_LPATH],$[OPENAL_LIBS]]
+
// Info for http://www.sourceforge.net/projects/chromium
// note this may be overwritten in wintools Config.pp
#define CHROMIUM_IPATH /usr/include/chromium/include
Index: panda3d/dtool/LocalSetup.pp
===================================================================
RCS file: /cvsroot/panda3d/dtool/LocalSetup.pp,v
retrieving revision 1.124
diff -u -r1.124 LocalSetup.pp
--- panda3d/dtool/LocalSetup.pp 20 Jul 2007 23:59:10 -0000 1.124
+++ panda3d/dtool/LocalSetup.pp 21 Nov 2007 19:37:15 -0000
@@ -91,6 +91,11 @@
#else
#print - Did not find FMOD Ex sound library
#endif
+#if $[HAVE_OPENAL]
+#print + OpenAL sound library
+#else
+#print - Did not find OpenAL sound library
+#endif
#if $[HAVE_GTK]
#print + gtk+-2
#else
Index: panda3d/dtool/Package.pp
===================================================================
RCS file: /cvsroot/panda3d/dtool/Package.pp,v
retrieving revision 1.60
diff -u -r1.60 Package.pp
--- panda3d/dtool/Package.pp 16 Mar 2007 03:04:06 -0000 1.60
+++ panda3d/dtool/Package.pp 21 Nov 2007 19:37:15 -0000
@@ -257,6 +257,11 @@
#set FMODEX_LIBS $[FMODEX_LIBS]
#set HAVE_FMODEX $[HAVE_FMODEX]
+#set OPENAL_IPATH $[unixfilename $[OPENAL_IPATH]]
+#set OPENAL_LPATH $[unixfilename $[OPENAL_LPATH]]
+#set OPENAL_LIBS $[OPENAL_LIBS]
+#set HAVE_OPENAL $[HAVE_OPENAL]
+
#set CHROMIUM_IPATH $[unixfilename $[CHROMIUM_IPATH]]
#set CHROMIUM_LPATH $[unixfilename $[CHROMIUM_LPATH]]
#set CHROMIUM_LIBS $[CHROMIUM_LIBS]
Index: panda3d/dtool/pptempl/Global.pp
===================================================================
RCS file: /cvsroot/panda3d/dtool/pptempl/Global.pp,v
retrieving revision 1.121
diff -u -r1.121 Global.pp
--- panda3d/dtool/pptempl/Global.pp 3 Aug 2007 22:00:10 -0000 1.121
+++ panda3d/dtool/pptempl/Global.pp 21 Nov 2007 19:37:15 -0000
@@ -343,6 +343,14 @@
#define fmodex_libs $[FMODEX_LIBS]
#endif
+#if $[HAVE_OPENAL]
+ #define openal_ipath $[wildcard $[OPENAL_IPATH]]
+ #define openal_lpath $[wildcard $[OPENAL_LPATH]]
+ #define openal_cflags $[OPENAL_CFLAGS]
+ #define openal_libs $[OPENAL_LIBS]
+ #define openal_framework $[OPENAL_FRAMEWORK]
+#endif
+
#if $[HAVE_CHROMIUM]
#define chromium_ipath $[wildcard $[CHROMIUM_IPATH]]
#define chromium_lpath $[wildcard $[CHROMIUM_LPATH]]
Index: panda3d/dtool/pptempl/Global.unix.pp
===================================================================
RCS file: /cvsroot/panda3d/dtool/pptempl/Global.unix.pp,v
retrieving revision 1.3
diff -u -r1.3 Global.unix.pp
--- panda3d/dtool/pptempl/Global.unix.pp 18 Oct 2000 21:40:41 -0000 1.3
+++ panda3d/dtool/pptempl/Global.unix.pp 21 Nov 2007 19:37:15 -0000
@@ -5,3 +5,5 @@
// are read. It defines a few global variables to assist
// Template.unix.pp.
//
+
+#defer interrogate_ipath $[install_parser_inc_dir:%=-S%] $[target_ipath:%=-I%]
Index: panda3d/panda/src/audiotraits/Sources.pp
===================================================================
RCS file: /cvsroot/panda3d/panda/src/audiotraits/Sources.pp,v
retrieving revision 1.30
diff -u -r1.30 Sources.pp
--- panda3d/panda/src/audiotraits/Sources.pp 20 Aug 2007 22:34:58 -0000 1.30
+++ panda3d/panda/src/audiotraits/Sources.pp 21 Nov 2007 19:37:17 -0000
@@ -1,5 +1,5 @@
#define OTHER_LIBS dtoolconfig dtool dtoolbase:c dtoolutil:c \
- putil:c prc:c interrogatedb:c dconfig:c
+ putil:c prc:c interrogatedb:c dconfig:c
#define BUILD_DIRECTORY $[HAVE_AUDIO]
@@ -49,25 +49,30 @@
#end lib_target
-//#begin lib_target
-// #define TARGET openal_audio
-// #define BUILD_TARGET $[HAVE_OPENAL]
-// #define USE_PACKAGES openal
-// #define BUILDING_DLL BUILDING_OPENAL_AUDIO
-// #define LOCAL_LIBS audio event
-// #define WIN_SYS_LIBS $[WIN_SYS_LIBS] user32.lib advapi32.lib winmm.lib
-//
-// #define COMBINED_SOURCES $[TARGET]_composite1.cxx
-//
-// #define SOURCES \
-// config_openalAudio.h \
-// openalAudioManager.h \
-// openalAudioSound.I openalAudioSound.h
-//
-// #define INCLUDED_SOURCES \
-// config_openalAudio.cxx openalAudioManager.cxx openalAudioSound.cxx
-//
-//#end lib_target
+#begin lib_target
+ #print building openal
+ #define TARGET openal_audio
+ #define BUILD_TARGET $[HAVE_OPENAL]
+ #define USE_PACKAGES openal
+ #define BUILDING_DLL BUILDING_OPENAL_AUDIO
+ #define LOCAL_LIBS audio event movies gobj
+ #define WIN_SYS_LIBS $[WIN_SYS_LIBS] user32.lib advapi32.lib winmm.lib
+
+ #define COMBINED_SOURCES $[TARGET]_composite1.cxx
+
+ #define OTHER_LIBS dtoolconfig dtool dtoolbase:c dtoolutil:c \
+ putil:c prc:c interrogatedb:c dconfig:c movies:c
+
+ #define SOURCES \
+ config_openalAudio.h \
+ openalAudioManager.h \
+ openalAudioSound.I \
+ openalAudioSound.h
+
+ #define INCLUDED_SOURCES \
+ config_openalAudio.cxx openalAudioManager.cxx openalAudioSound.cxx
+
+#end lib_target
//#begin lib_target
// #define TARGET audio_linux
Index: panda3d/panda/src/audiotraits/openalAudioManager.h
===================================================================
RCS file: /cvsroot/panda3d/panda/src/audiotraits/openalAudioManager.h,v
retrieving revision 1.4
diff -u -r1.4 openalAudioManager.h
--- panda3d/panda/src/audiotraits/openalAudioManager.h 29 Aug 2007 21:04:47 -0000 1.4
+++ panda3d/panda/src/audiotraits/openalAudioManager.h 21 Nov 2007 19:37:17 -0000
@@ -30,8 +30,8 @@
#include "pset.h"
#include "movieAudioCursor.h"
-#include <AL/al.h>
-#include <AL/alc.h>
+#include <al.h>
+#include <alc.h>
class OpenALAudioSound;
Index: panda3d/panda/src/audiotraits/openalAudioSound.h
===================================================================
RCS file: /cvsroot/panda3d/panda/src/audiotraits/openalAudioSound.h,v
retrieving revision 1.4
diff -u -r1.4 openalAudioSound.h
--- panda3d/panda/src/audiotraits/openalAudioSound.h 29 Aug 2007 21:04:47 -0000 1.4
+++ panda3d/panda/src/audiotraits/openalAudioSound.h 21 Nov 2007 19:37:18 -0000
@@ -26,12 +26,12 @@
#ifdef HAVE_OPENAL //[
+#include "openalAudioManager.h"
#include "audioSound.h"
#include "movieAudioCursor.h"
#include "trueClock.h"
-
-#include <AL/al.h>
-#include <AL/alc.h>
+#include <al.h>
+#include <alc.h>
class EXPCL_OPENAL_AUDIO OpenALAudioSound : public AudioSound {
friend class OpenALAudioManager;
Index: panda3d/panda/src/glstuff/glGraphicsStateGuardian_src.h
===================================================================
RCS file: /cvsroot/panda3d/panda/src/glstuff/glGraphicsStateGuardian_src.h,v
retrieving revision 1.128
diff -u -r1.128 glGraphicsStateGuardian_src.h
--- panda3d/panda/src/glstuff/glGraphicsStateGuardian_src.h 19 Jul 2007 16:16:41 -0000 1.128
+++ panda3d/panda/src/glstuff/glGraphicsStateGuardian_src.h 21 Nov 2007 19:37:20 -0000
@@ -18,6 +18,8 @@
#include "pandabase.h"
+#include "gl.h"
+#include "panda_glext.h"
#include "graphicsStateGuardian.h"
#include "geomVertexColumn.h"
#include "texture.h"
@@ -81,6 +83,28 @@
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
typedef void (APIENTRY * PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);
+// -- by reto spoerri (just so i know what i changed) --
+typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count);
+typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights);
+typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);
+typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);
+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
+typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
+typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);
+typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);
+typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);
+// -- end of reto spoerri --
#endif // __EDG__
////////////////////////////////////////////////////////////////////
Index: panda3d/panda/src/grutil/ffmpegTexture.h
===================================================================
RCS file: /cvsroot/panda3d/panda/src/grutil/ffmpegTexture.h,v
retrieving revision 1.7
diff -u -r1.7 ffmpegTexture.h
--- panda3d/panda/src/grutil/ffmpegTexture.h 20 Jul 2007 23:02:54 -0000 1.7
+++ panda3d/panda/src/grutil/ffmpegTexture.h 21 Nov 2007 19:37:20 -0000
@@ -24,8 +24,10 @@
#include "videoTexture.h"
-#include "avcodec.h"
-#include "avformat.h"
+extern "C" {
+ #include "avcodec.h"
+ #include "avformat.h"
+}
////////////////////////////////////////////////////////////////////
// Class : OpenCVTexture
Index: panda3d/panda/src/movies/ffmpegAudioCursor.cxx
===================================================================
RCS file: /cvsroot/panda3d/panda/src/movies/ffmpegAudioCursor.cxx,v
retrieving revision 1.3
diff -u -r1.3 ffmpegAudioCursor.cxx
--- panda3d/panda/src/movies/ffmpegAudioCursor.cxx 2 Oct 2007 17:17:48 -0000 1.3
+++ panda3d/panda/src/movies/ffmpegAudioCursor.cxx 21 Nov 2007 19:37:21 -0000
@@ -19,8 +19,10 @@
#ifdef HAVE_FFMPEG
#include "ffmpegAudioCursor.h"
-#include "avcodec.h"
-#include "avformat.h"
+extern "C" {
+ #include "avcodec.h"
+ #include "avformat.h"
+}
TypeHandle FfmpegAudioCursor::_type_handle;
Index: panda3d/panda/src/movies/ffmpegVideoCursor.cxx
===================================================================
RCS file: /cvsroot/panda3d/panda/src/movies/ffmpegVideoCursor.cxx,v
retrieving revision 1.4
diff -u -r1.4 ffmpegVideoCursor.cxx
--- panda3d/panda/src/movies/ffmpegVideoCursor.cxx 26 Oct 2007 21:54:54 -0000 1.4
+++ panda3d/panda/src/movies/ffmpegVideoCursor.cxx 21 Nov 2007 19:37:24 -0000
@@ -20,8 +20,10 @@
#include "ffmpegVideoCursor.h"
#include "config_movies.h"
-#include "avcodec.h"
-#include "avformat.h"
+extern "C" {
+ #include "avcodec.h"
+ #include "avformat.h"
+}
#include "pStatCollector.h"
#include "pStatTimer.h"
Index: panda3d/panda/src/nativenet/socket_fdset.h
===================================================================
RCS file: /cvsroot/panda3d/panda/src/nativenet/socket_fdset.h,v
retrieving revision 1.4
diff -u -r1.4 socket_fdset.h
--- panda3d/panda/src/nativenet/socket_fdset.h 7 Mar 2007 21:57:25 -0000 1.4
+++ panda3d/panda/src/nativenet/socket_fdset.h 21 Nov 2007 19:37:25 -0000
@@ -36,7 +36,7 @@
friend struct Socket_Selector;
SOCKET _maxid;
- fd_set _the_set;
+ mutable fd_set _the_set;
};
////////////////////////////////////////////////////////////////////
Index: panda3d/panda/src/nativenet/socket_portable.h
===================================================================
RCS file: /cvsroot/panda3d/panda/src/nativenet/socket_portable.h,v
retrieving revision 1.6
diff -u -r1.6 socket_portable.h
--- panda3d/panda/src/nativenet/socket_portable.h 20 Mar 2007 20:42:22 -0000 1.6
+++ panda3d/panda/src/nativenet/socket_portable.h 21 Nov 2007 19:37:25 -0000
@@ -264,8 +264,19 @@
#include <arpa/inet.h>
#include <unistd.h>
+
typedef int SOCKET;
const SOCKET BAD_SOCKET = -1;
+// this is WRONG !!! but helps compiling ;)
+// interrogate fails without this, why is _SYS_SOCKET_H_ not defined?
+// it is defined by sys/socket.h
+#ifndef _SYS_SOCKET_H_
+// should be defined by netinet/in.h
+typedef int sockaddr_in;
+// should be defined by sys/select.h or sys/types.h
+typedef int fd_set;
+#endif
+
inline int DO_SELECT(SOCKET n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,struct timeval *timeout)
{
return select((int) n, readfds, writefds, exceptfds,timeout);
Index: panda3d/panda/src/osxdisplay/osxGraphicsPipe.h
===================================================================
RCS file: /cvsroot/panda3d/panda/src/osxdisplay/osxGraphicsPipe.h,v
retrieving revision 1.8
diff -u -r1.8 osxGraphicsPipe.h
--- panda3d/panda/src/osxdisplay/osxGraphicsPipe.h 14 Jul 2007 05:49:43 -0000 1.8
+++ panda3d/panda/src/osxdisplay/osxGraphicsPipe.h 21 Nov 2007 19:37:25 -0000
@@ -16,6 +16,8 @@
#ifndef OSXGRAPHICSPIPE_H
#define OSXGRAPHICSPIPE_H
+#include "gl.h"
+#include "panda_glext.h"
#include "pandabase.h"
#include "graphicspipe.h"
Index: panda3d/panda/src/osxdisplay/osxGraphicsWindow.h
===================================================================
RCS file: /cvsroot/panda3d/panda/src/osxdisplay/osxGraphicsWindow.h,v
retrieving revision 1.18
diff -u -r1.18 osxGraphicsWindow.h
--- panda3d/panda/src/osxdisplay/osxGraphicsWindow.h 2 Nov 2007 23:33:48 -0000 1.18
+++ panda3d/panda/src/osxdisplay/osxGraphicsWindow.h 21 Nov 2007 19:37:25 -0000
@@ -19,6 +19,7 @@
#include "pandabase.h"
#include "graphicsWindow.h"
#include "buttonHandle.h"
+#include "panda_glext.h"
#include <Carbon/Carbon.h>
Index: panda3d/panda/src/pandabase/pandabase.h
===================================================================
RCS file: /cvsroot/panda3d/panda/src/pandabase/pandabase.h,v
retrieving revision 1.6
diff -u -r1.6 pandabase.h
--- panda3d/panda/src/pandabase/pandabase.h 13 Feb 2004 19:27:46 -0000 1.6
+++ panda3d/panda/src/pandabase/pandabase.h 21 Nov 2007 19:37:26 -0000
@@ -20,6 +20,8 @@
C or C++ file. It must be compilable for C as well as C++ files,
so no C++-specific code or syntax can be put here. */
+#define HAVE_OPENAL 1
+
#ifndef PANDABASE_H
#define PANDABASE_H
[/code]