Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

OSX 10.6 fixed from Robert Castle

  • Loading branch information...
commit 56b5b759bfbc3dc42038b5a5d15140ca54ff00bc 1 parent 070e28c
edrosten authored
View
26 configure_osx_32bit
@@ -0,0 +1,26 @@
+#!/bin/bash
+#This script forces Snow Leopard (10.6) to build using Leopard (10.5)
+and to build a 32 bit build.
+# Use it when building livCVD, GVars, and lib3ds
+#
+# Originally wirrten by Damian Stewart
+# http://lists.nongnu.org/archive/html/libcvd-members/2010-05/msg00000.html
+# Modified by Robert Castle
+
+SDK="-isysroot /Developer/SDKs/MacOSX10.6.sdk"
+SDKLIB="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk"
+export MACOSX_DEPLOYMENT_TARGET="10.5"
+
+ARCH="-arch i386"
+
+export CFLAGS="$ARCH $SDK -mmacosx-version-min=10.5 -m32 -D_OSX"
+export CXXFLAGS="$ARCH $SDK -mmacosx-version-min=10.5 -m32 -D_OSX"
+export CPPFLAGS="$ARCH $SDK -mmacosx-version-min=10.5 -m32 -D_OSX"
+export LDFLAGS="$ARCH $SDKLIB -mmacosx-version-min=10.5 -m32"
+
+CC="/usr/bin/gcc-4.2"
+CXX="/usr/bin/g++-4.2"
+OBJC="/usr/bin/gcc-4.2"
+
+./configure $1 $2 $3 $4 $5 $6 $7 $8 $9
+
View
9 cvd/gl_helpers.h
@@ -36,8 +36,17 @@
#ifdef WIN32
#include <windows.h>
#endif
+
+#ifdef _OSX
+#include <OpenGL/gl.h>
+#include <OpenGL/glu.h>
+#else
#include <GL/gl.h>
#include <GL/glu.h>
+#endif
+
+
+
#include <cvd/internal/gl_types.h>
#ifdef CVD_HAVE_TOON
View
4 cvd_src/Linux/dvbuffer3_dc1394v2.cc
@@ -128,7 +128,7 @@ namespace CVD
static DV3ColourFilter DV3_from_DC_ColourFilter(dc1394color_filter_t f, uint32_t /*vendor*/, uint32_t /*model*/, uint64_t guid)
{
// some cameras report incorrect bayer patterns
- if (guid==0x814436200006075) { return GBRG; }
+ if (guid==0x814436200006075ULL) { return GBRG; }
return static_cast<DV3ColourFilter>(f - DC1394_COLOR_FILTER_MIN);
}
@@ -155,7 +155,7 @@ namespace CVD
{
// some cameras report their raw bayer mode as being mono and do not
// have a mono mode at all...
- if (guid==0x814436200006075) {
+ if (guid==0x814436200006075ULL) {
//vendor==0x81443 model==0x0 ?
switch(s)
{
View
2  pnm_src/pnm_grok.cxx
@@ -631,7 +631,7 @@ namespace CVD
//for (size_t i=0; i<n_shorts; i++)
//o << data[2*i+1] << data[2*i];
#else
- o.write((const char*)data, n*sizeof(unsigned short));
+ o.write((const char*)data, n_shorts*sizeof(unsigned short));
#endif
}
View
18 progs/calibrate.cxx
@@ -810,12 +810,19 @@ int main(int argc, char* argv[])
videoBuffer->put_frame(vframe);
glDisable(GL_BLEND);
- glEnable(GL_TEXTURE_RECTANGLE_NV);
+ #ifdef GL_TEXTURE_RECTANGLE_ARB
+ texTarget=GL_TEXTURE_RECTANGLE_ARB;
+ #elif defined GL_TEXTURE_RECTANGLE_NV
+ texTarget=GL_TEXTURE_RECTANGLE_NV;
+ #else
+ texTarget=GL_TEXTURE_RECTANGLE_EXT;
+ #endif
+ glEnable(texTarget);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
- glTexParameterf( GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
- glTexParameterf( GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
+ glTexParameterf( texTarget, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
+ glTexParameterf( texTarget, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
glPixelStorei(GL_UNPACK_ALIGNMENT,1);
- glTexImage2D(temp, 0, GL_TEXTURE_RECTANGLE_NV);
+ glTexImage2D(temp, 0, texTarget);
glBegin(GL_QUADS);
glTexCoord2i(0, 0);
glVertex2i(0,0);
@@ -826,7 +833,8 @@ int main(int argc, char* argv[])
glTexCoord2i(0, temp.size().y);
glVertex2i(0, disp.size().y);
glEnd ();
- glDisable(GL_TEXTURE_RECTANGLE_NV);
+ glDisable(texTarget);
+
glEnable(GL_BLEND);
//this is the bit that does the calibrating
Please sign in to comment.
Something went wrong with that request. Please try again.