summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2004-10-22 23:29:53 +0000
committerKenneth Russel <[email protected]>2004-10-22 23:29:53 +0000
commitcd32bbb2a9f29a598745a768a01c21a9b4dabbe1 (patch)
treecfac4c5565d608528a6a1d6e006f5fb92909d2f8
parentea9b2cf81b012e78c7da652f4b92f6067eaebfbb (diff)
Removed hacks from cg.h and cgGL.h that are no longer necessary now
that GlueGen understands typedefs more completely. Upgraded cgGL.h to Cg 1.3 beta 2 header; missed in last checkin. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@158 232f8b59-042b-4e1e-8c03-345bb8c30851
-rw-r--r--make/stub_includes/cg/CG/cg.h191
-rw-r--r--make/stub_includes/cg/CG/cgGL.h163
-rw-r--r--src/net/java/games/gluegen/JavaEmitter.java3
3 files changed, 177 insertions, 180 deletions
diff --git a/make/stub_includes/cg/CG/cg.h b/make/stub_includes/cg/CG/cg.h
index 6cb81bd48..914b090a3 100644
--- a/make/stub_includes/cg/CG/cg.h
+++ b/make/stub_includes/cg/CG/cg.h
@@ -100,15 +100,12 @@ typedef int CGbool;
#define CG_FALSE ((CGbool)0)
#define CG_TRUE ((CGbool)1)
-// typedef struct _CGcontext *CGcontext;
-// typedef struct _CGprogram *CGprogram;
-// typedef struct _CGparameter *CGparameter;
+typedef struct _CGcontext *CGcontext;
+typedef struct _CGprogram *CGprogram;
+typedef struct _CGparameter *CGparameter;
-// hack: until typedef resolution is fixed, change the typedef from *CGContext
-// to CGContext, and change all references to CGContext in functions to CGContext*
-typedef struct _CGcontext CGcontext;
-typedef struct _CGprogram CGprogram;
-typedef struct _CGparameter CGparameter;
+
+//!!! PREPROCESS BEGIN
typedef enum
{
@@ -142,7 +139,7 @@ typedef enum
#include <CG/cg_profiles.h>
- CG_PROFILE_MAX,
+ CG_PROFILE_MAX = 7100,
} CGprofile;
typedef enum
@@ -151,6 +148,8 @@ typedef enum
# include <CG/cg_errors.h>
} CGerror;
+//!!! PREPROCESS END
+
typedef enum
{
//# define CG_ENUM_MACRO(enum_name, enum_val) enum_name = enum_val,
@@ -173,137 +172,137 @@ typedef void (*CGerrorCallbackFunc)(void);
/*** Context functions ***/
-CGDLL_API /*CGcontext*/CGcontext* cgCreateContext(void);
-CGDLL_API void cgDestroyContext(/*CGcontext*/CGcontext* ctx);
-CGDLL_API CGbool cgIsContext(/*CGcontext*/CGcontext* ctx);
-CGDLL_API const char *cgGetLastListing(/*CGcontext*/CGcontext* ctx);
-CGDLL_API void cgSetAutoCompile(/*CGcontext*/CGcontext* ctx, CGenum flag);
+CGDLL_API CGcontext cgCreateContext(void);
+CGDLL_API void cgDestroyContext(CGcontext ctx);
+CGDLL_API CGbool cgIsContext(CGcontext ctx);
+CGDLL_API const char *cgGetLastListing(CGcontext ctx);
+CGDLL_API void cgSetAutoCompile(CGcontext ctx, CGenum flag);
/*** Program functions ***/
-CGDLL_API /*CGprogram*/CGprogram* cgCreateProgram(/*CGcontext*/CGcontext* ctx,
+CGDLL_API CGprogram cgCreateProgram(CGcontext ctx,
CGenum program_type,
const char *program,
CGprofile profile,
const char *entry,
const char **args);
-CGDLL_API /*CGprogram*/CGprogram* cgCreateProgramFromFile(/*CGcontext*/CGcontext* ctx,
+CGDLL_API CGprogram cgCreateProgramFromFile(CGcontext ctx,
CGenum program_type,
const char *program_file,
CGprofile profile,
const char *entry,
const char **args);
-CGDLL_API /*CGprogram*/CGprogram* cgCopyProgram(/*CGprogram*/CGprogram* program);
-CGDLL_API void cgDestroyProgram(/*CGprogram*/CGprogram* program);
+CGDLL_API CGprogram cgCopyProgram(CGprogram program);
+CGDLL_API void cgDestroyProgram(CGprogram program);
-CGDLL_API /*CGprogram*/CGprogram* cgGetFirstProgram(/*CGcontext*/CGcontext* ctx);
-CGDLL_API /*CGprogram*/CGprogram* cgGetNextProgram(/*CGprogram*/CGprogram* current);
-CGDLL_API /*CGcontext*/CGcontext* cgGetProgramContext(/*CGprogram*/CGprogram* prog);
-CGDLL_API CGbool cgIsProgram(/*CGprogram*/CGprogram* program);
+CGDLL_API CGprogram cgGetFirstProgram(CGcontext ctx);
+CGDLL_API CGprogram cgGetNextProgram(CGprogram current);
+CGDLL_API CGcontext cgGetProgramContext(CGprogram prog);
+CGDLL_API CGbool cgIsProgram(CGprogram program);
-CGDLL_API void cgCompileProgram(/*CGprogram*/CGprogram* program);
-CGDLL_API CGbool cgIsProgramCompiled(/*CGprogram*/CGprogram* program);
-CGDLL_API const char *cgGetProgramString(/*CGprogram*/CGprogram* prog, CGenum pname);
-CGDLL_API CGprofile cgGetProgramProfile(/*CGprogram*/CGprogram* prog);
+CGDLL_API void cgCompileProgram(CGprogram program);
+CGDLL_API CGbool cgIsProgramCompiled(CGprogram program);
+CGDLL_API const char *cgGetProgramString(CGprogram prog, CGenum pname);
+CGDLL_API CGprofile cgGetProgramProfile(CGprogram prog);
/*** Parameter functions ***/
-CGDLL_API /*CGparameter*/CGparameter* cgCreateParameter(/*CGcontext*/CGcontext* ctx, CGtype type);
-CGDLL_API /*CGparameter*/CGparameter* cgCreateParameterArray(/*CGcontext*/CGcontext* ctx,
+CGDLL_API CGparameter cgCreateParameter(CGcontext ctx, CGtype type);
+CGDLL_API CGparameter cgCreateParameterArray(CGcontext ctx,
CGtype type,
int length);
-CGDLL_API /*CGparameter*/CGparameter* cgCreateParameterMultiDimArray(/*CGcontext*/CGcontext* ctx,
+CGDLL_API CGparameter cgCreateParameterMultiDimArray(CGcontext ctx,
CGtype type,
int dim,
const int *lengths);
-CGDLL_API void cgDestroyParameter(/*CGparameter*/CGparameter* param);
-CGDLL_API void cgConnectParameter(/*CGparameter*/CGparameter* from, /*CGparameter*/CGparameter* to);
-CGDLL_API void cgDisconnectParameter(/*CGparameter*/CGparameter* param);
-CGDLL_API /*CGparameter*/CGparameter* cgGetConnectedParameter(/*CGparameter*/CGparameter* param);
+CGDLL_API void cgDestroyParameter(CGparameter param);
+CGDLL_API void cgConnectParameter(CGparameter from, CGparameter to);
+CGDLL_API void cgDisconnectParameter(CGparameter param);
+CGDLL_API CGparameter cgGetConnectedParameter(CGparameter param);
-CGDLL_API int cgGetNumConnectedToParameters(/*CGparameter*/CGparameter* param);
-CGDLL_API /*CGparameter*/CGparameter* cgGetConnectedToParameter(/*CGparameter*/CGparameter* param, int index);
+CGDLL_API int cgGetNumConnectedToParameters(CGparameter param);
+CGDLL_API CGparameter cgGetConnectedToParameter(CGparameter param, int index);
-CGDLL_API /*CGparameter*/CGparameter* cgGetNamedParameter(/*CGprogram*/CGprogram* prog, const char *name);
-CGDLL_API /*CGparameter*/CGparameter* cgGetNamedProgramParameter(/*CGprogram*/CGprogram* prog,
+CGDLL_API CGparameter cgGetNamedParameter(CGprogram prog, const char *name);
+CGDLL_API CGparameter cgGetNamedProgramParameter(CGprogram prog,
CGenum name_space,
const char *name);
-CGDLL_API /*CGparameter*/CGparameter* cgGetFirstParameter(/*CGprogram*/CGprogram* prog, CGenum name_space);
-CGDLL_API /*CGparameter*/CGparameter* cgGetNextParameter(/*CGparameter*/CGparameter* current);
-CGDLL_API /*CGparameter*/CGparameter* cgGetFirstLeafParameter(/*CGprogram*/CGprogram* prog, CGenum name_space);
-CGDLL_API /*CGparameter*/CGparameter* cgGetNextLeafParameter(/*CGparameter*/CGparameter* current);
+CGDLL_API CGparameter cgGetFirstParameter(CGprogram prog, CGenum name_space);
+CGDLL_API CGparameter cgGetNextParameter(CGparameter current);
+CGDLL_API CGparameter cgGetFirstLeafParameter(CGprogram prog, CGenum name_space);
+CGDLL_API CGparameter cgGetNextLeafParameter(CGparameter current);
-CGDLL_API /*CGparameter*/CGparameter* cgGetFirstStructParameter(/*CGparameter*/CGparameter* param);
-CGDLL_API /*CGparameter*/CGparameter* cgGetNamedStructParameter(/*CGparameter*/CGparameter* param,
+CGDLL_API CGparameter cgGetFirstStructParameter(CGparameter param);
+CGDLL_API CGparameter cgGetNamedStructParameter(CGparameter param,
const char *name);
-CGDLL_API /*CGparameter*/CGparameter* cgGetFirstDependentParameter(/*CGparameter*/CGparameter* param);
-
-CGDLL_API /*CGparameter*/CGparameter* cgGetArrayParameter(/*CGparameter*/CGparameter* aparam, int index);
-CGDLL_API int cgGetArrayDimension(/*CGparameter*/CGparameter* param);
-CGDLL_API CGtype cgGetArrayType(/*CGparameter*/CGparameter* param);
-CGDLL_API int cgGetArraySize(/*CGparameter*/CGparameter* param, int dimension);
-CGDLL_API void cgSetArraySize(/*CGparameter*/CGparameter* param, int size);
-CGDLL_API void cgSetMultiDimArraySize(/*CGparameter*/CGparameter* param, const int *sizes);
-
-CGDLL_API /*CGprogram*/CGprogram* cgGetParameterProgram(/*CGparameter*/CGparameter* prog);
-CGDLL_API /*CGcontext*/CGcontext* cgGetParameterContext(/*CGparameter*/CGparameter* param);
-CGDLL_API CGbool cgIsParameter(/*CGparameter*/CGparameter* param);
-CGDLL_API const char *cgGetParameterName(/*CGparameter*/CGparameter* param);
-CGDLL_API CGtype cgGetParameterType(/*CGparameter*/CGparameter* param);
-CGDLL_API CGtype cgGetParameterNamedType(/*CGparameter*/CGparameter* param);
-CGDLL_API const char *cgGetParameterSemantic(/*CGparameter*/CGparameter* param);
-CGDLL_API CGresource cgGetParameterResource(/*CGparameter*/CGparameter* param);
-CGDLL_API CGresource cgGetParameterBaseResource(/*CGparameter*/CGparameter* param);
-CGDLL_API unsigned long cgGetParameterResourceIndex(/*CGparameter*/CGparameter* param);
-CGDLL_API CGenum cgGetParameterVariability(/*CGparameter*/CGparameter* param);
-CGDLL_API CGenum cgGetParameterDirection(/*CGparameter*/CGparameter* param);
-CGDLL_API CGbool cgIsParameterReferenced(/*CGparameter*/CGparameter* param);
-CGDLL_API const double *cgGetParameterValues(/*CGparameter*/CGparameter* param,
+CGDLL_API CGparameter cgGetFirstDependentParameter(CGparameter param);
+
+CGDLL_API CGparameter cgGetArrayParameter(CGparameter aparam, int index);
+CGDLL_API int cgGetArrayDimension(CGparameter param);
+CGDLL_API CGtype cgGetArrayType(CGparameter param);
+CGDLL_API int cgGetArraySize(CGparameter param, int dimension);
+CGDLL_API void cgSetArraySize(CGparameter param, int size);
+CGDLL_API void cgSetMultiDimArraySize(CGparameter param, const int *sizes);
+
+CGDLL_API CGprogram cgGetParameterProgram(CGparameter param);
+CGDLL_API CGcontext cgGetParameterContext(CGparameter param);
+CGDLL_API CGbool cgIsParameter(CGparameter param);
+CGDLL_API const char *cgGetParameterName(CGparameter param);
+CGDLL_API CGtype cgGetParameterType(CGparameter param);
+CGDLL_API CGtype cgGetParameterNamedType(CGparameter param);
+CGDLL_API const char *cgGetParameterSemantic(CGparameter param);
+CGDLL_API CGresource cgGetParameterResource(CGparameter param);
+CGDLL_API CGresource cgGetParameterBaseResource(CGparameter param);
+CGDLL_API unsigned long cgGetParameterResourceIndex(CGparameter param);
+CGDLL_API CGenum cgGetParameterVariability(CGparameter param);
+CGDLL_API CGenum cgGetParameterDirection(CGparameter param);
+CGDLL_API CGbool cgIsParameterReferenced(CGparameter param);
+CGDLL_API const double *cgGetParameterValues(CGparameter param,
CGenum value_type,
int *nvalues);
-CGDLL_API int cgGetParameterOrdinalNumber(/*CGparameter*/CGparameter* param);
-CGDLL_API CGbool cgIsParameterGlobal(/*CGparameter*/CGparameter* param);
-CGDLL_API int cgGetParameterIndex(/*CGparameter*/CGparameter* param);
+CGDLL_API int cgGetParameterOrdinalNumber(CGparameter param);
+CGDLL_API CGbool cgIsParameterGlobal(CGparameter param);
+CGDLL_API int cgGetParameterIndex(CGparameter param);
-CGDLL_API void cgSetParameterVariability(/*CGparameter*/CGparameter* param, CGenum vary);
-CGDLL_API void cgSetParameterSemantic(/*CGparameter*/CGparameter* param, const char *semantic);
+CGDLL_API void cgSetParameterVariability(CGparameter param, CGenum vary);
+CGDLL_API void cgSetParameterSemantic(CGparameter param, const char *semantic);
-CGDLL_API void cgSetParameter1f(/*CGparameter*/CGparameter* param, float x);
-CGDLL_API void cgSetParameter2f(/*CGparameter*/CGparameter* param, float x, float y);
-CGDLL_API void cgSetParameter3f(/*CGparameter*/CGparameter* param, float x, float y, float z);
-CGDLL_API void cgSetParameter4f(/*CGparameter*/CGparameter* param,
+CGDLL_API void cgSetParameter1f(CGparameter param, float x);
+CGDLL_API void cgSetParameter2f(CGparameter param, float x, float y);
+CGDLL_API void cgSetParameter3f(CGparameter param, float x, float y, float z);
+CGDLL_API void cgSetParameter4f(CGparameter param,
float x,
float y,
float z,
float w);
-CGDLL_API void cgSetParameter1d(/*CGparameter*/CGparameter* param, double x);
-CGDLL_API void cgSetParameter2d(/*CGparameter*/CGparameter* param, double x, double y);
-CGDLL_API void cgSetParameter3d(/*CGparameter*/CGparameter* param,
+CGDLL_API void cgSetParameter1d(CGparameter param, double x);
+CGDLL_API void cgSetParameter2d(CGparameter param, double x, double y);
+CGDLL_API void cgSetParameter3d(CGparameter param,
double x,
double y,
double z);
-CGDLL_API void cgSetParameter4d(/*CGparameter*/CGparameter* param,
+CGDLL_API void cgSetParameter4d(CGparameter param,
double x,
double y,
double z,
double w);
-CGDLL_API void cgSetParameter1fv(/*CGparameter*/CGparameter* param, const float *v);
-CGDLL_API void cgSetParameter2fv(/*CGparameter*/CGparameter* param, const float *v);
-CGDLL_API void cgSetParameter3fv(/*CGparameter*/CGparameter* param, const float *v);
-CGDLL_API void cgSetParameter4fv(/*CGparameter*/CGparameter* param, const float *v);
-CGDLL_API void cgSetParameter1dv(/*CGparameter*/CGparameter* param, const double *v);
-CGDLL_API void cgSetParameter2dv(/*CGparameter*/CGparameter* param, const double *v);
-CGDLL_API void cgSetParameter3dv(/*CGparameter*/CGparameter* param, const double *v);
-CGDLL_API void cgSetParameter4dv(/*CGparameter*/CGparameter* param, const double *v);
+CGDLL_API void cgSetParameter1fv(CGparameter param, const float *v);
+CGDLL_API void cgSetParameter2fv(CGparameter param, const float *v);
+CGDLL_API void cgSetParameter3fv(CGparameter param, const float *v);
+CGDLL_API void cgSetParameter4fv(CGparameter param, const float *v);
+CGDLL_API void cgSetParameter1dv(CGparameter param, const double *v);
+CGDLL_API void cgSetParameter2dv(CGparameter param, const double *v);
+CGDLL_API void cgSetParameter3dv(CGparameter param, const double *v);
+CGDLL_API void cgSetParameter4dv(CGparameter param, const double *v);
-CGDLL_API void cgSetMatrixParameterdr(/*CGparameter*/CGparameter* param, const double *matrix);
-CGDLL_API void cgSetMatrixParameterfr(/*CGparameter*/CGparameter* param, const float *matrix);
-CGDLL_API void cgSetMatrixParameterdc(/*CGparameter*/CGparameter* param, const double *matrix);
-CGDLL_API void cgSetMatrixParameterfc(/*CGparameter*/CGparameter* param, const float *matrix);
+CGDLL_API void cgSetMatrixParameterdr(CGparameter param, const double *matrix);
+CGDLL_API void cgSetMatrixParameterfr(CGparameter param, const float *matrix);
+CGDLL_API void cgSetMatrixParameterdc(CGparameter param, const double *matrix);
+CGDLL_API void cgSetMatrixParameterfc(CGparameter param, const float *matrix);
/*** Type Functions ***/
@@ -311,10 +310,10 @@ CGDLL_API void cgSetMatrixParameterfc(/*CGparameter*/CGparameter* param, const f
CGDLL_API const char *cgGetTypeString(CGtype type);
CGDLL_API CGtype cgGetType(const char *type_string);
-CGDLL_API CGtype cgGetNamedUserType(/*CGprogram*/CGprogram* program, const char *name);
+CGDLL_API CGtype cgGetNamedUserType(CGprogram program, const char *name);
-CGDLL_API int cgGetNumUserTypes(/*CGprogram*/CGprogram* program);
-CGDLL_API CGtype cgGetUserType(/*CGprogram*/CGprogram* program, int index);
+CGDLL_API int cgGetNumUserTypes(CGprogram program);
+CGDLL_API CGtype cgGetUserType(CGprogram program, int index);
CGDLL_API int cgGetNumParentTypes(CGtype type);
CGDLL_API CGtype cgGetParentType(CGtype type, int index);
@@ -352,8 +351,8 @@ CGDLL_API const char *cgGetString(CGenum sname);
/*** Support for deprecated Cg 1.1 API ***/
-CGDLL_API /*CGparameter*/CGparameter* cgGetNextParameter_depr1_1(/*CGparameter*/CGparameter* current);
-CGDLL_API /*CGparameter*/CGparameter* cgGetNextLeafParameter_depr1_1(/*CGparameter*/CGparameter* current);
+CGDLL_API CGparameter cgGetNextParameter_depr1_1(CGparameter current);
+CGDLL_API CGparameter cgGetNextLeafParameter_depr1_1(CGparameter current);
#ifdef CG_DEPRECATED_1_1_API
diff --git a/make/stub_includes/cg/CG/cgGL.h b/make/stub_includes/cg/CG/cgGL.h
index 1af5ced5b..b16861d15 100644
--- a/make/stub_includes/cg/CG/cgGL.h
+++ b/make/stub_includes/cg/CG/cgGL.h
@@ -53,7 +53,6 @@
#define _cggl_h
-#ifndef CG_DEPRECATED_API
#include <CG/cg.h>
@@ -123,226 +122,233 @@ CGGLDLL_API void cgGLSetOptimalOptions(CGprofile profile);
*** Program Managment Functions
*****************************************************************************/
-CGGLDLL_API void cgGLLoadProgram(/*CGprogram*/CGprogram* program);
-CGGLDLL_API void cgGLBindProgram(/*CGprogram*/CGprogram* program);
+CGGLDLL_API void cgGLLoadProgram(CGprogram program);
+CGGLDLL_API CGbool cgGLIsProgramLoaded(CGprogram program);
+CGGLDLL_API void cgGLBindProgram(CGprogram program);
+CGGLDLL_API void cgGLUnbindProgram(CGprofile profile);
+CGGLDLL_API GLuint cgGLGetProgramID(CGprogram program);
/******************************************************************************
*** Parameter Managment Functions
*****************************************************************************/
-CGGLDLL_API void cgGLSetParameter1f(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLSetParameter1f(CGparameter param,
float x);
-CGGLDLL_API void cgGLSetParameter2f(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLSetParameter2f(CGparameter param,
float x,
float y);
-CGGLDLL_API void cgGLSetParameter3f(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLSetParameter3f(CGparameter param,
float x,
float y,
float z);
-CGGLDLL_API void cgGLSetParameter4f(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLSetParameter4f(CGparameter param,
float x,
float y,
float z,
float w);
-CGGLDLL_API void cgGLSetParameter1fv(/*CGparameter*/CGparameter* param, const float *v);
+CGGLDLL_API void cgGLSetParameter1fv(CGparameter param, const float *v);
-CGGLDLL_API void cgGLSetParameter2fv(/*CGparameter*/CGparameter* param, const float *v);
+CGGLDLL_API void cgGLSetParameter2fv(CGparameter param, const float *v);
-CGGLDLL_API void cgGLSetParameter3fv(/*CGparameter*/CGparameter* param, const float *v);
+CGGLDLL_API void cgGLSetParameter3fv(CGparameter param, const float *v);
-CGGLDLL_API void cgGLSetParameter4fv(/*CGparameter*/CGparameter* param, const float *v);
+CGGLDLL_API void cgGLSetParameter4fv(CGparameter param, const float *v);
-CGGLDLL_API void cgGLSetParameter1d(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLSetParameter1d(CGparameter param,
double x);
-CGGLDLL_API void cgGLSetParameter2d(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLSetParameter2d(CGparameter param,
double x,
double y);
-CGGLDLL_API void cgGLSetParameter3d(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLSetParameter3d(CGparameter param,
double x,
double y,
double z);
-CGGLDLL_API void cgGLSetParameter4d(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLSetParameter4d(CGparameter param,
double x,
double y,
double z,
double w);
-CGGLDLL_API void cgGLSetParameter1dv(/*CGparameter*/CGparameter* param, const double *v);
+CGGLDLL_API void cgGLSetParameter1dv(CGparameter param, const double *v);
-CGGLDLL_API void cgGLSetParameter2dv(/*CGparameter*/CGparameter* param, const double *v);
+CGGLDLL_API void cgGLSetParameter2dv(CGparameter param, const double *v);
-CGGLDLL_API void cgGLSetParameter3dv(/*CGparameter*/CGparameter* param, const double *v);
+CGGLDLL_API void cgGLSetParameter3dv(CGparameter param, const double *v);
-CGGLDLL_API void cgGLSetParameter4dv(/*CGparameter*/CGparameter* param, const double *v);
+CGGLDLL_API void cgGLSetParameter4dv(CGparameter param, const double *v);
-CGGLDLL_API void cgGLSetParameter4dv(/*CGparameter*/CGparameter* param, const double *v);
+CGGLDLL_API void cgGLSetParameter4dv(CGparameter param, const double *v);
-CGGLDLL_API void cgGLGetParameter1f(/*CGparameter*/CGparameter* param, float *v);
+CGGLDLL_API void cgGLGetParameter1f(CGparameter param, float *v);
-CGGLDLL_API void cgGLGetParameter2f(/*CGparameter*/CGparameter* param, float *v);
+CGGLDLL_API void cgGLGetParameter2f(CGparameter param, float *v);
-CGGLDLL_API void cgGLGetParameter3f(/*CGparameter*/CGparameter* param, float *v);
+CGGLDLL_API void cgGLGetParameter3f(CGparameter param, float *v);
-CGGLDLL_API void cgGLGetParameter4f(/*CGparameter*/CGparameter* param, float *v);
+CGGLDLL_API void cgGLGetParameter4f(CGparameter param, float *v);
-CGGLDLL_API void cgGLGetParameter1d(/*CGparameter*/CGparameter* param, double *v);
+CGGLDLL_API void cgGLGetParameter1d(CGparameter param, double *v);
-CGGLDLL_API void cgGLGetParameter2d(/*CGparameter*/CGparameter* param, double *v);
+CGGLDLL_API void cgGLGetParameter2d(CGparameter param, double *v);
-CGGLDLL_API void cgGLGetParameter3d(/*CGparameter*/CGparameter* param, double *v);
+CGGLDLL_API void cgGLGetParameter3d(CGparameter param, double *v);
-CGGLDLL_API void cgGLGetParameter4d(/*CGparameter*/CGparameter* param, double *v);
+CGGLDLL_API void cgGLGetParameter4d(CGparameter param, double *v);
-CGGLDLL_API void cgGLSetParameterArray1f(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLSetParameterArray1f(CGparameter param,
long offset,
long nelements,
const float *v);
-CGGLDLL_API void cgGLSetParameterArray2f(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLSetParameterArray2f(CGparameter param,
long offset,
long nelements,
const float *v);
-CGGLDLL_API void cgGLSetParameterArray3f(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLSetParameterArray3f(CGparameter param,
long offset,
long nelements,
const float *v);
-CGGLDLL_API void cgGLSetParameterArray4f(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLSetParameterArray4f(CGparameter param,
long offset,
long nelements,
const float *v);
-CGGLDLL_API void cgGLSetParameterArray1d(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLSetParameterArray1d(CGparameter param,
long offset,
long nelements,
const double *v);
-CGGLDLL_API void cgGLSetParameterArray2d(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLSetParameterArray2d(CGparameter param,
long offset,
long nelements,
const double *v);
-CGGLDLL_API void cgGLSetParameterArray3d(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLSetParameterArray3d(CGparameter param,
long offset,
long nelements,
const double *v);
-CGGLDLL_API void cgGLSetParameterArray4d(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLSetParameterArray4d(CGparameter param,
long offset,
long nelements,
const double *v);
-CGGLDLL_API void cgGLGetParameterArray1f(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLGetParameterArray1f(CGparameter param,
long offset,
long nelements,
float *v);
-CGGLDLL_API void cgGLGetParameterArray2f(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLGetParameterArray2f(CGparameter param,
long offset,
long nelements,
float *v);
-CGGLDLL_API void cgGLGetParameterArray3f(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLGetParameterArray3f(CGparameter param,
long offset,
long nelements,
float *v);
-CGGLDLL_API void cgGLGetParameterArray4f(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLGetParameterArray4f(CGparameter param,
long offset,
long nelements,
float *v);
-CGGLDLL_API void cgGLGetParameterArray1d(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLGetParameterArray1d(CGparameter param,
long offset,
long nelements,
double *v);
-CGGLDLL_API void cgGLGetParameterArray2d(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLGetParameterArray2d(CGparameter param,
long offset,
long nelements,
double *v);
-CGGLDLL_API void cgGLGetParameterArray3d(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLGetParameterArray3d(CGparameter param,
long offset,
long nelements,
double *v);
-CGGLDLL_API void cgGLGetParameterArray4d(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLGetParameterArray4d(CGparameter param,
long offset,
long nelements,
double *v);
-CGGLDLL_API void cgGLSetParameterPointer(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLSetParameterPointer(CGparameter param,
GLint fsize,
GLenum type,
GLsizei stride,
- GLvoid *pointer);
+ const GLvoid *pointer);
-CGGLDLL_API void cgGLEnableClientState(/*CGparameter*/CGparameter* param);
-CGGLDLL_API void cgGLDisableClientState(/*CGparameter*/CGparameter* param);
+CGGLDLL_API void cgGLEnableClientState(CGparameter param);
+CGGLDLL_API void cgGLDisableClientState(CGparameter param);
/******************************************************************************
*** Matrix Parameter Managment Functions
*****************************************************************************/
-CGGLDLL_API void cgGLSetMatrixParameterdr(/*CGparameter*/CGparameter* param, const double *matrix);
-CGGLDLL_API void cgGLSetMatrixParameterfr(/*CGparameter*/CGparameter* param, const float *matrix);
-CGGLDLL_API void cgGLSetMatrixParameterdc(/*CGparameter*/CGparameter* param, const double *matrix);
-CGGLDLL_API void cgGLSetMatrixParameterfc(/*CGparameter*/CGparameter* param, const float *matrix);
-
-CGGLDLL_API void cgGLGetMatrixParameterdr(/*CGparameter*/CGparameter* param, double *matrix);
-CGGLDLL_API void cgGLGetMatrixParameterfr(/*CGparameter*/CGparameter* param, float *matrix);
-CGGLDLL_API void cgGLGetMatrixParameterdc(/*CGparameter*/CGparameter* param, double *matrix);
-CGGLDLL_API void cgGLGetMatrixParameterfc(/*CGparameter*/CGparameter* param, float *matrix);
-
-CGGLDLL_API void cgGLSetStateMatrixParameter(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLSetMatrixParameterdr(CGparameter param,
+ const double *matrix);
+CGGLDLL_API void cgGLSetMatrixParameterfr(CGparameter param,
+ const float *matrix);
+CGGLDLL_API void cgGLSetMatrixParameterdc(CGparameter param,
+ const double *matrix);
+CGGLDLL_API void cgGLSetMatrixParameterfc(CGparameter param,
+ const float *matrix);
+
+CGGLDLL_API void cgGLGetMatrixParameterdr(CGparameter param, double *matrix);
+CGGLDLL_API void cgGLGetMatrixParameterfr(CGparameter param, float *matrix);
+CGGLDLL_API void cgGLGetMatrixParameterdc(CGparameter param, double *matrix);
+CGGLDLL_API void cgGLGetMatrixParameterfc(CGparameter param, float *matrix);
+
+CGGLDLL_API void cgGLSetStateMatrixParameter(CGparameter param,
CGGLenum matrix,
CGGLenum transform);
-CGGLDLL_API void cgGLSetMatrixParameterArrayfc(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLSetMatrixParameterArrayfc(CGparameter param,
long offset,
long nelements,
const float *matrices);
-CGGLDLL_API void cgGLSetMatrixParameterArrayfr(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLSetMatrixParameterArrayfr(CGparameter param,
long offset,
long nelements,
const float *matrices);
-CGGLDLL_API void cgGLSetMatrixParameterArraydc(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLSetMatrixParameterArraydc(CGparameter param,
long offset,
long nelements,
const double *matrices);
-CGGLDLL_API void cgGLSetMatrixParameterArraydr(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLSetMatrixParameterArraydr(CGparameter param,
long offset,
long nelements,
const double *matrices);
-CGGLDLL_API void cgGLGetMatrixParameterArrayfc(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLGetMatrixParameterArrayfc(CGparameter param,
long offset,
long nelements,
float *matrices);
-CGGLDLL_API void cgGLGetMatrixParameterArrayfr(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLGetMatrixParameterArrayfr(CGparameter param,
long offset,
long nelements,
float *matrices);
-CGGLDLL_API void cgGLGetMatrixParameterArraydc(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLGetMatrixParameterArraydc(CGparameter param,
long offset,
long nelements,
double *matrices);
-CGGLDLL_API void cgGLGetMatrixParameterArraydr(/*CGparameter*/CGparameter* param,
+CGGLDLL_API void cgGLGetMatrixParameterArraydr(CGparameter param,
long offset,
long nelements,
double *matrices);
@@ -351,11 +357,13 @@ CGGLDLL_API void cgGLGetMatrixParameterArraydr(/*CGparameter*/CGparameter* param
*** Texture Parameter Managment Functions
*****************************************************************************/
-CGGLDLL_API void cgGLSetTextureParameter(/*CGparameter*/CGparameter* param, GLuint texobj);
-CGGLDLL_API GLuint cgGLGetTextureParameter(/*CGparameter*/CGparameter* param);
-CGGLDLL_API void cgGLEnableTextureParameter(/*CGparameter*/CGparameter* param);
-CGGLDLL_API void cgGLDisableTextureParameter(/*CGparameter*/CGparameter* param);
-CGGLDLL_API GLenum cgGLGetTextureEnum(/*CGparameter*/CGparameter* param);
+CGGLDLL_API void cgGLSetTextureParameter(CGparameter param, GLuint texobj);
+CGGLDLL_API GLuint cgGLGetTextureParameter(CGparameter param);
+CGGLDLL_API void cgGLEnableTextureParameter(CGparameter param);
+CGGLDLL_API void cgGLDisableTextureParameter(CGparameter param);
+CGGLDLL_API GLenum cgGLGetTextureEnum(CGparameter param);
+CGGLDLL_API void cgGLSetManageTextureParameters(CGcontext ctx, CGbool flag);
+CGGLDLL_API CGbool cgGLGetManageTextureParameters(CGcontext ctx);
#endif
@@ -364,15 +372,4 @@ CGGLDLL_API GLenum cgGLGetTextureEnum(/*CGparameter*/CGparameter* param);
#endif
-#else
-
-#define cgGLLoadProgram cgGLDEPRECATEDAPI_LoadProgram
-#define cgGLBindProgram cgGLDEPRECATEDAPI_BindProgram
-#define cgGLEnableClientState cgGL_DEPRECATEDAPI_EnableClientState
-#define cgGLDisableClientState cgGL_DEPRECATEDAPI_DisableClientState
-
-#include <CG/cgGL_deprecated_api.h>
-
-#endif
-
#endif
diff --git a/src/net/java/games/gluegen/JavaEmitter.java b/src/net/java/games/gluegen/JavaEmitter.java
index 33a741364..00887c333 100644
--- a/src/net/java/games/gluegen/JavaEmitter.java
+++ b/src/net/java/games/gluegen/JavaEmitter.java
@@ -864,7 +864,8 @@ public class JavaEmitter implements GlueEmitter {
} else {
throw new RuntimeException(
- "Could not convert C type \"" + t + "\" to appropriate Java type; ");
+ "Could not convert C type \"" + t + "\" (class " +
+ t.getClass().getName() + ") to appropriate Java type");
}
}
}