upgrade to nvidia Cg 2.2

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3145 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman
2009-05-03 18:46:18 +00:00
parent 86915160b7
commit 1d62782d89
21 changed files with 433 additions and 345 deletions
BIN
View File
Binary file not shown.
+169 -119
View File
@@ -1,53 +1,53 @@
/*
*
* Copyright (c) 2002-2008, NVIDIA Corporation.
*
*
*
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
* of your agreement to the following terms, and your use, installation,
* modification or redistribution of this NVIDIA software constitutes
* acceptance of these terms. If you do not agree with these terms, please do
* Copyright (c) 2002-2009, NVIDIA Corporation.
*
*
*
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
* of your agreement to the following terms, and your use, installation,
* modification or redistribution of this NVIDIA software constitutes
* acceptance of these terms. If you do not agree with these terms, please do
* not use, install, modify or redistribute this NVIDIA software.
*
*
*
* In consideration of your agreement to abide by the following terms, and
*
*
*
* In consideration of your agreement to abide by the following terms, and
* subject to these terms, NVIDIA grants you a personal, non-exclusive license,
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
* Software"), to use, reproduce, modify and redistribute the NVIDIA
* Software, with or without modifications, in source and/or binary forms;
* provided that if you redistribute the NVIDIA Software, you must retain the
* copyright notice of NVIDIA, this notice and the following text and
* disclaimers in all such redistributions of the NVIDIA Software. Neither the
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used
* to endorse or promote products derived from the NVIDIA Software without
* specific prior written permission from NVIDIA. Except as expressly stated
* in this notice, no other rights or licenses express or implied, are granted
* by NVIDIA herein, including but not limited to any patent rights that may be
* infringed by your derivative works or by other works in which the NVIDIA
* Software may be incorporated. No hardware is licensed hereunder.
*
*
*
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
* Software"), to use, reproduce, modify and redistribute the NVIDIA
* Software, with or without modifications, in source and/or binary forms;
* provided that if you redistribute the NVIDIA Software, you must retain the
* copyright notice of NVIDIA, this notice and the following text and
* disclaimers in all such redistributions of the NVIDIA Software. Neither the
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used
* to endorse or promote products derived from the NVIDIA Software without
* specific prior written permission from NVIDIA. Except as expressly stated
* in this notice, no other rights or licenses express or implied, are granted
* by NVIDIA herein, including but not limited to any patent rights that may be
* infringed by your derivative works or by other works in which the NVIDIA
* Software may be incorporated. No hardware is licensed hereunder.
*
*
*
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
* EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
*
*
*
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
* PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE,
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
*
*
*
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
* PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE,
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
*
*/
#ifndef _cg_h
@@ -57,7 +57,7 @@
/*** CG Run-Time Library API ***/
/*************************************************************************/
#define CG_VERSION_NUM 2000
#define CG_VERSION_NUM 2200
#ifdef _WIN32
# ifndef APIENTRY /* From Win32's <windef.h> */
@@ -123,25 +123,23 @@ typedef struct _CGannotation *CGannotation;
typedef void *CGhandle;
//!!! PREPROCESS BEGIN
/*!!! PREPROCESS BEGIN */
typedef enum
{
CG_UNKNOWN_TYPE,
CG_STRUCT,
CG_STRUCT,
CG_ARRAY,
CG_TYPELESS_STRUCT,
CG_TYPELESS_STRUCT,
CG_TYPE_START_ENUM = 1024,
# define CG_DATATYPE_MACRO(name, compiler_name, enum_name, base_name, ncols, nrows, pc) \
#define CG_DATATYPE_MACRO(name, compiler_name, enum_name, base_name, ncols, nrows, pc) \
enum_name ,
#include <Cg/cg_datatypes.h>
#undef CG_DATATYPE_MACRO
# undef CG_DATATYPE_MACRO
CG_TYPE_MAX
} CGtype;
typedef enum
@@ -152,8 +150,7 @@ typedef enum
#include <Cg/cg_bindlocations.h>
CG_UNDEFINED = 3256,
CG_UNDEFINED = 3256
} CGresource;
typedef enum
@@ -161,29 +158,35 @@ typedef enum
CG_PROFILE_START = 6144,
CG_PROFILE_UNKNOWN,
# define CG_PROFILE_MACRO(name, compiler_id, compiler_id_caps, compiler_opt,int_id,vertex_profile) \
CG_PROFILE_##compiler_id_caps = int_id,
#define CG_PROFILE_MACRO(name, compiler_id, compiler_id_caps, compiler_opt,int_id,vertex_profile) \
CG_PROFILE_##compiler_id_caps = int_id,
#define CG_PROFILE_ALIAS(name, compiler_id, compiler_id_caps, compiler_opt,int_id,vertex_profile) \
CG_PROFILE_MACRO(name, compiler_id, compiler_id_caps, compiler_opt,int_id,vertex_profile)
#include <Cg/cg_profiles.h>
CG_PROFILE_MAX = 7100,
CG_PROFILE_MAX = 7100
} CGprofile;
typedef enum
{
# define CG_ERROR_MACRO(code, enum_name, message) \
#define CG_ERROR_MACRO(code, enum_name, message) \
enum_name = code,
# include <Cg/cg_errors.h>
#include <Cg/cg_errors.h>
CG_ERROR_MAX
} CGerror;
typedef enum
{
# define CG_ENUM_MACRO(enum_name, enum_val) \
enum_name = enum_val,
# include <Cg/cg_enums.h>
#define CG_ENUM_MACRO(enum_name, enum_val) \
enum_name = enum_val,
#include <Cg/cg_enums.h>
CG_ENUM_MAX
} CGenum;
//!!! PREPROCESS END
/*!!! PREPROCESS END */
typedef enum
{
@@ -194,39 +197,47 @@ typedef enum
CG_PARAMETERCLASS_STRUCT,
CG_PARAMETERCLASS_ARRAY,
CG_PARAMETERCLASS_SAMPLER,
CG_PARAMETERCLASS_OBJECT
CG_PARAMETERCLASS_OBJECT,
CG_PARAMETERCLASS_MAX
} CGparameterclass;
typedef enum
{
CG_UNKNOWN_DOMAIN = 0,
CG_FIRST_DOMAIN = 1,
CG_VERTEX_DOMAIN = 1,
CG_FRAGMENT_DOMAIN,
CG_GEOMETRY_DOMAIN,
CG_NUMBER_OF_DOMAINS
CG_UNKNOWN_DOMAIN = 0,
CG_FIRST_DOMAIN = 1,
CG_VERTEX_DOMAIN = 1,
CG_FRAGMENT_DOMAIN,
CG_GEOMETRY_DOMAIN,
CG_NUMBER_OF_DOMAINS,
CG_DOMAIN_MAX
} CGdomain;
typedef enum
{
CG_MAP_READ = 0,
CG_MAP_WRITE,
CG_MAP_READ_WRITE,
CG_MAP_WRITE_DISCARD,
CG_MAP_WRITE_NO_OVERWRITE
CG_MAP_READ = 0,
CG_MAP_WRITE,
CG_MAP_READ_WRITE,
CG_MAP_WRITE_DISCARD,
CG_MAP_WRITE_NO_OVERWRITE,
CG_MAP_MAX
} CGbufferaccess;
typedef enum
{
CG_BUFFER_USAGE_STREAM_DRAW = 0,
CG_BUFFER_USAGE_STREAM_READ,
CG_BUFFER_USAGE_STREAM_COPY,
CG_BUFFER_USAGE_STATIC_DRAW,
CG_BUFFER_USAGE_STATIC_READ,
CG_BUFFER_USAGE_STATIC_COPY,
CG_BUFFER_USAGE_DYNAMIC_DRAW,
CG_BUFFER_USAGE_DYNAMIC_READ,
CG_BUFFER_USAGE_DYNAMIC_COPY
CG_BUFFER_USAGE_STREAM_DRAW = 0,
CG_BUFFER_USAGE_STREAM_READ,
CG_BUFFER_USAGE_STREAM_COPY,
CG_BUFFER_USAGE_STATIC_DRAW,
CG_BUFFER_USAGE_STATIC_READ,
CG_BUFFER_USAGE_STATIC_COPY,
CG_BUFFER_USAGE_DYNAMIC_DRAW,
CG_BUFFER_USAGE_DYNAMIC_READ,
CG_BUFFER_USAGE_DYNAMIC_COPY,
CG_BUFFER_USAGE_MAX
} CGbufferusage;
#ifdef __cplusplus
@@ -236,6 +247,7 @@ extern "C" {
typedef CGbool (CGENTRY * CGstatecallback)(CGstateassignment);
typedef void (CGENTRY * CGerrorCallbackFunc)(void);
typedef void (CGENTRY * CGerrorHandlerFunc)(CGcontext ctx, CGerror err, void *data);
typedef void (CGENTRY * CGIncludeCallbackFunc)(CGcontext ctx, const char *filename);
/*************************************************************************/
/*** Functions ***/
@@ -252,8 +264,8 @@ CG_API CGenum CGENTRY cgGetSemanticCasePolicy(void);
/*** Context functions ***/
CG_API CGcontext CGENTRY cgCreateContext(void);
CG_API void CGENTRY cgDestroyContext(CGcontext ctx);
CG_API CGcontext CGENTRY cgCreateContext(void);
CG_API void CGENTRY cgDestroyContext(CGcontext ctx);
CG_API CGbool CGENTRY cgIsContext(CGcontext ctx);
CG_API const char * CGENTRY cgGetLastListing(CGcontext ctx);
CG_API void CGENTRY cgSetLastListing(CGhandle handle, const char *listing);
@@ -262,48 +274,56 @@ CG_API CGenum CGENTRY cgGetAutoCompile(CGcontext ctx);
CG_API void CGENTRY cgSetParameterSettingMode(CGcontext ctx, CGenum parameterSettingMode);
CG_API CGenum CGENTRY cgGetParameterSettingMode(CGcontext ctx);
/*** Inclusion ***/
CG_API void CGENTRY cgSetCompilerIncludeString(CGcontext ctx, const char *name, const char *source);
CG_API void CGENTRY cgSetCompilerIncludeFile(CGcontext ctx, const char *name, const char *filename);
CG_API void CGENTRY cgSetCompilerIncludeCallback(CGcontext ctx, CGIncludeCallbackFunc func);
CG_API CGIncludeCallbackFunc CGENTRY cgGetCompilerIncludeCallback(CGcontext ctx);
/*** Program functions ***/
CG_API CGprogram CGENTRY cgCreateProgram(CGcontext ctx,
CG_API CGprogram CGENTRY cgCreateProgram(CGcontext ctx,
CGenum program_type,
const char *program,
CGprofile profile,
const char *entry,
const char **args);
CG_API CGprogram CGENTRY cgCreateProgramFromFile(CGcontext ctx,
CG_API CGprogram CGENTRY cgCreateProgramFromFile(CGcontext ctx,
CGenum program_type,
const char *program_file,
CGprofile profile,
const char *entry,
const char **args);
CG_API CGprogram CGENTRY cgCopyProgram(CGprogram program);
CG_API void CGENTRY cgDestroyProgram(CGprogram program);
CG_API CGprogram CGENTRY cgCopyProgram(CGprogram program);
CG_API void CGENTRY cgDestroyProgram(CGprogram program);
CG_API CGprogram CGENTRY cgGetFirstProgram(CGcontext ctx);
CG_API CGprogram CGENTRY cgGetNextProgram(CGprogram current);
CG_API CGcontext CGENTRY cgGetProgramContext(CGprogram prog);
CG_API CGbool CGENTRY cgIsProgram(CGprogram program);
CG_API CGbool CGENTRY cgIsProgram(CGprogram program);
CG_API void CGENTRY cgCompileProgram(CGprogram program);
CG_API CGbool CGENTRY cgIsProgramCompiled(CGprogram program);
CG_API const char * CGENTRY cgGetProgramString(CGprogram prog, CGenum pname);
CG_API CGprofile CGENTRY cgGetProgramProfile(CGprogram prog);
CG_API void CGENTRY cgCompileProgram(CGprogram program);
CG_API CGbool CGENTRY cgIsProgramCompiled(CGprogram program);
CG_API const char * CGENTRY cgGetProgramString(CGprogram prog, CGenum pname);
CG_API CGprofile CGENTRY cgGetProgramProfile(CGprogram prog);
CG_API char const * const * CGENTRY cgGetProgramOptions(CGprogram prog);
CG_API void CGENTRY cgSetProgramProfile(CGprogram prog, CGprofile profile);
CG_API CGenum CGENTRY cgGetProgramInput(CGprogram program);
CG_API CGenum CGENTRY cgGetProgramOutput(CGprogram program);
CG_API void CGENTRY cgSetPassProgramParameters(CGprogram);
CG_API void CGENTRY cgUpdateProgramParameters(CGprogram program);
CG_API void CGENTRY cgUpdatePassParameters(CGpass pass);
/*** Parameter functions ***/
CG_API CGparameter CGENTRY cgCreateParameter(CGcontext ctx, CGtype type);
CG_API CGparameter CGENTRY cgCreateParameterArray(CGcontext ctx,
CGtype type,
CGtype type,
int length);
CG_API CGparameter CGENTRY cgCreateParameterMultiDimArray(CGcontext ctx,
CGtype type,
int dim,
int dim,
const int *lengths);
CG_API void CGENTRY cgDestroyParameter(CGparameter param);
CG_API void CGENTRY cgConnectParameter(CGparameter from, CGparameter to);
@@ -314,8 +334,8 @@ CG_API int CGENTRY cgGetNumConnectedToParameters(CGparameter param);
CG_API CGparameter CGENTRY cgGetConnectedToParameter(CGparameter param, int index);
CG_API CGparameter CGENTRY cgGetNamedParameter(CGprogram prog, const char *name);
CG_API CGparameter CGENTRY cgGetNamedProgramParameter(CGprogram prog,
CGenum name_space,
CG_API CGparameter CGENTRY cgGetNamedProgramParameter(CGprogram prog,
CGenum name_space,
const char *name);
CG_API CGparameter CGENTRY cgGetFirstParameter(CGprogram prog, CGenum name_space);
@@ -324,7 +344,7 @@ CG_API CGparameter CGENTRY cgGetFirstLeafParameter(CGprogram prog, CGenum name_s
CG_API CGparameter CGENTRY cgGetNextLeafParameter(CGparameter current);
CG_API CGparameter CGENTRY cgGetFirstStructParameter(CGparameter param);
CG_API CGparameter CGENTRY cgGetNamedStructParameter(CGparameter param,
CG_API CGparameter CGENTRY cgGetNamedStructParameter(CGparameter param,
const char *name);
CG_API CGparameter CGENTRY cgGetFirstDependentParameter(CGparameter param);
@@ -355,7 +375,7 @@ CG_API CGenum CGENTRY cgGetParameterVariability(CGparameter param);
CG_API CGenum CGENTRY cgGetParameterDirection(CGparameter param);
CG_API CGbool CGENTRY cgIsParameterReferenced(CGparameter param);
CG_API CGbool CGENTRY cgIsParameterUsed(CGparameter param, CGhandle handle);
CG_API const double * CGENTRY cgGetParameterValues(CGparameter param,
CG_API const double * CGENTRY cgGetParameterValues(CGparameter param,
CGenum value_type,
int *nvalues);
CG_API void CGENTRY cgSetParameterValuedr(CGparameter param, int n, const double *vals);
@@ -370,6 +390,12 @@ CG_API int CGENTRY cgGetParameterValuefr(CGparameter param, int n, float *vals);
CG_API int CGENTRY cgGetParameterValuefc(CGparameter param, int n, float *vals);
CG_API int CGENTRY cgGetParameterValueir(CGparameter param, int n, int *vals);
CG_API int CGENTRY cgGetParameterValueic(CGparameter param, int n, int *vals);
CG_API int CGENTRY cgGetParameterDefaultValuedr(CGparameter param, int n, double *vals);
CG_API int CGENTRY cgGetParameterDefaultValuedc(CGparameter param, int n, double *vals);
CG_API int CGENTRY cgGetParameterDefaultValuefr(CGparameter param, int n, float *vals);
CG_API int CGENTRY cgGetParameterDefaultValuefc(CGparameter param, int n, float *vals);
CG_API int CGENTRY cgGetParameterDefaultValueir(CGparameter param, int n, int *vals);
CG_API int CGENTRY cgGetParameterDefaultValueic(CGparameter param, int n, int *vals);
CG_API const char * CGENTRY cgGetStringParameterValue(CGparameter param);
CG_API void CGENTRY cgSetStringParameterValue(CGparameter param, const char *str);
@@ -383,28 +409,28 @@ CG_API void CGENTRY cgSetParameterSemantic(CGparameter param, const char *semant
CG_API void CGENTRY cgSetParameter1f(CGparameter param, float x);
CG_API void CGENTRY cgSetParameter2f(CGparameter param, float x, float y);
CG_API void CGENTRY cgSetParameter3f(CGparameter param, float x, float y, float z);
CG_API void CGENTRY cgSetParameter4f(CGparameter param,
float x,
float y,
CG_API void CGENTRY cgSetParameter4f(CGparameter param,
float x,
float y,
float z,
float w);
CG_API void CGENTRY cgSetParameter1d(CGparameter param, double x);
CG_API void CGENTRY cgSetParameter2d(CGparameter param, double x, double y);
CG_API void CGENTRY cgSetParameter3d(CGparameter param,
double x,
double y,
CG_API void CGENTRY cgSetParameter3d(CGparameter param,
double x,
double y,
double z);
CG_API void CGENTRY cgSetParameter4d(CGparameter param,
double x,
double y,
CG_API void CGENTRY cgSetParameter4d(CGparameter param,
double x,
double y,
double z,
double w);
CG_API void CGENTRY cgSetParameter1i(CGparameter param, int x);
CG_API void CGENTRY cgSetParameter2i(CGparameter param, int x, int y);
CG_API void CGENTRY cgSetParameter3i(CGparameter param, int x, int y, int z);
CG_API void CGENTRY cgSetParameter4i(CGparameter param,
int x,
int y,
CG_API void CGENTRY cgSetParameter4i(CGparameter param,
int x,
int y,
int z,
int w);
@@ -435,6 +461,8 @@ CG_API void CGENTRY cgGetMatrixParameteric(CGparameter param, int *matrix);
CG_API void CGENTRY cgGetMatrixParameterdc(CGparameter param, double *matrix);
CG_API void CGENTRY cgGetMatrixParameterfc(CGparameter param, float *matrix);
CG_API CGenum CGENTRY cgGetMatrixParameterOrder(CGparameter param);
CG_API CGparameter CGENTRY cgGetNamedSubParameter(CGparameter param, const char *name);
/*** Type Functions ***/
@@ -467,6 +495,21 @@ CG_API CGenum CGENTRY cgGetEnum(const char *enum_string);
CG_API const char * CGENTRY cgGetProfileString(CGprofile profile);
CG_API CGprofile CGENTRY cgGetProfile(const char *profile_string);
CG_API int CGENTRY cgGetNumSupportedProfiles(void);
CG_API CGprofile CGENTRY cgGetSupportedProfile(int index);
CG_API CGbool CGENTRY cgIsProfileSupported(CGprofile profile);
CG_API CGbool CGENTRY cgGetProfileProperty(CGprofile profile, CGenum query);
/*** ParameterClass Functions ***/
CG_API const char * CGENTRY cgGetParameterClassString(CGparameterclass pc);
CG_API CGparameterclass CGENTRY cgGetParameterClassEnum(const char * pString);
/*** Domain Functions ***/
CG_API const char * CGENTRY cgGetDomainString(CGdomain domain);
CG_API CGdomain CGENTRY cgGetDomain(const char *domain_string);
CG_API CGdomain CGENTRY cgGetProgramDomain(CGprogram program);
/*** Error Functions ***/
@@ -489,7 +532,7 @@ CG_API const char * CGENTRY cgGetString(CGenum sname);
CG_API CGeffect CGENTRY cgCreateEffect(CGcontext, const char *code, const char **args);
CG_API CGeffect CGENTRY cgCreateEffectFromFile(CGcontext, const char *filename,
const char **args);
CG_API CGeffect CGENTRY cgCopyEffect(CGeffect effect);
CG_API CGeffect CGENTRY cgCopyEffect(CGeffect effect);
CG_API void CGENTRY cgDestroyEffect(CGeffect);
CG_API CGcontext CGENTRY cgGetEffectContext(CGeffect);
CG_API CGbool CGENTRY cgIsEffect(CGeffect effect);
@@ -515,8 +558,9 @@ CG_API CGpass CGENTRY cgGetFirstPass(CGtechnique);
CG_API CGpass CGENTRY cgGetNamedPass(CGtechnique, const char *name);
CG_API CGpass CGENTRY cgGetNextPass(CGpass);
CG_API CGbool CGENTRY cgIsPass(CGpass);
CG_API const char * CGENTRY cgGetPassName(CGpass);
CG_API const char * CGENTRY cgGetPassName(CGpass);
CG_API CGtechnique CGENTRY cgGetPassTechnique(CGpass);
CG_API CGprogram CGENTRY cgGetPassProgram(CGpass pass, CGdomain domain);
CG_API void CGENTRY cgSetPassState(CGpass);
CG_API void CGENTRY cgResetPassState(CGpass);
@@ -552,9 +596,11 @@ CG_API CGstate CGENTRY cgCreateState(CGcontext, const char *name, CGtype);
CG_API CGstate CGENTRY cgCreateArrayState(CGcontext, const char *name, CGtype, int nelems);
CG_API void CGENTRY cgSetStateCallbacks(CGstate, CGstatecallback set, CGstatecallback reset,
CGstatecallback validate);
CG_API void CGENTRY cgSetStateLatestProfile(CGstate, CGprofile);
CG_API CGstatecallback CGENTRY cgGetStateSetCallback(CGstate);
CG_API CGstatecallback CGENTRY cgGetStateResetCallback(CGstate);
CG_API CGstatecallback CGENTRY cgGetStateValidateCallback(CGstate);
CG_API CGprofile CGENTRY cgGetStateLatestProfile(CGstate);
CG_API CGcontext CGENTRY cgGetStateContext(CGstate);
CG_API CGtype CGENTRY cgGetStateType(CGstate);
CG_API const char * CGENTRY cgGetStateName(CGstate);
@@ -617,8 +663,8 @@ CG_API CGparameter CGENTRY cgCreateEffectParameter(CGeffect, const char *name, C
CG_API CGtechnique CGENTRY cgCreateTechnique(CGeffect, const char *name);
CG_API CGparameter CGENTRY cgCreateEffectParameterArray(CGeffect, const char *name, CGtype type, int length);
CG_API CGparameter CGENTRY cgCreateEffectParameterMultiDimArray(CGeffect, const char *name, CGtype type, int dim, const int *lengths);
CG_API CGparameter CGENTRY cgCreateEffectParameterArray(CGeffect, const char *name, CGtype type, int length);
CG_API CGparameter CGENTRY cgCreateEffectParameterMultiDimArray(CGeffect, const char *name, CGtype type, int dim, const int *lengths);
CG_API CGpass CGENTRY cgCreatePass(CGtechnique, const char *name);
@@ -649,6 +695,8 @@ CG_API CGbool CGENTRY cgSetFloatAnnotation(CGannotation, float value);
CG_API CGbool CGENTRY cgSetBoolAnnotation(CGannotation, CGbool value);
CG_API CGbool CGENTRY cgSetStringAnnotation(CGannotation, const char *value);
CG_API int CGENTRY cgGetNumStateEnumerants(CGstate);
CG_API const char * CGENTRY cgGetStateEnumerant(CGstate, int index, int* value);
CG_API const char * CGENTRY cgGetStateEnumerantName(CGstate, int value);
CG_API int CGENTRY cgGetStateEnumerantValue(CGstate, const char *name);
@@ -665,6 +713,7 @@ CG_API CGprogram CGENTRY cgCombinePrograms( int n, const CGprogram *exeList );
CG_API CGprogram CGENTRY cgCombinePrograms2( const CGprogram exe1, const CGprogram exe2 );
CG_API CGprogram CGENTRY cgCombinePrograms3( const CGprogram exe1, const CGprogram exe2, const CGprogram exe3 );
CG_API CGprofile CGENTRY cgGetProgramDomainProfile(CGprogram program, int index);
CG_API CGprogram CGENTRY cgGetProgramDomainProgram(CGprogram program, int index);
/*** CGobj Functions ***/
CG_API CGobj CGENTRY cgCreateObj( CGcontext context, CGenum program_type, const char *source, CGprofile profile, const char **args );
@@ -673,6 +722,7 @@ CG_API void CGENTRY cgDestroyObj( CGobj obj );
CG_API long CGENTRY cgGetParameterResourceSize(CGparameter);
CG_API CGtype CGENTRY cgGetParameterResourceType(CGparameter);
CG_API const char* CGENTRY cgGetParameterResourceName(CGparameter param);
CG_API int CGENTRY cgGetParameterBufferIndex(CGparameter);
CG_API int CGENTRY cgGetParameterBufferOffset(CGparameter);
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
/*
*
* Copyright (c) 2002-2008, NVIDIA Corporation.
* Copyright (c) 2002-2009, NVIDIA Corporation.
*
*
*
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+3 -1
View File
@@ -1,6 +1,6 @@
/*
*
* Copyright (c) 2002-2008, NVIDIA Corporation.
* Copyright (c) 2002-2009, NVIDIA Corporation.
*
*
*
@@ -140,12 +140,14 @@ CGGL_API void CGGLENTRY cgGLDisableProfile(CGprofile profile);
CGGL_API CGprofile CGGLENTRY cgGLGetLatestProfile(CGGLenum profile_type);
CGGL_API void CGGLENTRY cgGLSetOptimalOptions(CGprofile profile);
CGGL_API char const ** CGGLENTRY cgGLGetOptimalOptions(CGprofile profile);
/******************************************************************************
*** Program Managment Functions
*****************************************************************************/
CGGL_API void CGGLENTRY cgGLLoadProgram(CGprogram program);
CGGL_API void CGGLENTRY cgGLUnloadProgram(CGprogram program);
CGGL_API CGbool CGGLENTRY cgGLIsProgramLoaded(CGprogram program);
CGGL_API void CGGLENTRY cgGLBindProgram(CGprogram program);
CGGL_API void CGGLENTRY cgGLUnbindProgram(CGprofile profile);
BIN
View File
Binary file not shown.
+6 -1
View File
@@ -1,6 +1,6 @@
/*
*
* Copyright (c) 2002-2008, NVIDIA Corporation.
* Copyright (c) 2002-2009, NVIDIA Corporation.
*
*
*
@@ -60,11 +60,16 @@ CG_PROFILE_MACRO(ARBFragment,arbfp1,ARBFP1,"arbfp1",7000,0)
CG_PROFILE_MACRO(Vertex40,vp40,VP40,"vp40",7001,1)
CG_PROFILE_MACRO(GLSLVertex,glslv,GLSLV,"glslv",7007,1)
CG_PROFILE_MACRO(GLSLFragment,glslf,GLSLF,"glslf",7008,0)
CG_PROFILE_MACRO(GLSLGeometry,glslg,GLSLG,"glslg",7016,0)
CG_PROFILE_MACRO(GLSLCombined, glslc, GLSLC, "glslc", 7009, 0)
CG_PROFILE_MACRO(GPUFragment,gpu_fp,GPU_FP,"gp4fp",7010,0)
CG_PROFILE_MACRO(GPUVertex,gpu_vp,GPU_VP,"gp4vp",7011,1)
CG_PROFILE_MACRO(GPUGeometry,gpu_gp,GPU_GP,"gp4gp",7012,0)
CG_PROFILE_ALIAS(GPUFragment,gp4fp,GP4FP,"gp4fp",7010,0)
CG_PROFILE_ALIAS(GPUVertex,gp4vp,GP4VP,"gp4vp",7011,1)
CG_PROFILE_ALIAS(GPUGeometry,gp4gp,GP4GP,"gp4gp",7012,0)
#ifndef CG_IN_PROFILES_INCLUDE
# undef CG_PROFILE_MACRO
#endif
+1 -1
View File
@@ -2,7 +2,7 @@
/*
*
* Copyright (c) 2002-2008, NVIDIA Corporation.
* Copyright (c) 2002-2009, NVIDIA Corporation.
*
*
*
+1 -1
View File
@@ -1,6 +1,6 @@
/*
*
* Copyright (c) 2002-2008, NVIDIA Corporation.
* Copyright (c) 2002-2009, NVIDIA Corporation.
*
*
*
+64 -48
View File
@@ -1,57 +1,57 @@
/*
*
* Copyright (c) 2002-2008, NVIDIA Corporation.
*
*
*
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
* of your agreement to the following terms, and your use, installation,
* modification or redistribution of this NVIDIA software constitutes
* acceptance of these terms. If you do not agree with these terms, please do
* Copyright (c) 2002-2009, NVIDIA Corporation.
*
*
*
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
* of your agreement to the following terms, and your use, installation,
* modification or redistribution of this NVIDIA software constitutes
* acceptance of these terms. If you do not agree with these terms, please do
* not use, install, modify or redistribute this NVIDIA software.
*
*
*
* In consideration of your agreement to abide by the following terms, and
*
*
*
* In consideration of your agreement to abide by the following terms, and
* subject to these terms, NVIDIA grants you a personal, non-exclusive license,
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
* Software"), to use, reproduce, modify and redistribute the NVIDIA
* Software, with or without modifications, in source and/or binary forms;
* provided that if you redistribute the NVIDIA Software, you must retain the
* copyright notice of NVIDIA, this notice and the following text and
* disclaimers in all such redistributions of the NVIDIA Software. Neither the
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used
* to endorse or promote products derived from the NVIDIA Software without
* specific prior written permission from NVIDIA. Except as expressly stated
* in this notice, no other rights or licenses express or implied, are granted
* by NVIDIA herein, including but not limited to any patent rights that may be
* infringed by your derivative works or by other works in which the NVIDIA
* Software may be incorporated. No hardware is licensed hereunder.
*
*
*
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
* Software"), to use, reproduce, modify and redistribute the NVIDIA
* Software, with or without modifications, in source and/or binary forms;
* provided that if you redistribute the NVIDIA Software, you must retain the
* copyright notice of NVIDIA, this notice and the following text and
* disclaimers in all such redistributions of the NVIDIA Software. Neither the
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used
* to endorse or promote products derived from the NVIDIA Software without
* specific prior written permission from NVIDIA. Except as expressly stated
* in this notice, no other rights or licenses express or implied, are granted
* by NVIDIA herein, including but not limited to any patent rights that may be
* infringed by your derivative works or by other works in which the NVIDIA
* Software may be incorporated. No hardware is licensed hereunder.
*
*
*
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
* EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
*
*
*
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
* PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE,
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
*
*
*
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
* PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE,
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
*
*/
/*
/*
* The following macro invocations define the supported CG basic data types.
*
* The macros have the form :
@@ -60,7 +60,7 @@
*
* enum_name : The C enumerant name.
* enum_val : The enumerant value.
*
*
*/
@@ -107,6 +107,22 @@ CG_ENUM_MACRO(CG_NO_LOCKS_POLICY, 4134)
CG_ENUM_MACRO(CG_THREAD_SAFE_POLICY, 4135)
CG_ENUM_MACRO(CG_FORCE_UPPER_CASE_POLICY, 4136)
CG_ENUM_MACRO(CG_UNCHANGED_CASE_POLICY, 4137)
CG_ENUM_MACRO(CG_IS_OPENGL_PROFILE, 4138)
CG_ENUM_MACRO(CG_IS_DIRECT3D_PROFILE, 4139)
CG_ENUM_MACRO(CG_IS_DIRECT3D_8_PROFILE, 4140)
CG_ENUM_MACRO(CG_IS_DIRECT3D_9_PROFILE, 4141)
CG_ENUM_MACRO(CG_IS_DIRECT3D_10_PROFILE, 4142)
CG_ENUM_MACRO(CG_IS_VERTEX_PROFILE, 4143)
CG_ENUM_MACRO(CG_IS_FRAGMENT_PROFILE, 4144)
CG_ENUM_MACRO(CG_IS_GEOMETRY_PROFILE, 4145)
CG_ENUM_MACRO(CG_IS_TRANSLATION_PROFILE, 4146)
CG_ENUM_MACRO(CG_IS_HLSL_PROFILE, 4147)
CG_ENUM_MACRO(CG_IS_GLSL_PROFILE, 4148)
/*
if you add any enums here, you must also change
the last enum value in the definition of cgiEnumStringMap
(currently found in common/cg_enum.cpp)
*/
#undef CG_ENUM_MACRO
+129 -124
View File
@@ -1,56 +1,56 @@
/*
*
* Copyright (c) 2002-2008, NVIDIA Corporation.
*
*
*
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
* of your agreement to the following terms, and your use, installation,
* modification or redistribution of this NVIDIA software constitutes
* acceptance of these terms. If you do not agree with these terms, please do
* Copyright (c) 2002-2009, NVIDIA Corporation.
*
*
*
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
* of your agreement to the following terms, and your use, installation,
* modification or redistribution of this NVIDIA software constitutes
* acceptance of these terms. If you do not agree with these terms, please do
* not use, install, modify or redistribute this NVIDIA software.
*
*
*
* In consideration of your agreement to abide by the following terms, and
*
*
*
* In consideration of your agreement to abide by the following terms, and
* subject to these terms, NVIDIA grants you a personal, non-exclusive license,
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
* Software"), to use, reproduce, modify and redistribute the NVIDIA
* Software, with or without modifications, in source and/or binary forms;
* provided that if you redistribute the NVIDIA Software, you must retain the
* copyright notice of NVIDIA, this notice and the following text and
* disclaimers in all such redistributions of the NVIDIA Software. Neither the
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used
* to endorse or promote products derived from the NVIDIA Software without
* specific prior written permission from NVIDIA. Except as expressly stated
* in this notice, no other rights or licenses express or implied, are granted
* by NVIDIA herein, including but not limited to any patent rights that may be
* infringed by your derivative works or by other works in which the NVIDIA
* Software may be incorporated. No hardware is licensed hereunder.
*
*
*
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
* Software"), to use, reproduce, modify and redistribute the NVIDIA
* Software, with or without modifications, in source and/or binary forms;
* provided that if you redistribute the NVIDIA Software, you must retain the
* copyright notice of NVIDIA, this notice and the following text and
* disclaimers in all such redistributions of the NVIDIA Software. Neither the
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used
* to endorse or promote products derived from the NVIDIA Software without
* specific prior written permission from NVIDIA. Except as expressly stated
* in this notice, no other rights or licenses express or implied, are granted
* by NVIDIA herein, including but not limited to any patent rights that may be
* infringed by your derivative works or by other works in which the NVIDIA
* Software may be incorporated. No hardware is licensed hereunder.
*
*
*
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
* EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
*
*
*
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
* PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE,
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
*
*
*
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
* PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE,
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
*
*/
/*
* The following macro invocations define error codes returned by various cg
/*
* The following macro invocations define error codes returned by various cg
* API functions.
*
* The macros have the form :
@@ -58,175 +58,175 @@
* CG_ERROR_MACRO(code, enum_name, message)
*
* code : The integer error code associated with the error.
* enum_name : The name of enumerant of the error code in the API.
* enum_name : The name of enumerant of the error code in the API.
* message : A description string associated with the error.
*
*
*/
CG_ERROR_MACRO(0,
CG_ERROR_MACRO(0,
CG_NO_ERROR,
"No error has occurred.")
CG_ERROR_MACRO(1,
CG_COMPILER_ERROR,
CG_ERROR_MACRO(1,
CG_COMPILER_ERROR,
"The compile returned an error.")
CG_ERROR_MACRO(2,
CG_ERROR_MACRO(2,
CG_INVALID_PARAMETER_ERROR,
"The parameter used is invalid.")
CG_ERROR_MACRO(3,
CG_ERROR_MACRO(3,
CG_INVALID_PROFILE_ERROR,
"The profile is not supported.")
CG_ERROR_MACRO(4,
CG_ERROR_MACRO(4,
CG_PROGRAM_LOAD_ERROR,
"The program could not load.")
CG_ERROR_MACRO(5,
CG_PROGRAM_BIND_ERROR,
CG_ERROR_MACRO(5,
CG_PROGRAM_BIND_ERROR,
"The program could not bind.")
CG_ERROR_MACRO(6,
CG_ERROR_MACRO(6,
CG_PROGRAM_NOT_LOADED_ERROR,
"The program must be loaded before this operation may be used.")
CG_ERROR_MACRO(7,
CG_UNSUPPORTED_GL_EXTENSION_ERROR,
CG_ERROR_MACRO(7,
CG_UNSUPPORTED_GL_EXTENSION_ERROR,
"An unsupported GL extension was required to perform this operation.")
CG_ERROR_MACRO(8,
CG_INVALID_VALUE_TYPE_ERROR,
CG_ERROR_MACRO(8,
CG_INVALID_VALUE_TYPE_ERROR,
"An unknown value type was assigned to a parameter.")
CG_ERROR_MACRO(9,
CG_NOT_MATRIX_PARAM_ERROR,
CG_ERROR_MACRO(9,
CG_NOT_MATRIX_PARAM_ERROR,
"The parameter is not of matrix type.")
CG_ERROR_MACRO(10,
CG_INVALID_ENUMERANT_ERROR,
CG_ERROR_MACRO(10,
CG_INVALID_ENUMERANT_ERROR,
"The enumerant parameter has an invalid value.")
CG_ERROR_MACRO(11,
CG_NOT_4x4_MATRIX_ERROR,
CG_ERROR_MACRO(11,
CG_NOT_4x4_MATRIX_ERROR,
"The parameter must be a 4x4 matrix type.")
CG_ERROR_MACRO(12,
CG_FILE_READ_ERROR,
CG_ERROR_MACRO(12,
CG_FILE_READ_ERROR,
"The file could not be read.")
CG_ERROR_MACRO(13,
CG_FILE_WRITE_ERROR,
CG_ERROR_MACRO(13,
CG_FILE_WRITE_ERROR,
"The file could not be written.")
CG_ERROR_MACRO(14,
CG_NVPARSE_ERROR,
CG_ERROR_MACRO(14,
CG_NVPARSE_ERROR,
"nvparse could not successfully parse the output from the Cg "
"compiler backend.")
CG_ERROR_MACRO(15,
CG_MEMORY_ALLOC_ERROR,
CG_ERROR_MACRO(15,
CG_MEMORY_ALLOC_ERROR,
"Memory allocation failed.")
CG_ERROR_MACRO(16,
CG_INVALID_CONTEXT_HANDLE_ERROR,
CG_ERROR_MACRO(16,
CG_INVALID_CONTEXT_HANDLE_ERROR,
"Invalid context handle.")
CG_ERROR_MACRO(17,
CG_INVALID_PROGRAM_HANDLE_ERROR,
CG_ERROR_MACRO(17,
CG_INVALID_PROGRAM_HANDLE_ERROR,
"Invalid program handle.")
CG_ERROR_MACRO(18,
CG_INVALID_PARAM_HANDLE_ERROR,
CG_ERROR_MACRO(18,
CG_INVALID_PARAM_HANDLE_ERROR,
"Invalid parameter handle.")
CG_ERROR_MACRO(19,
CG_UNKNOWN_PROFILE_ERROR,
CG_ERROR_MACRO(19,
CG_UNKNOWN_PROFILE_ERROR,
"The specified profile is unknown.")
CG_ERROR_MACRO(20,
CG_VAR_ARG_ERROR,
CG_ERROR_MACRO(20,
CG_VAR_ARG_ERROR,
"The variable arguments were specified incorrectly.")
CG_ERROR_MACRO(21,
CG_INVALID_DIMENSION_ERROR,
CG_ERROR_MACRO(21,
CG_INVALID_DIMENSION_ERROR,
"The dimension value is invalid.")
CG_ERROR_MACRO(22,
CG_ARRAY_PARAM_ERROR,
CG_ERROR_MACRO(22,
CG_ARRAY_PARAM_ERROR,
"The parameter must be an array.")
CG_ERROR_MACRO(23,
CG_OUT_OF_ARRAY_BOUNDS_ERROR,
CG_ERROR_MACRO(23,
CG_OUT_OF_ARRAY_BOUNDS_ERROR,
"Index into the array is out of bounds.")
CG_ERROR_MACRO(24,
CG_CONFLICTING_TYPES_ERROR,
CG_ERROR_MACRO(24,
CG_CONFLICTING_TYPES_ERROR,
"A type being added to the context conflicts with an "
"existing type.")
CG_ERROR_MACRO(25,
CG_CONFLICTING_PARAMETER_TYPES_ERROR,
CG_ERROR_MACRO(25,
CG_CONFLICTING_PARAMETER_TYPES_ERROR,
"The parameters being bound have conflicting types.")
CG_ERROR_MACRO(26,
CG_PARAMETER_IS_NOT_SHARED_ERROR,
CG_ERROR_MACRO(26,
CG_PARAMETER_IS_NOT_SHARED_ERROR,
"The parameter must be global.")
CG_ERROR_MACRO(27,
CG_INVALID_PARAMETER_VARIABILITY_ERROR,
CG_ERROR_MACRO(27,
CG_INVALID_PARAMETER_VARIABILITY_ERROR,
"The parameter could not be changed to the given variability.")
CG_ERROR_MACRO(28,
CG_CANNOT_DESTROY_PARAMETER_ERROR,
CG_ERROR_MACRO(28,
CG_CANNOT_DESTROY_PARAMETER_ERROR,
"Cannot destroy the parameter. It is bound to other parameters "
"or is not a root parameter.")
CG_ERROR_MACRO(29,
CG_NOT_ROOT_PARAMETER_ERROR,
CG_ERROR_MACRO(29,
CG_NOT_ROOT_PARAMETER_ERROR,
"The parameter is not a root parameter.")
CG_ERROR_MACRO(30,
CG_PARAMETERS_DO_NOT_MATCH_ERROR,
CG_ERROR_MACRO(30,
CG_PARAMETERS_DO_NOT_MATCH_ERROR,
"The two parameters being bound do not match.")
CG_ERROR_MACRO(31,
CG_IS_NOT_PROGRAM_PARAMETER_ERROR,
CG_ERROR_MACRO(31,
CG_IS_NOT_PROGRAM_PARAMETER_ERROR,
"The parameter is not a program parameter.")
CG_ERROR_MACRO(32,
CG_INVALID_PARAMETER_TYPE_ERROR,
CG_ERROR_MACRO(32,
CG_INVALID_PARAMETER_TYPE_ERROR,
"The type of the parameter is invalid.")
CG_ERROR_MACRO(33,
CG_PARAMETER_IS_NOT_RESIZABLE_ARRAY_ERROR,
CG_ERROR_MACRO(33,
CG_PARAMETER_IS_NOT_RESIZABLE_ARRAY_ERROR,
"The parameter must be a resizable array.")
CG_ERROR_MACRO(34,
CG_INVALID_SIZE_ERROR,
CG_ERROR_MACRO(34,
CG_INVALID_SIZE_ERROR,
"The size value is invalid.")
CG_ERROR_MACRO(35,
CG_BIND_CREATES_CYCLE_ERROR,
CG_ERROR_MACRO(35,
CG_BIND_CREATES_CYCLE_ERROR,
"Cannot bind the given parameters. Binding will form a cycle.")
CG_ERROR_MACRO(36,
CG_ARRAY_TYPES_DO_NOT_MATCH_ERROR,
CG_ERROR_MACRO(36,
CG_ARRAY_TYPES_DO_NOT_MATCH_ERROR,
"Cannot bind the given parameters. Array types do not match.")
CG_ERROR_MACRO(37,
CG_ARRAY_DIMENSIONS_DO_NOT_MATCH_ERROR,
CG_ERROR_MACRO(37,
CG_ARRAY_DIMENSIONS_DO_NOT_MATCH_ERROR,
"Cannot bind the given parameters. "
"Array dimensions do not match.")
CG_ERROR_MACRO(38,
CG_ARRAY_HAS_WRONG_DIMENSION_ERROR,
CG_ERROR_MACRO(38,
CG_ARRAY_HAS_WRONG_DIMENSION_ERROR,
"The array has the wrong dimension.")
CG_ERROR_MACRO(39,
CG_TYPE_IS_NOT_DEFINED_IN_PROGRAM_ERROR,
CG_ERROR_MACRO(39,
CG_TYPE_IS_NOT_DEFINED_IN_PROGRAM_ERROR,
"Connecting the parameters failed because The type of the "
"source parameter is not defined within the given program "
"or does not match the type with the same name in the program.")
@@ -255,7 +255,8 @@ CG_ERROR_MACRO(45,
CG_INVALID_TECHNIQUE_HANDLE_ERROR,
"Invalid technique handle.")
// Do not use this! Use CG_INVALID_PARAM_HANDLE_ERROR instead.
/* Do not use this! Use CG_INVALID_PARAM_HANDLE_ERROR instead. */
CG_ERROR_MACRO(46,
CG_INVALID_PARAMETER_HANDLE_ERROR,
"Invalid parameter handle.")
@@ -316,5 +317,9 @@ CG_ERROR_MACRO(60,
CG_BUFFER_UPDATE_NOT_ALLOWED_ERROR,
"The buffer cannot be updated.")
CG_ERROR_MACRO(61,
CG_GLSLG_UNCOMBINED_LOAD_ERROR,
"The GLSL geometry program can not load without being combined with a vertex program.")
#undef CG_ERROR_MACRO
+59 -49
View File
@@ -1,60 +1,60 @@
/*
*
* Copyright (c) 2002-2008, NVIDIA Corporation.
*
*
*
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
* of your agreement to the following terms, and your use, installation,
* modification or redistribution of this NVIDIA software constitutes
* acceptance of these terms. If you do not agree with these terms, please do
* Copyright (c) 2002-2009, NVIDIA Corporation.
*
*
*
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
* of your agreement to the following terms, and your use, installation,
* modification or redistribution of this NVIDIA software constitutes
* acceptance of these terms. If you do not agree with these terms, please do
* not use, install, modify or redistribute this NVIDIA software.
*
*
*
* In consideration of your agreement to abide by the following terms, and
*
*
*
* In consideration of your agreement to abide by the following terms, and
* subject to these terms, NVIDIA grants you a personal, non-exclusive license,
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
* Software"), to use, reproduce, modify and redistribute the NVIDIA
* Software, with or without modifications, in source and/or binary forms;
* provided that if you redistribute the NVIDIA Software, you must retain the
* copyright notice of NVIDIA, this notice and the following text and
* disclaimers in all such redistributions of the NVIDIA Software. Neither the
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used
* to endorse or promote products derived from the NVIDIA Software without
* specific prior written permission from NVIDIA. Except as expressly stated
* in this notice, no other rights or licenses express or implied, are granted
* by NVIDIA herein, including but not limited to any patent rights that may be
* infringed by your derivative works or by other works in which the NVIDIA
* Software may be incorporated. No hardware is licensed hereunder.
*
*
*
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
* Software"), to use, reproduce, modify and redistribute the NVIDIA
* Software, with or without modifications, in source and/or binary forms;
* provided that if you redistribute the NVIDIA Software, you must retain the
* copyright notice of NVIDIA, this notice and the following text and
* disclaimers in all such redistributions of the NVIDIA Software. Neither the
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used
* to endorse or promote products derived from the NVIDIA Software without
* specific prior written permission from NVIDIA. Except as expressly stated
* in this notice, no other rights or licenses express or implied, are granted
* by NVIDIA herein, including but not limited to any patent rights that may be
* infringed by your derivative works or by other works in which the NVIDIA
* Software may be incorporated. No hardware is licensed hereunder.
*
*
*
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
* EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
*
*
*
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
* PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE,
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
*
*
*
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
* PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE,
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
*
*/
/*
/*
* The following macro invocations define the supported CG profiles.
*
* The macros have the form :
*
* CG_PROFILE_MACRO(name, compiler_id, compiler_opt)
* CG_PROFILE_MACRO(name, compiler_id, compiler_id_caps, compiler_opt, int_id, vertex_profile)
*
* name : The name of the profile. Used consistently with the API.
* compiler_id : The identifier string for the profile used by the compiler.
@@ -63,13 +63,18 @@
* the profile.
* int_id : Integer enumerant associated with this bind location.
* vertex_profile : Non-zero if this is a vertex profile, otherwise it
* is considered to be a fragment profile.
*
*
* is considered to be a fragment profile.
*
*
*/
#define CG_IN_PROFILES_INCLUDE
/* Used for profile enumeration aliases */
#ifndef CG_PROFILE_ALIAS
#define CG_PROFILE_ALIAS(name, compiler_id, compiler_id_caps, compiler_opt, int_id, vertex_profile) /*nothing*/
#endif
#include <Cg/cgGL_profiles.h>
@@ -89,7 +94,12 @@ CG_PROFILE_MACRO(DX9Pixel2sw,ps_2_sw,PS_2_SW,"ps_2_sw",6164,0)
CG_PROFILE_MACRO(DX9Pixel30,ps_3_0,PS_3_0,"ps_3_0",6165,0)
CG_PROFILE_MACRO(DX9PixelHLSL,hlslf,HLSLF,"hlslf",6166,0)
CG_PROFILE_MACRO(DX10Vertex40,vs_4_0,VS_4_0,"vs_4_0",6167,1)
CG_PROFILE_MACRO(DX10Pixel40,ps_4_0,PS_4_0,"ps_4_0",6168,0)
CG_PROFILE_MACRO(DX10Geometry40,gs_4_0,GS_4_0,"gs_4_0",6169,0)
CG_PROFILE_MACRO(Generic, generic, GENERIC, "generic", 7002,0)
#undef CG_PROFILE_MACRO
#undef CG_PROFILE_ALIAS
#undef CG_IN_PROFILES_INCLUDE
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.