Remove GLU files from GL directory
git-svn-id: svn://localhost/gambas/trunk@3983 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
2df135f767
commit
e7794807a9
@ -1,70 +0,0 @@
|
|||||||
/***************************************************************************
|
|
||||||
|
|
||||||
GLU.c
|
|
||||||
|
|
||||||
(c) 2005-2007 Laurent Carlier <lordheavy@users.sourceforge.net>
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
||||||
MA 02110-1301, USA.
|
|
||||||
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
#define __GLU_C
|
|
||||||
|
|
||||||
#include "GLU.h"
|
|
||||||
|
|
||||||
#include "GLUcoordTransf.h"
|
|
||||||
#include "GLUtextureImage.h"
|
|
||||||
|
|
||||||
BEGIN_METHOD(GLUERRORSTRING, GB_INTEGER code)
|
|
||||||
|
|
||||||
const GLubyte *errStr = gluErrorString(VARG(code));
|
|
||||||
GB.ReturnNewZeroString((char *) errStr);
|
|
||||||
|
|
||||||
END_METHOD
|
|
||||||
|
|
||||||
/**************************************************************************/
|
|
||||||
|
|
||||||
GB_DESC Cglu[] =
|
|
||||||
{
|
|
||||||
GB_DECLARE("Glu",0), GB_NOT_CREATABLE(),
|
|
||||||
|
|
||||||
/* Get error string */
|
|
||||||
GB_STATIC_METHOD("ErrorString", "s", GLUERRORSTRING, "(ErrorCode)i"),
|
|
||||||
|
|
||||||
/* Coordinate Transformation - see GLUcoordTransf.h */
|
|
||||||
GB_STATIC_METHOD("LookAt", NULL, GLULOOKAT, "(EyeX)f(EyeY)f(EyeZ)f(CenterX)f(CenterY)f(CenterZ)f(UpX)f(UpY)f(UpZ)f"),
|
|
||||||
GB_STATIC_METHOD("Ortho2D", NULL, GLUORTHO2D, "(Left)f(Right)f(Bottom)f(Top)f"),
|
|
||||||
GB_STATIC_METHOD("Perspective", NULL, GLUPERSPECTIVE, "(Fovy)f(Aspect)f(ZNear)f(ZFar)f"),
|
|
||||||
GB_STATIC_METHOD("PickMatrix", NULL, GLUPICKMATRIX, "(X)f(Y)f(DelX)f(DelY)f(Viewport)Integer[]"),
|
|
||||||
|
|
||||||
/* Texture Image - see GLUtextureImage.h */
|
|
||||||
GB_STATIC_METHOD("Build1DMipmaps", "i", GLUBUILD1DMIPMAPS, "(Image)Image;"),
|
|
||||||
GB_STATIC_METHOD("Build2DMipmaps", "i", GLUBUILD2DMIPMAPS, "(Image)Image;"),
|
|
||||||
|
|
||||||
/* Quadratics - see GLUquadratic.h */
|
|
||||||
|
|
||||||
|
|
||||||
/********************/
|
|
||||||
/* opengl constants */
|
|
||||||
/********************/
|
|
||||||
|
|
||||||
/* Errors */
|
|
||||||
GB_CONSTANT("GLU_INVALID_ENUM", "i", GLU_INVALID_ENUM),
|
|
||||||
GB_CONSTANT("GLU_INVALID_VALUE", "i", GLU_INVALID_OPERATION),
|
|
||||||
GB_CONSTANT("GLU_OUT_OF_MEMORY", "i", GLU_OUT_OF_MEMORY),
|
|
||||||
|
|
||||||
GB_END_DECLARE
|
|
||||||
};
|
|
@ -1,35 +0,0 @@
|
|||||||
/***************************************************************************
|
|
||||||
|
|
||||||
GLU.h
|
|
||||||
|
|
||||||
(c) 2005-2007 Laurent Carlier <lordheavy@users.sourceforge.net>
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
||||||
MA 02110-1301, USA.
|
|
||||||
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
#ifndef __GLU_H
|
|
||||||
#define __GLU_H
|
|
||||||
|
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
#include <GL/glu.h>
|
|
||||||
|
|
||||||
#ifndef __GLU_C
|
|
||||||
extern GB_DESC Cglu[];
|
|
||||||
#endif /* __GLU_C */
|
|
||||||
|
|
||||||
#endif /* __GLU_H */
|
|
@ -1,61 +0,0 @@
|
|||||||
/***************************************************************************
|
|
||||||
|
|
||||||
GLUcoordTransf.c
|
|
||||||
|
|
||||||
(c) 2005-2007 Laurent Carlier <lordheavy@users.sourceforge.net>
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
||||||
MA 02110-1301, USA.
|
|
||||||
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
#define __GLUCOORDTRANSF_C
|
|
||||||
|
|
||||||
#include "GLU.h"
|
|
||||||
|
|
||||||
/**************************************************************************/
|
|
||||||
|
|
||||||
BEGIN_METHOD(GLULOOKAT, GB_FLOAT eyex; GB_FLOAT eyey; GB_FLOAT eyez; GB_FLOAT centerx; GB_FLOAT centery; GB_FLOAT centerz; GB_FLOAT upx; GB_FLOAT upy; GB_FLOAT upz)
|
|
||||||
|
|
||||||
gluLookAt(VARG(eyex),VARG(eyey),VARG(eyez),VARG(centerx),VARG(centery),VARG(centerz),VARG(upx),VARG(upy),VARG(upz));
|
|
||||||
|
|
||||||
END_METHOD
|
|
||||||
|
|
||||||
BEGIN_METHOD(GLUORTHO2D, GB_FLOAT left; GB_FLOAT right; GB_FLOAT bottom; GB_FLOAT top)
|
|
||||||
|
|
||||||
gluOrtho2D(VARG(left),VARG(right),VARG(bottom),VARG(top));
|
|
||||||
|
|
||||||
END_METHOD
|
|
||||||
|
|
||||||
BEGIN_METHOD(GLUPERSPECTIVE, GB_FLOAT fovy; GB_FLOAT aspect; GB_FLOAT znear; GB_FLOAT zfar)
|
|
||||||
|
|
||||||
gluPerspective(VARG(fovy),VARG(aspect),VARG(znear),VARG(zfar));
|
|
||||||
|
|
||||||
END_METHOD
|
|
||||||
|
|
||||||
BEGIN_METHOD(GLUPICKMATRIX, GB_FLOAT x; GB_FLOAT y; GB_FLOAT width; GB_FLOAT height; GB_OBJECT viewport)
|
|
||||||
|
|
||||||
GLint iparams[4];
|
|
||||||
GB_ARRAY viewport = (GB_ARRAY) VARG(viewport);
|
|
||||||
int i, count = GB.Array.Count(viewport);
|
|
||||||
|
|
||||||
count = (count > 4 ? 4 : count);
|
|
||||||
|
|
||||||
for (i=0; i<count; i++)
|
|
||||||
iparams[i] = *((GLint *)GB.Array.Get(viewport,i));
|
|
||||||
|
|
||||||
gluPickMatrix(VARG(x), VARG(y), VARG(width), VARG(height), iparams);
|
|
||||||
|
|
||||||
END_METHOD
|
|
@ -1,34 +0,0 @@
|
|||||||
/***************************************************************************
|
|
||||||
|
|
||||||
GLUcoordTransf.h
|
|
||||||
|
|
||||||
(c) 2005-2007 Laurent Carlier <lordheavy@users.sourceforge.net>
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
||||||
MA 02110-1301, USA.
|
|
||||||
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
#ifndef __GLUCOORDTRANSF_H
|
|
||||||
#define __GLUCOORDTRANSF_H
|
|
||||||
|
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
DECLARE_METHOD(GLULOOKAT);
|
|
||||||
DECLARE_METHOD(GLUORTHO2D);
|
|
||||||
DECLARE_METHOD(GLUPERSPECTIVE);
|
|
||||||
DECLARE_METHOD(GLUPICKMATRIX);
|
|
||||||
|
|
||||||
#endif /* __GLUCOORDTRANSF_H */
|
|
@ -1,55 +0,0 @@
|
|||||||
/***************************************************************************
|
|
||||||
|
|
||||||
GLUtextureImage.c
|
|
||||||
|
|
||||||
(c) 2005-2007 Laurent Carlier <lordheavy@users.sourceforge.net>
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
||||||
MA 02110-1301, USA.
|
|
||||||
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
#define __GLUTEXTUREIMAGE_C
|
|
||||||
|
|
||||||
#include "GLU.h"
|
|
||||||
|
|
||||||
BEGIN_METHOD(GLUBUILD1DMIPMAPS, GB_OBJECT Image)
|
|
||||||
|
|
||||||
GB_IMG *image;
|
|
||||||
int format;
|
|
||||||
int status;
|
|
||||||
|
|
||||||
if (IMAGE_get(ARG(Image), &image, &format))
|
|
||||||
return;
|
|
||||||
|
|
||||||
status = gluBuild1DMipmaps(GL_TEXTURE_1D, IMAGE_get_ncolors(format), image->width, format, GL_UNSIGNED_BYTE, image->data);
|
|
||||||
|
|
||||||
GB.ReturnInteger(status);
|
|
||||||
|
|
||||||
END_METHOD
|
|
||||||
|
|
||||||
BEGIN_METHOD(GLUBUILD2DMIPMAPS, GB_OBJECT Image)
|
|
||||||
|
|
||||||
GB_IMG *image;
|
|
||||||
int status;
|
|
||||||
|
|
||||||
if (IMAGE_get(ARG(Image), &image, &format))
|
|
||||||
return;
|
|
||||||
|
|
||||||
status = gluBuild2DMipmaps(GL_TEXTURE_2D, IMAGE_get_ncolors(format), image->width, image->height, format, GL_UNSIGNED_BYTE, image->data);
|
|
||||||
|
|
||||||
GB.ReturnInteger(status);
|
|
||||||
|
|
||||||
END_METHOD
|
|
@ -1,33 +0,0 @@
|
|||||||
/***************************************************************************
|
|
||||||
|
|
||||||
GLUtextureImage.h
|
|
||||||
|
|
||||||
(c) 2005-2007 Laurent Carlier <lordheavy@users.sourceforge.net>
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
||||||
MA 02110-1301, USA.
|
|
||||||
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
#ifndef __GLUTEXTUREIMAGE_H
|
|
||||||
#define __GLUTEXTUREIMAGE_H
|
|
||||||
|
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
DECLARE_METHOD(GLUBUILD1DMIPMAPS);
|
|
||||||
DECLARE_METHOD(GLUBUILD2DMIPMAPS);
|
|
||||||
|
|
||||||
#endif /* __GLUTEXTUREIMAGE_H */
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user