Commit cc756bec authored by zmoelnig's avatar zmoelnig
Browse files

merged back in the changes from v0-91-0


git-svn-id: https://pd-gem.svn.sourceforge.net/svnroot/pd-gem/trunk/Gem@2498 49b2a0ca-c541-4d49-a7ef-d785e4371512
parent 1fc87671
This is GEM 0.90
This is GEM 0.91
===================
You can get the current distribution from:
http://gem.iem.at
......@@ -28,7 +28,7 @@ GemLibs-<OS>-<libver>.tgz :: auxiliary libraries (used to be "AuxLibs")
1) the core Gem-packages:
the core Gem-packages all extract into the same directory gem-<gemver>/
there are install-scripts for windoze (and probably IRIX) like GEM_INSTALL.bat
there are install-scripts for windoze (and probably IRIX)
these will install the documentation...
......@@ -40,9 +40,9 @@ the GemLibs have their own version numbering, starting with 1.
You can get the newest GemLib from the place mentioned above
DEPENDENCIES:
=============
current version: GEM-0.90
COMPILING DEPENDENCIES:
=======================
current version: GEM-0.91
GemLibs >= 1
PD >= 0.34
......@@ -54,21 +54,10 @@ INSTALLATION:
To install GEM on W32:
a) use the script
1) unzip the GEM package so that it is located at pd/gem
2) edit line 3&6 of the GEM_INSTALL.bat file to match your installation of pd
3) run GEM_INSTALL.bat
- this will put everything where it should be
4) Read the FAQ for instructions to run Pd and GEM
5) Check the release notes for changes and usage information
6) Use the manual html files to learn how to use GEM
a) (preferred method)
use the installer executable to install Gem into ...\pd\extra
to build the installer you will have to have NSIS installed
see build/win-nsis for details
b) do it by hand
......
installer CVS%DATE:~6,4%%DATE:~3,2%%DATE:~0,2%
\ No newline at end of file
rem installer CVS%DATE:~6,4%%DATE:~3,2%%DATE:~0,2%
installer 0.91.0
\ No newline at end of file
gem (0.91) unstable; urgency=low
* new upstream
-- IOhannes m zmoelnig <zmoelnig@iem.at> Thu, 22 May 2008 17:35:51 +0200
gem (0.90.cvs14122005-1) unstable; urgency=low
* new upstream release
-- Johannes M Zmoelnig <zmoelnig@ferrari.iemnet> Wed, 14 Dec 2005 18:50:09 +0100
-- IOhannes M zmoelnig <zmoelnig@iem.at> Wed, 14 Dec 2005 18:50:09 +0100
gem (0.87.cvs14042003-1) unstable; urgency=low
......
......@@ -133,3 +133,13 @@ bool CPPExtern :: checkGemVersion(int major, int minor) {
GEM_VERSION);
}
}
bool CPPExtern :: checkGemVersion(int major, int minor) {
if((major != GEM_VERSION_MAJOR) && (minor != GEM_VERSION_MINOR)) {
::error("GEM version mismatch: compiled for %d.%d but we are running %s",
major, minor,
GEM_VERSION);
return false;
}
return true;
}
......@@ -15,11 +15,6 @@
#ifndef INCLUDE_GEMBASE_H_
#define INCLUDE_GEMBASE_H_
#ifndef HELPSYMBOL_BASE
/* this must be defined before including CPPExtern.h (see below) */
# define HELPSYMBOL_BASE "Gem/"
#endif
#include "Base/GemGL.h"
#include "Base/CPPExtern.h"
......
......@@ -222,21 +222,10 @@ imageStruct *QTImage2mem(GraphicsImportComponent inImporter)
imageStruct *image_block = new imageStruct;
image_block->xsize = (*imageDescH)->width;
image_block->ysize = (*imageDescH)->height;
//image_block->type = GL_UNSIGNED_BYTE;
#ifdef PPC
image_block->type = GL_UNSIGNED_INT_8_8_8_8_REV;
#else
//image_block->type = GL_UNSIGNED_INT_8_8_8_8_REV;
image_block->type = GL_UNSIGNED_INT_8_8_8_8;
#endif
//image_block->type = GL_UNSIGNED_INT_8_8_8_8;
if ((*imageDescH)->depth <= 32) {
image_block->csize = 4;
//image_block->format = GL_RGBA;
image_block->format = GL_BGRA_EXT;
image_block->setCsizeByFormat(GL_RGBA_GEM);
} else {
image_block->csize = 1;
image_block->format = GL_LUMINANCE;
image_block->setCsizeByFormat(GL_LUMINANCE);
}
::DisposeHandle((Handle)imageDescH);
imageDescH = NULL;
......@@ -248,32 +237,17 @@ imageStruct *QTImage2mem(GraphicsImportComponent inImporter)
#endif
GWorldPtr gw = NULL;
#ifdef i386
OSErr err = QTNewGWorldFromPtr(&gw,
// k32BGRAPixelFormat,
k32ARGBPixelFormat,
&r, NULL, NULL, 0,
// keepLocal,
//useDistantHdwrMem,
image_block->data,
(long)(image_block->xsize * image_block->csize));
#else
OSErr err = QTNewGWorldFromPtr(&gw,
k32ARGBPixelFormat,
&r, NULL, NULL, 0,
// keepLocal,
//useDistantHdwrMem,
image_block->data,
(long)(image_block->xsize * image_block->csize));
#endif
/* taken from pix_filmDarwin */
k32ARGBPixelFormat, // gives noErr
&r, NULL, NULL, 0,
// keepLocal,
//useDistantHdwrMem,
image_block->data,
(long)(image_block->xsize * image_block->csize));
if (image_block->data == NULL || err) {
error("Can't allocate memory for an image.");
}
//image_block->pixelFormat = k32RGBAPixelFormat;
//image_block->pixelFormat = k32ARGBPixelFormat;
//image_block->pixMapH = GetGWorldPixMap(image_block->gw);
//::LockPixels(image_block->pixMapH);
::GraphicsImportSetGWorld(inImporter, gw, NULL);
::GraphicsImportDraw(inImporter);
::DisposeGWorld(gw); //dispose the offscreen
......
......@@ -1549,12 +1549,7 @@ GEM_EXTERN extern int getPixFormat(char*cformat){
switch(c){
case 'g': return GL_LUMINANCE;
case 'y': return GL_YUV422_GEM;
case 'r':
#ifndef __APPLE__
return GL_RGBA;
#else
return GL_BGRA_EXT;
#endif
case 'r': return GL_RGBA_GEM;
}
return 0;
}
......
/* Base/configDarwin.h. Generated by configure. */
/* the maximum openGL-version to use
* overrides the version found in the openGL-headers
*/
/* #undef GEM_OPENGL_VERSION_MAX */
/* font rendering */
#define HAVE_LIBFTGL 1
/* image loading / saving */
/* #undef HAVE_LIBMAGICKPLUSPLUS */
/* disable the use of openGL-ARB extensions */
/* #undef DONT_USE_ARB */
/* disable the use of openGL-nvidia extensions */
#define DONT_USE_NV 1
/* types, structures, compiler characteristics, ... */
#define SIZEOF_VOID_P 4
#define SIZEOF_UNSIGNED_INT 4
#define HAVE_GLSIZEIPTRARB 1
......@@ -15,10 +15,6 @@ LOG
#ifndef INCLUDE_GEMHEAD_H_
#define INCLUDE_GEMHEAD_H_
#ifndef HELPSYMBOL_BASE
# define HELPSYMBOL_BASE "Gem/"
#endif
#include "Base/CPPExtern.h"
class GemState;
......
......@@ -14,10 +14,6 @@ LOG
#ifndef INCLUDE_GEMKEYBOARD_H_
#define INCLUDE_GEMKEYBOARD_H_
#ifndef HELPSYMBOL_BASE
# define HELPSYMBOL_BASE "Gem/"
#endif
#include "Base/CPPExtern.h"
/*-----------------------------------------------------------------
......
......@@ -14,10 +14,6 @@ LOG
#ifndef INCLUDE_GEMKEYNAME_H_
#define INCLUDE_GEMKEYNAME_H_
#ifndef HELPSYMBOL_BASE
# define HELPSYMBOL_BASE "Gem/"
#endif
#include "Base/CPPExtern.h"
/*-----------------------------------------------------------------
......
......@@ -15,10 +15,6 @@ LOG
#ifndef INCLUDE_GEMMOUSE_H_
#define INCLUDE_GEMMOUSE_H_
#ifndef HELPSYMBOL_BASE
# define HELPSYMBOL_BASE "Gem/"
#endif
#include "Base/CPPExtern.h"
/*-----------------------------------------------------------------
......
......@@ -15,10 +15,6 @@
#ifndef INCLUDE_GEMWIN_H_
#define INCLUDE_GEMWIN_H_
#ifndef HELPSYMBOL_BASE
# define HELPSYMBOL_BASE "Gem/"
#endif
#include "Base/CPPExtern.h"
/*-----------------------------------------------------------------
......
......@@ -15,10 +15,6 @@
#ifndef INCLUDE_GEMEXTWIN_H_
#define INCLUDE_GEMEXTWIN_H_
#ifndef HELPSYMBOL_BASE
# define HELPSYMBOL_BASE "Gem/"
#endif
#include "Base/GemOutput.h"
#include "GemExtContext.h"
......
......@@ -15,9 +15,6 @@ LOG
#ifndef INCLUDE_PIX_BUFFER_H_
#define INCLUDE_PIX_BUFFER_H_
#ifndef HELPSYMBOL_BASE
# define HELPSYMBOL_BASE "Gem/"
#endif
#include "Base/CPPExtern.h"
#include "Base/GemPixUtil.h"
......
......@@ -235,7 +235,7 @@ void pix_convolve :: processYUVImage(imageStruct &image)
// calculate3x3YUV(image,tempImg);
//quick fix for Intel 3x3YUV problems
#ifdef PPC
#ifdef __BIG_ENDIAN__
if (m_rows == 3 && m_cols == 3) {
calculate3x3YUV(image,tempImg);
return;
......
......@@ -44,11 +44,7 @@ pix_film :: pix_film(t_symbol *filename) :
m_numFrames(0), m_reqFrame(0), m_curFrame(0),
m_numTracks(0), m_track(0), m_frame(NULL), m_data(NULL), m_film(true),
m_newFilm(0),
#ifdef __APPLE__
m_colorspace(GL_BGRA_EXT), m_format(GL_BGRA_EXT)
#else
m_colorspace(GL_RGBA), m_format(GL_RGBA)
#endif
m_colorspace(GL_RGBA_GEM), m_format(GL_RGBA_GEM)
{
// setting the current frame
inlet_new(this->x_obj, &this->x_obj->ob_pd, gensym("float"), gensym("img_num"));
......@@ -94,35 +90,28 @@ void pix_film :: createBuffer()
const int neededYSize = m_ysize;
int oldx, oldy;
oldx = 0;
oldy = 0;
oldx = 0;
oldy = 0;
if (neededXSize != oldx || neededYSize != oldy)
{
deleteBuffer();
m_pixBlock.image.xsize = neededXSize;
m_pixBlock.image.ysize = neededYSize;
m_pixBlock.image.csize = m_csize;
m_pixBlock.image.format= m_format;
#ifdef __APPLE__
int dataSize = m_pixBlock.image.xsize * m_pixBlock.image.ysize * m_pixBlock.image.csize;
#else
int dataSize = m_pixBlock.image.xsize * m_pixBlock.image.ysize * m_pixBlock.image.csize+4; /* +4 from MPEG */
#endif
m_data = new unsigned char[dataSize];
// memset(m_data, 0, dataSize);
m_pixBlock.image.data = m_data;
m_frame = m_data;
m_pixBlock.image.csize = m_csize;
m_pixBlock.image.format= m_format;
oldx = m_pixBlock.image.xsize;
oldy = m_pixBlock.image.ysize;
}
//post("created buffer @ %x", m_data);
m_pixBlock.image.setCsizeByFormat(m_format);
m_pixBlock.image.xsize = neededXSize;
m_pixBlock.image.ysize = neededYSize;
int dataSize = m_pixBlock.image.xsize * m_pixBlock.image.ysize * m_pixBlock.image.csize+4; /* +4 from MPEG */
m_data = new unsigned char[dataSize];
// memset(m_data, 0, dataSize);
m_pixBlock.image.data = m_data;
m_pixBlock.image.notowned = 1;
m_frame = m_data;
oldx = m_pixBlock.image.xsize;
oldy = m_pixBlock.image.ysize;
}
//post("created buffer @ %x", m_data);
}
/////////////////////////////////////////////////////////
......@@ -195,15 +184,21 @@ void pix_film :: render(GemState *state)
if (m_newFilm){
m_pixBlock.newfilm = 1;
m_newFilm = 0;
// post("new film set");
}
state->image = &m_pixBlock;
// whoa: the following construct seems to be a bug
// i don't dare to "fix" it now
#ifdef __APPLE__
if (m_reqFrame == m_curFrame)
// ::MoviesTask(NULL, 0);
#endif
/* texture it, if needed */
texFrame(state, newImage);
m_pixBlock.newimage = newImage;
......
This diff is collapsed.
......@@ -48,10 +48,9 @@ void pix_mask :: processRGBA_RGBA(imageStruct &image, imageStruct &right)
unsigned char *mask = right.data;
while (datasize--) {
// do we use the alpha value
pixels[chAlpha] = (mask[chRed ] * 79 +
mask[chGreen] * 156 +
mask[chBlue ] * 21)>>8;
// calculate the alpha value
unsigned short grey=(mask[chRed ] * 79 + mask[chGreen] * 156 + mask[chBlue ] * 21);
pixels[chAlpha] = grey>>8;
pixels += 4;
mask += 4;
}
......
......@@ -408,9 +408,7 @@ void pix_videoDarwin :: InitSeqGrabber()
if (m_colorspace==GL_BGRA_EXT){
m_pixBlock.image.xsize = m_vidXSize;
m_pixBlock.image.ysize = m_vidYSize;
m_pixBlock.image.csize = 4;
m_pixBlock.image.format = GL_BGRA_EXT;
m_pixBlock.image.type = GL_UNSIGNED_INT_8_8_8_8_REV;
m_pixBlock.image.setCsizeByFormat(GL_RGBA_GEM);
int dataSize = m_pixBlock.image.xsize * m_pixBlock.image.ysize
* 4 * sizeof(unsigned char);
m_pixBlock.image.data = new unsigned char[dataSize];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment