genesis-3d engine version 1.3.
match the genesis editor version 1.3.0.653.
81
Engine/AUTHORS
Normal file
|
@ -0,0 +1,81 @@
|
|||
Genesis Engine authors
|
||||
|
||||
Lead Developer:
|
||||
Xingbo Wang
|
||||
Qi Song(Squirrel)
|
||||
|
||||
Core Developers:
|
||||
Yang Wen
|
||||
Daohuan Zhong
|
||||
Jitao Zhang
|
||||
Peng Zhao(Bohge)
|
||||
Hengjin Xu
|
||||
|
||||
Engine Developers:
|
||||
Hao Sun
|
||||
Ming Zhang
|
||||
Hang Zhao
|
||||
Yu Gu
|
||||
Yang Yang
|
||||
Yanbin Wang
|
||||
Yanqing Wang
|
||||
Baichuan Ma
|
||||
Shuai Wu
|
||||
Wensong Zhao
|
||||
Yongji Liu
|
||||
Caifeng Wang
|
||||
|
||||
Editor Developers:
|
||||
Bo Xiao
|
||||
Peng Sun
|
||||
Qingguo Yuan
|
||||
|
||||
Editor Designers:
|
||||
Si Chen
|
||||
Liran Qin
|
||||
|
||||
Technique Artists:
|
||||
Song Yang
|
||||
Jie Zhou
|
||||
|
||||
QA Team:
|
||||
Lead Tester:
|
||||
Erhua Su
|
||||
|
||||
Testers:
|
||||
Dechao Xiao
|
||||
Chuan Yang
|
||||
Yingying Sun
|
||||
Fengxia Li
|
||||
Meiwei Cai
|
||||
Qiang Wang
|
||||
Yacui Xiao
|
||||
Xiaogang Hou
|
||||
|
||||
|
||||
Specially Thanks:
|
||||
Department GM:
|
||||
Chao Jin
|
||||
Project Manager:
|
||||
Wei Wang
|
||||
Product Manager:
|
||||
Xingbo Wang
|
||||
Technique Consultant:
|
||||
genva Xie
|
||||
|
||||
|
||||
|
||||
We also thanks to every contributors who have a hand in our engine R&D procedure.
|
||||
The full list of contributors is:
|
||||
Yan Kou
|
||||
Zhenghao Guo
|
||||
Bin Li
|
||||
Zhuo Zeng
|
||||
Haijiao Xie
|
||||
|
||||
Yue Tian
|
||||
Xiaotian Wang
|
||||
|
||||
Dashan Li
|
||||
Lingling Zhang
|
||||
Chunxiao Gao
|
8
Engine/Android/GenesisLoader/Genesis/.classpath
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
|
||||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="gen"/>
|
||||
<classpathentry kind="output" path="bin/classes"/>
|
||||
</classpath>
|
116
Engine/Android/GenesisLoader/Genesis/.cproject
Normal file
|
@ -0,0 +1,116 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?>
|
||||
|
||||
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.cygwin.exe.debug.1960759598">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cygwin.exe.debug.1960759598" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.Cygwin_PE" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cygwin.exe.debug.1960759598" name="Debug" parent="cdt.managedbuild.config.gnu.cygwin.exe.debug">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.cygwin.exe.debug.1960759598." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.cygwin.exe.debug.841123097" name="Cygwin GCC" superClass="cdt.managedbuild.toolchain.gnu.cygwin.exe.debug">
|
||||
<targetPlatform id="cdt.managedbuild.target.gnu.platform.cygwin.exe.debug.104282923" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.cygwin.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/Genesis/Debug}" id="cdt.managedbuild.target.gnu.builder.cygwin.exe.debug.1119134763" managedBuildOn="true" name="Gnu Make Builder.Debug" superClass="cdt.managedbuild.target.gnu.builder.cygwin.exe.debug"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.assembler.cygwin.exe.debug.2137055709" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.cygwin.exe.debug">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.852664693" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.cygwin.base.2024673272" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.cygwin.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.exe.debug.1180057607" name="Cygwin C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.exe.debug">
|
||||
<option id="gnu.cpp.compiler.cygwin.exe.debug.option.optimization.level.2082135198" superClass="gnu.cpp.compiler.cygwin.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.cygwin.exe.debug.option.debugging.level.1568364541" superClass="gnu.cpp.compiler.cygwin.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.cygwin.1098847800" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input.cygwin"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.compiler.cygwin.exe.debug.183144934" name="Cygwin C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.cygwin.exe.debug">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.cygwin.exe.debug.option.optimization.level.792999966" superClass="gnu.c.compiler.cygwin.exe.debug.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.cygwin.exe.debug.option.debugging.level.1960368756" superClass="gnu.c.compiler.cygwin.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.cygwin.2137914064" superClass="cdt.managedbuild.tool.gnu.c.compiler.input.cygwin"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.cygwin.exe.debug.500115942" name="Cygwin C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.cygwin.exe.debug"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.cygwin.exe.debug.1608099922" name="Cygwin C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.cygwin.exe.debug">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1759581066" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.cygwin.exe.release.438672291">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cygwin.exe.release.438672291" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.Cygwin_PE" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cygwin.exe.release.438672291" name="Release" parent="cdt.managedbuild.config.gnu.cygwin.exe.release">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.cygwin.exe.release.438672291." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.cygwin.exe.release.376268997" name="Cygwin GCC" superClass="cdt.managedbuild.toolchain.gnu.cygwin.exe.release">
|
||||
<targetPlatform id="cdt.managedbuild.target.gnu.platform.cygwin.exe.release.556488935" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.cygwin.exe.release"/>
|
||||
<builder buildPath="${workspace_loc:/Genesis/Release}" id="cdt.managedbuild.target.gnu.builder.cygwin.exe.release.80134260" managedBuildOn="true" name="Gnu Make Builder.Release" superClass="cdt.managedbuild.target.gnu.builder.cygwin.exe.release"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.assembler.cygwin.exe.release.724031019" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.cygwin.exe.release">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.451583272" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.cygwin.base.1588991199" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.cygwin.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.exe.release.455421757" name="Cygwin C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.exe.release">
|
||||
<option id="gnu.cpp.compiler.cygwin.exe.release.option.optimization.level.1003589285" superClass="gnu.cpp.compiler.cygwin.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.cygwin.exe.release.option.debugging.level.974443285" superClass="gnu.cpp.compiler.cygwin.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.cygwin.81725125" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input.cygwin"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.compiler.cygwin.exe.release.1152461317" name="Cygwin C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.cygwin.exe.release">
|
||||
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.cygwin.exe.release.option.optimization.level.869826551" superClass="gnu.c.compiler.cygwin.exe.release.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.cygwin.exe.release.option.debugging.level.2124277366" superClass="gnu.c.compiler.cygwin.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.cygwin.809658670" superClass="cdt.managedbuild.tool.gnu.c.compiler.input.cygwin"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.cygwin.exe.release.1493431369" name="Cygwin C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.cygwin.exe.release"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.cygwin.exe.release.837598217" name="Cygwin C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.cygwin.exe.release">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.984630155" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="Genesis.cdt.managedbuild.target.gnu.cygwin.exe.2125571614" name="Executable" projectType="cdt.managedbuild.target.gnu.cygwin.exe"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cygwin.exe.debug.1960759598;cdt.managedbuild.config.gnu.cygwin.exe.debug.1960759598.;cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.exe.debug.1180057607;cdt.managedbuild.tool.gnu.cpp.compiler.input.cygwin.1098847800">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cygwin.exe.release.438672291;cdt.managedbuild.config.gnu.cygwin.exe.release.438672291.;cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.exe.release.455421757;cdt.managedbuild.tool.gnu.cpp.compiler.input.cygwin.81725125">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cygwin.exe.release.438672291;cdt.managedbuild.config.gnu.cygwin.exe.release.438672291.;cdt.managedbuild.tool.gnu.c.compiler.cygwin.exe.release.1152461317;cdt.managedbuild.tool.gnu.c.compiler.input.cygwin.809658670">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cygwin.exe.debug.1960759598;cdt.managedbuild.config.gnu.cygwin.exe.debug.1960759598.;cdt.managedbuild.tool.gnu.c.compiler.cygwin.exe.debug.183144934;cdt.managedbuild.tool.gnu.c.compiler.input.cygwin.2137914064">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC"/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.pathentry"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
</cproject>
|
49
Engine/Android/GenesisLoader/Genesis/.project
Normal file
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>Genesis</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
29
Engine/Android/GenesisLoader/Genesis/AndroidManifest.xml
Normal file
|
@ -0,0 +1,29 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.genesis"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0" >
|
||||
<original-package />
|
||||
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
|
||||
|
||||
<uses-sdk android:minSdkVersion="8"/>
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme" >
|
||||
plication android:icon="@drawable/icon" android:label="@string/app_name">
|
||||
|
||||
<activity android:name=".Genesis"
|
||||
android:label="genesis"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
|
||||
android:configChanges="orientation">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
8
Engine/Android/GenesisLoader/Genesis/assets/Config.ini
Normal file
|
@ -0,0 +1,8 @@
|
|||
[webjet]
|
||||
assetname="asdasd"
|
||||
scenename="asset:test_shader.scene"
|
||||
gamedir="/test_shader"
|
||||
packagename="com.genesis"
|
||||
remotepath=""
|
||||
usePrecompilerShader="true"
|
||||
|
29
Engine/Android/GenesisLoader/Genesis/bin/AndroidManifest.xml
Normal file
|
@ -0,0 +1,29 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.genesis"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0" >
|
||||
<original-package />
|
||||
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
|
||||
|
||||
<uses-sdk android:minSdkVersion="8"/>
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme" >
|
||||
plication android:icon="@drawable/icon" android:label="@string/app_name">
|
||||
|
||||
<activity android:name=".Genesis"
|
||||
android:label="genesis"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
|
||||
android:configChanges="orientation">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
BIN
Engine/Android/GenesisLoader/Genesis/bin/Genesis.apk
Normal file
BIN
Engine/Android/GenesisLoader/Genesis/bin/classes.dex
Normal file
3
Engine/Android/GenesisLoader/Genesis/bin/jarlist.cache
Normal file
|
@ -0,0 +1,3 @@
|
|||
# cache for current jar dependecy. DO NOT EDIT.
|
||||
# format is <lastModified> <length> <SHA-1> <path>
|
||||
# Encoding is UTF-8
|
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 14 KiB |
BIN
Engine/Android/GenesisLoader/Genesis/bin/resources.ap_
Normal file
|
@ -0,0 +1,2 @@
|
|||
set curDir=%cd%
|
||||
xcopy %curDir% %curDir%\\..\\..\\..\\..\\..\\genesis_editor\\bin\\win32\\editorasset\\Build\\Loader\\proj.android /s /e /y
|
|
@ -0,0 +1,6 @@
|
|||
/** Automatically generated file. DO NOT MODIFY */
|
||||
package com.genesis;
|
||||
|
||||
public final class BuildConfig {
|
||||
public final static boolean DEBUG = true;
|
||||
}
|
37
Engine/Android/GenesisLoader/Genesis/gen/com/genesis/R.java
Normal file
|
@ -0,0 +1,37 @@
|
|||
/* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*
|
||||
* This class was automatically generated by the
|
||||
* aapt tool from the resource data it found. It
|
||||
* should not be modified by hand.
|
||||
*/
|
||||
|
||||
package com.genesis;
|
||||
|
||||
public final class R {
|
||||
public static final class attr {
|
||||
}
|
||||
public static final class drawable {
|
||||
public static final int ic_launcher=0x7f020000;
|
||||
public static final int load=0x7f020001;
|
||||
}
|
||||
public static final class string {
|
||||
public static final int app_name=0x7f030000;
|
||||
}
|
||||
public static final class style {
|
||||
/**
|
||||
Base application theme, dependent on API level. This theme is replaced
|
||||
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
|
||||
|
||||
|
||||
Theme customizations available in newer API levels can go in
|
||||
res/values-vXX/styles.xml, while customizations related to
|
||||
backward-compatibility can go here.
|
||||
|
||||
*/
|
||||
public static final int AppBaseTheme=0x7f040000;
|
||||
/** Application theme.
|
||||
All customizations that are NOT specific to a particular API-level can go here.
|
||||
*/
|
||||
public static final int AppTheme=0x7f040001;
|
||||
}
|
||||
}
|
BIN
Engine/Android/GenesisLoader/Genesis/libs/android-support-v4.jar
Normal file
20
Engine/Android/GenesisLoader/Genesis/proguard-project.txt
Normal file
|
@ -0,0 +1,20 @@
|
|||
# To enable ProGuard in your project, edit project.properties
|
||||
# to define the proguard.config property as described in that file.
|
||||
#
|
||||
# Add project specific ProGuard rules here.
|
||||
# By default, the flags in this file are appended to flags specified
|
||||
# in ${sdk.dir}/tools/proguard/proguard-android.txt
|
||||
# You can edit the include path and order by changing the ProGuard
|
||||
# include property in project.properties.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# Add any project specific keep options here:
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
14
Engine/Android/GenesisLoader/Genesis/project.properties
Normal file
|
@ -0,0 +1,14 @@
|
|||
# This file is automatically generated by Android Tools.
|
||||
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
|
||||
#
|
||||
# This file must be checked in Version Control Systems.
|
||||
#
|
||||
# To customize properties used by the Ant build system edit
|
||||
# "ant.properties", and override values to adapt the script to your
|
||||
# project structure.
|
||||
#
|
||||
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
|
||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||
|
||||
# Project target.
|
||||
target=android-8
|
After Width: | Height: | Size: 9.2 KiB |
BIN
Engine/Android/GenesisLoader/Genesis/res/drawable-hdpi/load.png
Normal file
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,5 @@
|
|||
<resources>
|
||||
|
||||
<string name="app_name">Genesis</string>
|
||||
|
||||
</resources>
|
20
Engine/Android/GenesisLoader/Genesis/res/values/styles.xml
Normal file
|
@ -0,0 +1,20 @@
|
|||
<resources>
|
||||
|
||||
<!--
|
||||
Base application theme, dependent on API level. This theme is replaced
|
||||
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
|
||||
-->
|
||||
<style name="AppBaseTheme" parent="android:Theme.Light">
|
||||
<!--
|
||||
Theme customizations available in newer API levels can go in
|
||||
res/values-vXX/styles.xml, while customizations related to
|
||||
backward-compatibility can go here.
|
||||
-->
|
||||
</style>
|
||||
|
||||
<!-- Application theme. -->
|
||||
<style name="AppTheme" parent="AppBaseTheme">
|
||||
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
|
||||
</style>
|
||||
|
||||
</resources>
|
|
@ -0,0 +1,60 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2006, Radon Labs GmbH
|
||||
Copyright (c) 2011-2013,WebJet Business Division,CYOU
|
||||
|
||||
http://www.genesis-3d.com.cn
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
package com.genesis;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.genesis.lib.GenesisActivity;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
||||
/**
|
||||
* An example full-screen activity that shows and hides the system UI (i.e.
|
||||
* status bar and navigation/system bar) with user interaction.
|
||||
*
|
||||
* @see SystemUiHider
|
||||
*/
|
||||
public class Genesis extends GenesisActivity {
|
||||
|
||||
protected void onCreate(Bundle savedInstanceState){
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
protected void onDestroy()
|
||||
{
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
static
|
||||
{
|
||||
System.loadLibrary("GenesisA");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package org.genesis.lib;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Application;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
|
||||
public class ExitAct extends Application {
|
||||
private static List mList = new LinkedList();
|
||||
private static ExitAct instance;
|
||||
|
||||
// add Activity
|
||||
public static void addActivity(Activity activity) {
|
||||
mList.add(activity);
|
||||
}
|
||||
|
||||
public static void exit() {
|
||||
try {
|
||||
for (int i = 0;i< mList.size();i++) {
|
||||
Activity activity = (Activity) mList.get(i);
|
||||
if (activity != null)
|
||||
activity.finish();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
android.os.Process.killProcess(android.os.Process.myPid());
|
||||
}
|
||||
}
|
||||
|
||||
public void onLowMemory() {
|
||||
super.onLowMemory();
|
||||
System.gc();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,137 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2006, Radon Labs GmbH
|
||||
Copyright (c) 2011-2013,WebJet Business Division,CYOU
|
||||
|
||||
http://www.genesis-3d.com.cn
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
package org.genesis.lib;
|
||||
|
||||
import org.genesis.lib.GenesisGLSurfaceView;
|
||||
import org.genesis.lib.GenesisHelperListener;
|
||||
|
||||
import com.genesis.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.graphics.drawable.PaintDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
public abstract class GenesisActivity extends Activity implements GenesisHelperListener {
|
||||
// ===========================================================
|
||||
// Constants
|
||||
// ===========================================================
|
||||
private static final String TAG = GenesisActivity.class.getSimpleName();
|
||||
// ===========================================================
|
||||
private GenesisGLSurfaceView mGLSurefaceView;
|
||||
|
||||
public GenesisGLSurfaceView GetSurfaceView()
|
||||
{
|
||||
return mGLSurefaceView;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(final Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
ExitAct.addActivity(this);
|
||||
this.init();
|
||||
}
|
||||
|
||||
// ===========================================================
|
||||
// Getter & Setter
|
||||
// ===========================================================
|
||||
|
||||
// ===========================================================
|
||||
// Methods for/from SuperClass/Interfaces
|
||||
// ===========================================================
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
||||
|
||||
this.mGLSurefaceView.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
|
||||
|
||||
this.mGLSurefaceView.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop()
|
||||
{
|
||||
super.onStop();
|
||||
|
||||
this.mGLSurefaceView.onStop();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onDestroy()
|
||||
{
|
||||
super.onDestroy();
|
||||
this.mGLSurefaceView.onDestroy();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void showDialog(final String pTitle, final String pMessage) {
|
||||
Message msg = new Message();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showEditTextDialog(final String pTitle, final String pContent, final int pInputMode, final int pInputFlag, final int pReturnType, final int pMaxLength) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void runOnGLThread(final Runnable pRunnable) {
|
||||
this.mGLSurefaceView.queueEvent(pRunnable);
|
||||
}
|
||||
public void init() {
|
||||
|
||||
// FrameLayout
|
||||
ViewGroup.LayoutParams framelayout_params =
|
||||
new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,
|
||||
ViewGroup.LayoutParams.FILL_PARENT);
|
||||
FrameLayout framelayout = new FrameLayout(this);
|
||||
framelayout.setLayoutParams(framelayout_params);
|
||||
|
||||
// Cocos2dxGLSurfaceView
|
||||
this.mGLSurefaceView = new GenesisGLSurfaceView(this);
|
||||
|
||||
// ...add to FrameLayout
|
||||
framelayout.addView(mGLSurefaceView);
|
||||
mGLSurefaceView.setBackgroundResource(R.drawable.load);
|
||||
|
||||
mGLSurefaceView.setGenesisRenderer(new GenesisRenderer(this));
|
||||
|
||||
// Set framelayout as the content view
|
||||
setContentView(framelayout);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,798 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2006, Radon Labs GmbH
|
||||
Copyright (c) 2011-2013,WebJet Business Division,CYOU
|
||||
|
||||
http://www.genesis-3d.com.cn
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
package org.genesis.lib;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import javax.microedition.khronos.egl.EGL10;
|
||||
import javax.microedition.khronos.egl.EGLConfig;
|
||||
import javax.microedition.khronos.egl.EGLContext;
|
||||
import javax.microedition.khronos.egl.EGLDisplay;
|
||||
|
||||
|
||||
import org.genesis.lib.GenesisRenderer;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.AssetManager;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.opengl.GLSurfaceView;
|
||||
import android.os.Environment;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.os.StatFs;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
|
||||
public class GenesisGLSurfaceView extends GLSurfaceView {
|
||||
private final static int HANDLER_OPEN_IME_KEYBOARD = 2;
|
||||
private final static int HANDLER_CLOSE_IME_KEYBOARD = 3;
|
||||
private static final String TAG = GenesisGLSurfaceView.class.getSimpleName();
|
||||
|
||||
private static Handler sHandler;
|
||||
private GenesisActivity mActivity;
|
||||
private static GenesisGLSurfaceView mGenesisGLSurfaceView;
|
||||
|
||||
private String gamedir;
|
||||
private String scenename;
|
||||
private String packagename;
|
||||
private String apklocation;
|
||||
private float resourceSize;
|
||||
private int storageType;
|
||||
private float density;
|
||||
private boolean usePrecompilerShader;
|
||||
|
||||
private GenesisRenderer mGenesisRenderer;
|
||||
|
||||
private ContextFactory mContextFactory;
|
||||
|
||||
private AssetManager mMgr;
|
||||
private void GetStorageType(final Context context)
|
||||
{
|
||||
String sgamedir = gamedir;
|
||||
sgamedir = "sdcard/"+sgamedir;
|
||||
int n = sgamedir.indexOf("/");
|
||||
String path = sgamedir.substring(n+1);
|
||||
path = Environment.getExternalStorageDirectory().getAbsolutePath()+File.separator+path;
|
||||
File desDir = new File(path);
|
||||
|
||||
if(desDir.exists())
|
||||
{
|
||||
storageType = 2;
|
||||
return;
|
||||
}
|
||||
|
||||
sgamedir = gamedir;
|
||||
sgamedir = "data/data/"+packagename+File.separator+gamedir;
|
||||
n = sgamedir.indexOf("/");
|
||||
path = sgamedir.substring(n+1);
|
||||
path = Environment.getExternalStorageDirectory().getAbsolutePath()+File.separator+path;
|
||||
desDir = new File(path);
|
||||
|
||||
if(desDir.exists())
|
||||
{
|
||||
storageType = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
File sddata = Environment.getExternalStorageDirectory();
|
||||
float sdcardSize = GetAvailableSize(sddata);
|
||||
|
||||
File data = Environment.getDataDirectory();
|
||||
float dataSize = GetAvailableSize(data);
|
||||
|
||||
String apkpath = context.getPackageResourcePath();
|
||||
File apk = new File(apkpath);
|
||||
resourceSize = apk.length()/(1024*1024)*2;
|
||||
storageType = 2;
|
||||
if(sdcardSize<resourceSize)
|
||||
{
|
||||
storageType = 1;
|
||||
return;
|
||||
}
|
||||
if(dataSize<resourceSize)
|
||||
{
|
||||
storageType = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private float GetAvailableSize(File data)
|
||||
{
|
||||
StatFs sf = new StatFs(data.getPath());
|
||||
int availableBlocks = sf.getAvailableBlocks();
|
||||
|
||||
int size = sf.getBlockSize();
|
||||
|
||||
int availableSize = availableBlocks * size;
|
||||
|
||||
return availableSize/(1024*1024);
|
||||
}
|
||||
|
||||
private void copyAllResFiles(final Context context,String Data,String Dest)
|
||||
{
|
||||
Log.d( "copy", "copy start");
|
||||
AssetManager assmgr = context.getAssets();
|
||||
|
||||
String[] files;
|
||||
try {
|
||||
files = assmgr.list(Data);
|
||||
|
||||
for(int i = 0;i<files.length;i++)
|
||||
{
|
||||
files[i] = Data+File.separator+files[i];
|
||||
|
||||
|
||||
int index = files[i].lastIndexOf(".");
|
||||
if(index>1)
|
||||
{
|
||||
copyAssetFile(context,files[i],Dest);
|
||||
}
|
||||
else
|
||||
{
|
||||
copyAllResFiles(context,files[i],Dest);
|
||||
}
|
||||
|
||||
}
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
Log.d( "copy", "copy end");
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void copyAssetFile(final Context context,String assetName, String target)
|
||||
{
|
||||
try
|
||||
{
|
||||
int removeFrist = assetName.indexOf("/");
|
||||
String myassetName = assetName.substring(removeFrist);
|
||||
String desFileName = target+myassetName;
|
||||
int desFileDirStart = desFileName.lastIndexOf("/");
|
||||
String desFileDir = desFileName.substring(0,desFileDirStart);
|
||||
File desDir = new File(desFileDir);
|
||||
if(!desDir.exists())
|
||||
{
|
||||
if(!desDir.mkdirs())
|
||||
{
|
||||
Log.d( "mkdirsfailed", desFileDir);
|
||||
}
|
||||
}
|
||||
|
||||
InputStream in = context.getAssets().open(assetName);
|
||||
File desFile = new File(desFileName);
|
||||
if(!desFile.exists())
|
||||
{
|
||||
desFile.createNewFile();
|
||||
}
|
||||
|
||||
FileOutputStream stream = new FileOutputStream(desFile);
|
||||
DataOutputStream fos = new DataOutputStream(stream);
|
||||
|
||||
byte[] buff = new byte[4096];
|
||||
int n = in.read(buff);
|
||||
|
||||
while(n>0)
|
||||
{
|
||||
fos.write(buff,0,n);
|
||||
n = in.read(buff);
|
||||
}
|
||||
fos.close();
|
||||
in.close();
|
||||
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
|
||||
Log.d( "copy", e.getMessage());
|
||||
Log.d( "copy", e.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private String RemoveQuat(String str)
|
||||
{
|
||||
if(str.startsWith("\""))
|
||||
{
|
||||
int length = str.length();
|
||||
String out = str.substring(1, length-1);
|
||||
return out;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
private void ReadConfig(final Context context)
|
||||
{
|
||||
try {
|
||||
|
||||
gamedir = "sdcard/Sharp/";
|
||||
scenename = "asset:scene/Sharp.scene";
|
||||
InputStream is = context.getAssets().open("Config.ini");
|
||||
int count = is.available();
|
||||
byte buffer[] = new byte[count];
|
||||
is.read(buffer);
|
||||
String strConfig = new String(buffer);
|
||||
String[] strsCFG = strConfig.split("\r\n");
|
||||
|
||||
if( strsCFG[0].compareTo("[webjet]") != 0)
|
||||
{
|
||||
Log.d( "read config", "config file error!");
|
||||
}
|
||||
else
|
||||
{
|
||||
for(int i = 1 ;i<strsCFG.length ;i++)
|
||||
{
|
||||
String[] valuePair = strsCFG[i].split("=");
|
||||
if(valuePair[0].compareTo("gamedir")==0)
|
||||
{
|
||||
gamedir = valuePair[1];
|
||||
gamedir = RemoveQuat(gamedir);
|
||||
}
|
||||
else if(valuePair[0].compareTo("scenename")==0)
|
||||
{
|
||||
scenename = valuePair[1];
|
||||
scenename = RemoveQuat(scenename);
|
||||
}
|
||||
else if(valuePair[0].compareTo("packagename")==0)
|
||||
{
|
||||
packagename = valuePair[1];
|
||||
packagename = RemoveQuat(packagename);
|
||||
}
|
||||
else if(valuePair[0].compareTo("usePrecompilerShader")==0)
|
||||
{
|
||||
String tmpStr;
|
||||
tmpStr = valuePair[1];
|
||||
tmpStr = RemoveQuat(tmpStr);
|
||||
if(tmpStr.compareTo("true")==0)
|
||||
{
|
||||
usePrecompilerShader = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
usePrecompilerShader = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
Log.d( "read config", "config exception!");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
||||
this.queueEvent(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
GenesisGLSurfaceView.this.mGenesisRenderer.handleOnResume();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
this.queueEvent(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
GenesisGLSurfaceView.this.mGenesisRenderer.handleOnPause();
|
||||
}
|
||||
});
|
||||
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
public void onStop()
|
||||
{
|
||||
this.queueEvent(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
GenesisGLSurfaceView.this.mGenesisRenderer.handleOnStop();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void onDestroy()
|
||||
{
|
||||
this.queueEvent(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
// TODO Auto-generated method stub
|
||||
GenesisGLSurfaceView.this.mGenesisRenderer.handleOnDestroy();
|
||||
}
|
||||
});
|
||||
}
|
||||
public void setGenesisRenderer(final GenesisRenderer renderer) {
|
||||
this.mGenesisRenderer = renderer;
|
||||
this.setRenderer(this.mGenesisRenderer);
|
||||
mGenesisRenderer.SetGenesisGLSurfaceView(this);
|
||||
}
|
||||
|
||||
public GenesisGLSurfaceView(Context context) {
|
||||
super(context);
|
||||
|
||||
mMgr = context.getAssets();
|
||||
this.setEGLContextClientVersion(2);
|
||||
|
||||
this.getHolder().setFormat(PixelFormat.TRANSLUCENT);
|
||||
|
||||
mContextFactory = new ContextFactory();
|
||||
setEGLContextFactory(mContextFactory);
|
||||
|
||||
setEGLConfigChooser(
|
||||
new ConfigChooser(8, 8, 8, 8, 16, 8) );
|
||||
|
||||
int OsVersion = android.os.Build.VERSION.SDK_INT;
|
||||
|
||||
if (OsVersion >= 11)
|
||||
{
|
||||
//this.setPreserveEGLContextOnPause(true);
|
||||
}
|
||||
|
||||
this.initView();
|
||||
apklocation = context.getPackageResourcePath();
|
||||
this.usePrecompilerShader = true;
|
||||
ReadConfig(context);
|
||||
storageType=0;
|
||||
|
||||
if(storageType==2)
|
||||
{
|
||||
gamedir = "sdcard/"+gamedir;
|
||||
}
|
||||
else if(storageType==1)
|
||||
{
|
||||
gamedir = "data/data/"+packagename+File.separator+gamedir;
|
||||
}
|
||||
else if(storageType==0)
|
||||
{
|
||||
gamedir = apklocation+"/assets/Data";
|
||||
|
||||
String path = "data/data/"+packagename;
|
||||
String spath = path+"Data/Script";
|
||||
File cdesDir = new File(spath);
|
||||
File desDir = new File(path);
|
||||
if(!cdesDir.exists())
|
||||
{
|
||||
copyAllResFiles(context,"Data/Script",desDir.getAbsolutePath());
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
if(storageType==2)
|
||||
{
|
||||
int n = gamedir.indexOf("/");
|
||||
String path = gamedir.substring(n+1);
|
||||
path = Environment.getExternalStorageDirectory().getAbsolutePath()+File.separator+path;
|
||||
File desDir = new File(path);
|
||||
|
||||
if(!desDir.exists())
|
||||
{
|
||||
copyAllResFiles(context,"Data",desDir.getAbsolutePath());
|
||||
}
|
||||
gamedir = gamedir;
|
||||
}
|
||||
else if(storageType==1)
|
||||
{
|
||||
int n = gamedir.indexOf("/");
|
||||
String path = gamedir.substring(n+1);
|
||||
path = Environment.getDataDirectory().getAbsolutePath()+File.separator+path;
|
||||
File desDir = new File(path);
|
||||
|
||||
if(!desDir.exists())
|
||||
{
|
||||
copyAllResFiles(context,"Data",desDir.getAbsolutePath());
|
||||
}
|
||||
gamedir = gamedir;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
protected void initView() {
|
||||
this.setFocusableInTouchMode(true);
|
||||
|
||||
GenesisGLSurfaceView.mGenesisGLSurfaceView = this;
|
||||
|
||||
GenesisGLSurfaceView.sHandler = new Handler() {
|
||||
@Override
|
||||
public void handleMessage(final Message msg) {
|
||||
switch (msg.what) {
|
||||
case HANDLER_OPEN_IME_KEYBOARD:
|
||||
|
||||
break;
|
||||
|
||||
case HANDLER_CLOSE_IME_KEYBOARD:
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(final MotionEvent pMotionEvent) {
|
||||
// these data are used in ACTION_MOVE and ACTION_CANCEL
|
||||
final int pointerNumber = pMotionEvent.getPointerCount();
|
||||
final int[] ids = new int[pointerNumber];
|
||||
final float[] xs = new float[pointerNumber];
|
||||
final float[] ys = new float[pointerNumber];
|
||||
|
||||
for (int i = 0; i < pointerNumber; i++) {
|
||||
ids[i] = pMotionEvent.getPointerId(i);
|
||||
xs[i] = pMotionEvent.getX(i);
|
||||
ys[i] = pMotionEvent.getY(i);
|
||||
}
|
||||
|
||||
switch (pMotionEvent.getAction() & MotionEvent.ACTION_MASK) {
|
||||
case MotionEvent.ACTION_POINTER_DOWN:
|
||||
final int indexPointerDown = pMotionEvent.getAction() >> MotionEvent.ACTION_POINTER_ID_SHIFT;
|
||||
final int idPointerDown = pMotionEvent.getPointerId(indexPointerDown);
|
||||
final float xPointerDown = pMotionEvent.getX(indexPointerDown);
|
||||
final float yPointerDown = pMotionEvent.getY(indexPointerDown);
|
||||
|
||||
this.queueEvent(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
GenesisGLSurfaceView.this.mGenesisRenderer.handleActionDown(idPointerDown, xPointerDown, yPointerDown);
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
// there are only one finger on the screen
|
||||
final int idDown = pMotionEvent.getPointerId(0);
|
||||
final float xDown = xs[0];
|
||||
final float yDown = ys[0];
|
||||
|
||||
this.queueEvent(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
GenesisGLSurfaceView.this.mGenesisRenderer.handleActionDown(idDown, xDown, yDown);
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
this.queueEvent(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
GenesisGLSurfaceView.this.mGenesisRenderer.handleActionMove(ids, xs, ys);
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
||||
case MotionEvent.ACTION_POINTER_UP:
|
||||
final int indexPointUp = pMotionEvent.getAction() >> MotionEvent.ACTION_POINTER_ID_SHIFT;
|
||||
final int idPointerUp = pMotionEvent.getPointerId(indexPointUp);
|
||||
final float xPointerUp = pMotionEvent.getX(indexPointUp);
|
||||
final float yPointerUp = pMotionEvent.getY(indexPointUp);
|
||||
|
||||
this.queueEvent(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
GenesisGLSurfaceView.this.mGenesisRenderer.handleActionUp(idPointerUp, xPointerUp, yPointerUp);
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
||||
case MotionEvent.ACTION_UP:
|
||||
// there are only one finger on the screen
|
||||
final int idUp = pMotionEvent.getPointerId(0);
|
||||
final float xUp = xs[0];
|
||||
final float yUp = ys[0];
|
||||
|
||||
this.queueEvent(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
GenesisGLSurfaceView.this.mGenesisRenderer.handleActionUp(idUp, xUp, yUp);
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
||||
case MotionEvent.ACTION_CANCEL:
|
||||
this.queueEvent(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
GenesisGLSurfaceView.this.mGenesisRenderer.handleActionCancel(ids, xs, ys);
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* This function is called before Cocos2dxRenderer.nativeInit(), so the
|
||||
* width and height is correct.
|
||||
*/
|
||||
@Override
|
||||
protected void onSizeChanged(final int pNewSurfaceWidth, final int pNewSurfaceHeight, final int pOldSurfaceWidth, final int pOldSurfaceHeight) {
|
||||
if(!this.isInEditMode()) {
|
||||
|
||||
float screenWidth = (int)(pNewSurfaceWidth * density + 0.5f);
|
||||
float screenHeight = (int)(pNewSurfaceHeight * density + 0.5f);
|
||||
|
||||
this.mGenesisRenderer.setScreenWidthAndHeight(pNewSurfaceWidth, pNewSurfaceHeight,screenWidth,screenHeight,mMgr);
|
||||
|
||||
this.mGenesisRenderer.setConfig(gamedir,scenename,usePrecompilerShader);
|
||||
this.mGenesisRenderer.setStorage(storageType, packagename,apklocation );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(final int pKeyCode, final KeyEvent pKeyEvent) {
|
||||
switch (pKeyCode) {
|
||||
case KeyEvent.KEYCODE_BACK:
|
||||
this.queueEvent(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
GenesisGLSurfaceView.this.mGenesisRenderer.handleKeyDown(pKeyCode);
|
||||
}
|
||||
});
|
||||
return true;
|
||||
default:
|
||||
return super.onKeyDown(pKeyCode, pKeyEvent);
|
||||
}
|
||||
}
|
||||
|
||||
private static class ContextFactory implements GLSurfaceView.EGLContextFactory {
|
||||
private static int EGL_CONTEXT_CLIENT_VERSION = 0x3098;
|
||||
public EGLContext createContext(EGL10 egl, EGLDisplay display, EGLConfig eglConfig) {
|
||||
Log.w(TAG, "creating OpenGL ES 2.0 context");
|
||||
checkEglError("Before eglCreateContext", egl);
|
||||
int[] attrib_list = {EGL_CONTEXT_CLIENT_VERSION, 2, EGL10.EGL_NONE };
|
||||
EGLContext context = egl.eglCreateContext(display, eglConfig, EGL10.EGL_NO_CONTEXT, attrib_list);
|
||||
checkEglError("After eglCreateContext", egl);
|
||||
return context;
|
||||
}
|
||||
|
||||
public void destroyContext(EGL10 egl, EGLDisplay display, EGLContext context) {
|
||||
egl.eglDestroyContext(display, context);
|
||||
}
|
||||
}
|
||||
|
||||
private static void checkEglError(String prompt, EGL10 egl) {
|
||||
int error;
|
||||
while ((error = egl.eglGetError()) != EGL10.EGL_SUCCESS) {
|
||||
Log.e(TAG, String.format("%s: EGL error: 0x%x", prompt, error));
|
||||
}
|
||||
}
|
||||
|
||||
private static class ConfigChooser implements GLSurfaceView.EGLConfigChooser {
|
||||
|
||||
public ConfigChooser(int r, int g, int b, int a, int depth, int stencil) {
|
||||
mRedSize = r;
|
||||
mGreenSize = g;
|
||||
mBlueSize = b;
|
||||
mAlphaSize = a;
|
||||
mDepthSize = depth;
|
||||
mStencilSize = stencil;
|
||||
}
|
||||
|
||||
/* This EGL config specification is used to specify 2.0 rendering.
|
||||
* We use a minimum size of 4 bits for red/green/blue, but will
|
||||
* perform actual matching in chooseConfig() below.
|
||||
*/
|
||||
private static int EGL_OPENGL_ES2_BIT = 4;
|
||||
private static int[] s_configAttribs2 =
|
||||
{
|
||||
EGL10.EGL_RED_SIZE, 4,
|
||||
EGL10.EGL_GREEN_SIZE, 4,
|
||||
EGL10.EGL_BLUE_SIZE, 4,
|
||||
EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
|
||||
EGL10.EGL_NONE
|
||||
};
|
||||
|
||||
public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display) {
|
||||
|
||||
/* Get the number of minimally matching EGL configurations
|
||||
*/
|
||||
int[] num_config = new int[1];
|
||||
egl.eglChooseConfig(display, s_configAttribs2, null, 0, num_config);
|
||||
|
||||
int numConfigs = num_config[0];
|
||||
|
||||
if (numConfigs <= 0) {
|
||||
throw new IllegalArgumentException("No configs match configSpec");
|
||||
}
|
||||
|
||||
/* Allocate then read the array of minimally matching EGL configs
|
||||
*/
|
||||
EGLConfig[] configs = new EGLConfig[numConfigs];
|
||||
egl.eglChooseConfig(display, s_configAttribs2, configs, numConfigs, num_config);
|
||||
|
||||
if (false) {
|
||||
printConfigs(egl, display, configs);
|
||||
}
|
||||
/* Now return the "best" one
|
||||
*/
|
||||
return chooseConfig(egl, display, configs);
|
||||
}
|
||||
|
||||
public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display,
|
||||
EGLConfig[] configs) {
|
||||
for(EGLConfig config : configs) {
|
||||
int d = findConfigAttrib(egl, display, config,
|
||||
EGL10.EGL_DEPTH_SIZE, 0);
|
||||
int s = findConfigAttrib(egl, display, config,
|
||||
EGL10.EGL_STENCIL_SIZE, 0);
|
||||
|
||||
// We need at least mDepthSize and mStencilSize bits
|
||||
if (d < mDepthSize || s < mStencilSize)
|
||||
continue;
|
||||
|
||||
// We want an *exact* match for red/green/blue/alpha
|
||||
int r = findConfigAttrib(egl, display, config,
|
||||
EGL10.EGL_RED_SIZE, 0);
|
||||
int g = findConfigAttrib(egl, display, config,
|
||||
EGL10.EGL_GREEN_SIZE, 0);
|
||||
int b = findConfigAttrib(egl, display, config,
|
||||
EGL10.EGL_BLUE_SIZE, 0);
|
||||
int a = findConfigAttrib(egl, display, config,
|
||||
EGL10.EGL_ALPHA_SIZE, 0);
|
||||
|
||||
if (r == mRedSize && g == mGreenSize && b == mBlueSize && a == mAlphaSize)
|
||||
return config;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private int findConfigAttrib(EGL10 egl, EGLDisplay display,
|
||||
EGLConfig config, int attribute, int defaultValue) {
|
||||
|
||||
if (egl.eglGetConfigAttrib(display, config, attribute, mValue)) {
|
||||
return mValue[0];
|
||||
}
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
private void printConfigs(EGL10 egl, EGLDisplay display,
|
||||
EGLConfig[] configs) {
|
||||
int numConfigs = configs.length;
|
||||
Log.w(TAG, String.format("%d configurations", numConfigs));
|
||||
for (int i = 0; i < numConfigs; i++) {
|
||||
Log.w(TAG, String.format("Configuration %d:\n", i));
|
||||
printConfig(egl, display, configs[i]);
|
||||
}
|
||||
}
|
||||
|
||||
private void printConfig(EGL10 egl, EGLDisplay display,
|
||||
EGLConfig config) {
|
||||
int[] attributes = {
|
||||
EGL10.EGL_BUFFER_SIZE,
|
||||
EGL10.EGL_ALPHA_SIZE,
|
||||
EGL10.EGL_BLUE_SIZE,
|
||||
EGL10.EGL_GREEN_SIZE,
|
||||
EGL10.EGL_RED_SIZE,
|
||||
EGL10.EGL_DEPTH_SIZE,
|
||||
EGL10.EGL_STENCIL_SIZE,
|
||||
EGL10.EGL_CONFIG_CAVEAT,
|
||||
EGL10.EGL_CONFIG_ID,
|
||||
EGL10.EGL_LEVEL,
|
||||
EGL10.EGL_MAX_PBUFFER_HEIGHT,
|
||||
EGL10.EGL_MAX_PBUFFER_PIXELS,
|
||||
EGL10.EGL_MAX_PBUFFER_WIDTH,
|
||||
EGL10.EGL_NATIVE_RENDERABLE,
|
||||
EGL10.EGL_NATIVE_VISUAL_ID,
|
||||
EGL10.EGL_NATIVE_VISUAL_TYPE,
|
||||
0x3030, // EGL10.EGL_PRESERVED_RESOURCES,
|
||||
EGL10.EGL_SAMPLES,
|
||||
EGL10.EGL_SAMPLE_BUFFERS,
|
||||
EGL10.EGL_SURFACE_TYPE,
|
||||
EGL10.EGL_TRANSPARENT_TYPE,
|
||||
EGL10.EGL_TRANSPARENT_RED_VALUE,
|
||||
EGL10.EGL_TRANSPARENT_GREEN_VALUE,
|
||||
EGL10.EGL_TRANSPARENT_BLUE_VALUE,
|
||||
0x3039, // EGL10.EGL_BIND_TO_TEXTURE_RGB,
|
||||
0x303A, // EGL10.EGL_BIND_TO_TEXTURE_RGBA,
|
||||
0x303B, // EGL10.EGL_MIN_SWAP_INTERVAL,
|
||||
0x303C, // EGL10.EGL_MAX_SWAP_INTERVAL,
|
||||
EGL10.EGL_LUMINANCE_SIZE,
|
||||
EGL10.EGL_ALPHA_MASK_SIZE,
|
||||
EGL10.EGL_COLOR_BUFFER_TYPE,
|
||||
EGL10.EGL_RENDERABLE_TYPE,
|
||||
0x3042 // EGL10.EGL_CONFORMANT
|
||||
};
|
||||
String[] names = {
|
||||
"EGL_BUFFER_SIZE",
|
||||
"EGL_ALPHA_SIZE",
|
||||
"EGL_BLUE_SIZE",
|
||||
"EGL_GREEN_SIZE",
|
||||
"EGL_RED_SIZE",
|
||||
"EGL_DEPTH_SIZE",
|
||||
"EGL_STENCIL_SIZE",
|
||||
"EGL_CONFIG_CAVEAT",
|
||||
"EGL_CONFIG_ID",
|
||||
"EGL_LEVEL",
|
||||
"EGL_MAX_PBUFFER_HEIGHT",
|
||||
"EGL_MAX_PBUFFER_PIXELS",
|
||||
"EGL_MAX_PBUFFER_WIDTH",
|
||||
"EGL_NATIVE_RENDERABLE",
|
||||
"EGL_NATIVE_VISUAL_ID",
|
||||
"EGL_NATIVE_VISUAL_TYPE",
|
||||
"EGL_PRESERVED_RESOURCES",
|
||||
"EGL_SAMPLES",
|
||||
"EGL_SAMPLE_BUFFERS",
|
||||
"EGL_SURFACE_TYPE",
|
||||
"EGL_TRANSPARENT_TYPE",
|
||||
"EGL_TRANSPARENT_RED_VALUE",
|
||||
"EGL_TRANSPARENT_GREEN_VALUE",
|
||||
"EGL_TRANSPARENT_BLUE_VALUE",
|
||||
"EGL_BIND_TO_TEXTURE_RGB",
|
||||
"EGL_BIND_TO_TEXTURE_RGBA",
|
||||
"EGL_MIN_SWAP_INTERVAL",
|
||||
"EGL_MAX_SWAP_INTERVAL",
|
||||
"EGL_LUMINANCE_SIZE",
|
||||
"EGL_ALPHA_MASK_SIZE",
|
||||
"EGL_COLOR_BUFFER_TYPE",
|
||||
"EGL_RENDERABLE_TYPE",
|
||||
"EGL_CONFORMANT"
|
||||
};
|
||||
int[] value = new int[1];
|
||||
for (int i = 0; i < attributes.length; i++) {
|
||||
int attribute = attributes[i];
|
||||
String name = names[i];
|
||||
if ( egl.eglGetConfigAttrib(display, config, attribute, value)) {
|
||||
Log.w(TAG, String.format(" %s: %d\n", name, value[0]));
|
||||
} else {
|
||||
// Log.w(TAG, String.format(" %s: failed\n", name));
|
||||
while (egl.eglGetError() != EGL10.EGL_SUCCESS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Subclasses can adjust these values:
|
||||
protected int mRedSize;
|
||||
protected int mGreenSize;
|
||||
protected int mBlueSize;
|
||||
protected int mAlphaSize;
|
||||
protected int mDepthSize;
|
||||
protected int mStencilSize;
|
||||
private int[] mValue = new int[1];
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2006, Radon Labs GmbH
|
||||
Copyright (c) 2011-2013,WebJet Business Division,CYOU
|
||||
|
||||
http://www.genesis-3d.com.cn
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
package org.genesis.lib;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
|
||||
public class GenesisHandler extends Handler {
|
||||
// ===========================================================
|
||||
// Constants
|
||||
// ===========================================================
|
||||
public final static int HANDLER_CANCEL_BACKGROUND = 1;
|
||||
|
||||
// ===========================================================
|
||||
// Fields
|
||||
// ===========================================================
|
||||
private WeakReference<GenesisActivity> mActivity;
|
||||
|
||||
// ===========================================================
|
||||
// Constructors
|
||||
// ===========================================================
|
||||
public GenesisHandler(GenesisActivity activity) {
|
||||
this.mActivity = new WeakReference<GenesisActivity>(activity);
|
||||
}
|
||||
|
||||
// ===========================================================
|
||||
// Getter & Setter
|
||||
// ===========================================================
|
||||
|
||||
// ===========================================================
|
||||
// Methods for/from SuperClass/Interfaces
|
||||
// ===========================================================
|
||||
|
||||
// ===========================================================
|
||||
// Methods
|
||||
// ===========================================================
|
||||
|
||||
public void handleMessage(Message msg) {
|
||||
switch (msg.what) {
|
||||
case GenesisHandler.HANDLER_CANCEL_BACKGROUND:
|
||||
GenesisActivity theActivity = this.mActivity.get();
|
||||
theActivity.GetSurfaceView().setBackgroundResource(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2006, Radon Labs GmbH
|
||||
Copyright (c) 2011-2013,WebJet Business Division,CYOU
|
||||
|
||||
http://www.genesis-3d.com.cn
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
package org.genesis.lib;
|
||||
|
||||
public interface GenesisHelperListener
|
||||
{
|
||||
public void showDialog(final String pTitle, final String pMessage);
|
||||
public void showEditTextDialog(final String pTitle, final String pMessage, final int pInputMode, final int pInputFlag, final int pReturnType, final int pMaxLength);
|
||||
|
||||
public void runOnGLThread(final Runnable pRunnable);
|
||||
}
|
|
@ -0,0 +1,223 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2006, Radon Labs GmbH
|
||||
Copyright (c) 2011-2013,WebJet Business Division,CYOU
|
||||
|
||||
http://www.genesis-3d.com.cn
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
package org.genesis.lib;
|
||||
|
||||
import javax.microedition.khronos.egl.EGLConfig;
|
||||
import javax.microedition.khronos.opengles.GL10;
|
||||
|
||||
import android.content.res.AssetManager;
|
||||
import android.opengl.GLSurfaceView;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
|
||||
import org.genesis.lib.GenesisGLSurfaceView;
|
||||
|
||||
public class GenesisRenderer implements GLSurfaceView.Renderer {
|
||||
|
||||
|
||||
private final static long NANOSECONDSPERSECOND = 1000000000L;
|
||||
private final static long NANOSECONDSPERMICROSECOND = 1000000;
|
||||
|
||||
private static long sAnimationInterval = (long) (1.0 / 60 * NANOSECONDSPERSECOND);
|
||||
|
||||
// ===========================================================
|
||||
// Fields
|
||||
// ===========================================================
|
||||
|
||||
private long mLastTickInNanoSeconds;
|
||||
private int mScreenWidth;
|
||||
private int mScreenHeight;
|
||||
|
||||
private float mScreenDPIWidth;
|
||||
private float mScreenDPIHeight;
|
||||
|
||||
private AssetManager mAssetManager;
|
||||
|
||||
private GenesisGLSurfaceView mGenesisGLSurfaceView;
|
||||
long startTime = System.nanoTime();
|
||||
int frames = 0;
|
||||
|
||||
private GenesisHandler handler;
|
||||
// ===========================================================
|
||||
// Constructors
|
||||
// ===========================================================
|
||||
|
||||
// ===========================================================
|
||||
// Getter & Setter
|
||||
// ===========================================================
|
||||
|
||||
public GenesisRenderer(GenesisActivity act)
|
||||
{
|
||||
handler = new GenesisHandler(act);
|
||||
}
|
||||
public static void setAnimationInterval(final double pAnimationInterval) {
|
||||
sAnimationInterval = (long) (pAnimationInterval * NANOSECONDSPERSECOND);
|
||||
}
|
||||
|
||||
public void setScreenWidthAndHeight(final int pSurfaceWidth, final int pSurfaceHeight,final float dpiW,final float dpiH,AssetManager mgr) {
|
||||
this.mScreenWidth = pSurfaceWidth;
|
||||
this.mScreenHeight = pSurfaceHeight;
|
||||
mScreenDPIWidth = dpiW;
|
||||
mScreenDPIHeight = dpiH;
|
||||
mAssetManager = mgr;
|
||||
}
|
||||
|
||||
public void setConfig(final String gamedir, final String scenename,final boolean bShader) {
|
||||
nativeConfig(gamedir,scenename,bShader);
|
||||
}
|
||||
|
||||
public void setStorage(final int type, final String packagename, final String apklocation) {
|
||||
nativeStorage(type,packagename,apklocation);
|
||||
}
|
||||
// ===========================================================
|
||||
// Methods for/from SuperClass/Interfaces
|
||||
// ===========================================================
|
||||
|
||||
@Override
|
||||
public void onSurfaceCreated(final GL10 pGL10, final EGLConfig pEGLConfig) {
|
||||
|
||||
nativeInit(this.mScreenWidth, this.mScreenHeight,mScreenDPIWidth,mScreenDPIHeight,mAssetManager);
|
||||
this.mLastTickInNanoSeconds = System.nanoTime();
|
||||
|
||||
|
||||
Message msg = new Message();
|
||||
msg.what = GenesisHandler.HANDLER_CANCEL_BACKGROUND;
|
||||
msg.obj = null;
|
||||
this.handler.sendMessage(msg);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSurfaceChanged(final GL10 pGL10, final int pWidth, final int pHeight)
|
||||
{
|
||||
//Cocos2dxRenderer.nativeInit(this.mScreenWidth, this.mScreenHeight);
|
||||
}
|
||||
|
||||
public void SetGenesisGLSurfaceView(GenesisGLSurfaceView view)
|
||||
{
|
||||
mGenesisGLSurfaceView = view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDrawFrame(final GL10 gl) {
|
||||
|
||||
|
||||
//mGenesisGLSurfaceView.setBackgroundResource(0);
|
||||
final long nowInNanoSeconds = System.nanoTime();
|
||||
final long interval = nowInNanoSeconds - this.mLastTickInNanoSeconds;
|
||||
|
||||
// should render a frame when onDrawFrame() is called or there is a
|
||||
// "ghost"
|
||||
nativeRender();
|
||||
|
||||
frames++;
|
||||
if(System.nanoTime() - startTime >= 1000000000) {
|
||||
Log.d("FPSCounter", "fps: " + frames);
|
||||
frames = 0;
|
||||
startTime = System.nanoTime();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
this.mLastTickInNanoSeconds = nowInNanoSeconds;
|
||||
}
|
||||
|
||||
// ===========================================================
|
||||
// Methods
|
||||
// ===========================================================
|
||||
|
||||
private static native void nativeTouchesBegin(final int pID, final float pX, final float pY);
|
||||
private static native void nativeTouchesEnd(final int pID, final float pX, final float pY);
|
||||
private static native void nativeTouchesMove(final int[] pIDs, final float[] pXs, final float[] pYs);
|
||||
private static native void nativeTouchesCancel(final int[] pIDs, final float[] pXs, final float[] pYs);
|
||||
private static native boolean nativeKeyDown(final int pKeyCode);
|
||||
private static native void nativeRender();
|
||||
private static native void nativeInit(final int pWidth, final int pHeight,final float dpiW,final float dpiH , AssetManager assetManager);
|
||||
private static native void nativeConfig(final String gamedir, final String scenename,final boolean bShader);
|
||||
private static native void nativeStorage(final int type, final String pakagename, final String apklocation);
|
||||
private static native void nativeOnPause();
|
||||
private static native void nativeOnResume();
|
||||
private static native void nativeOnDestroy();
|
||||
private static native void nativeOnStop();
|
||||
|
||||
public void handleActionDown(final int pID, final float pX, final float pY) {
|
||||
GenesisRenderer.nativeTouchesBegin(pID, pX, pY);
|
||||
}
|
||||
|
||||
public void handleActionUp(final int pID, final float pX, final float pY) {
|
||||
GenesisRenderer.nativeTouchesEnd(pID, pX, pY);
|
||||
}
|
||||
|
||||
public void handleActionCancel(final int[] pIDs, final float[] pXs, final float[] pYs) {
|
||||
GenesisRenderer.nativeTouchesCancel(pIDs, pXs, pYs);
|
||||
}
|
||||
|
||||
public void handleActionMove(final int[] pIDs, final float[] pXs, final float[] pYs) {
|
||||
GenesisRenderer.nativeTouchesMove(pIDs, pXs, pYs);
|
||||
}
|
||||
|
||||
public void handleKeyDown(final int pKeyCode) {
|
||||
GenesisRenderer.nativeKeyDown(pKeyCode);
|
||||
}
|
||||
|
||||
public void handleOnPause() {
|
||||
GenesisRenderer.nativeOnPause();
|
||||
}
|
||||
|
||||
public void handleOnResume() {
|
||||
GenesisRenderer.nativeOnResume();
|
||||
}
|
||||
|
||||
public void handleOnDestroy()
|
||||
{
|
||||
//Cocos2dxRenderer.nativeOnDestroy();
|
||||
}
|
||||
|
||||
public void handleOnStop()
|
||||
{
|
||||
GenesisRenderer.nativeOnStop();
|
||||
}
|
||||
|
||||
private static native void nativeInsertText(final String pText);
|
||||
private static native void nativeDeleteBackward();
|
||||
private static native String nativeGetContentText();
|
||||
|
||||
public void handleInsertText(final String pText) {
|
||||
GenesisRenderer.nativeInsertText(pText);
|
||||
}
|
||||
|
||||
public void handleDeleteBackward() {
|
||||
GenesisRenderer.nativeDeleteBackward();
|
||||
}
|
||||
|
||||
public String getContentText() {
|
||||
return GenesisRenderer.nativeGetContentText();
|
||||
}
|
||||
|
||||
|
||||
}
|
81
Engine/CMake/AndroidBuildConfig.cmake
Normal file
|
@ -0,0 +1,81 @@
|
|||
#****************************************************************************
|
||||
# Copyright (c) 2011-2013,WebJet Business Division,CYOU
|
||||
#
|
||||
# http://www.genesis-3d.com.cn
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
#****************************************************************************
|
||||
|
||||
ADD_DEFINITIONS(
|
||||
-D__ANDROID__
|
||||
-D__USE_AUDIO__
|
||||
-DANDROID )
|
||||
|
||||
#temp definitions
|
||||
ADD_DEFINITIONS(
|
||||
-D__APP_BUILD_COMMIT__
|
||||
-D__PROFILER__)
|
||||
|
||||
IF ( ANDROID_OPTIMIZED )
|
||||
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -frtti -fexceptions -Wfatal-errors" )
|
||||
SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexceptions -Wfatal-errors" )
|
||||
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3" )
|
||||
SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3" )
|
||||
MESSAGE( STATUS "ANDROID_OPTIMIZED Turn On!" )
|
||||
ELSE ( ANDROID_OPTIMIZED )
|
||||
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -frtti -fexceptions -Wfatal-errors -g" )
|
||||
SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexceptions -Wfatal-errors -g" )
|
||||
ENDIF ( ANDROID_OPTIMIZED )
|
||||
|
||||
IF ( ANDROID_NDEBUG )
|
||||
ADD_DEFINITIONS( -DNDEBUG )
|
||||
MESSAGE( STATUS "NDEBUG macro set!" )
|
||||
ELSE( ANDROID_NDEBUG )
|
||||
ADD_DEFINITIONS( -D_DEBUG )
|
||||
MESSAGE( STATUS "_DEBUG macro set!" )
|
||||
ENDIF ( ANDROID_NDEBUG )
|
||||
|
||||
IF ( ANDROID_PROFILE )
|
||||
ADD_DEFINITIONS( -DANDROID_PROFILE )
|
||||
MESSAGE( STATUS "ANDROID_PROFILE macro set!" )
|
||||
ELSE( ANDROID_PROFILE )
|
||||
MESSAGE( STATUS "ANDROID_PROFILE macro not set!" )
|
||||
ENDIF ( ANDROID_PROFILE )
|
||||
|
||||
SET( ANDROID_GUN_LIB_STD_INCLUDE_PATH "${ANDROID_NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.4.3/include" )
|
||||
SET( ANDROID_GUN_LIB_STD_LIB_PATH "${ANDROID_NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi" )
|
||||
SET( ANDROID_GUN_LIB_STD_LIB_PATH_INCLUDE "${ANDROID_NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi/include" )
|
||||
SET( ANDROID_PLATFORMS_ANDROID14_INCLUDE "${ANDROID_NDK_ROOT}/platforms/android-14/arch-arm/usr/include" )
|
||||
SET( ANDROID_PLATFORMS_ANDROID14_LIB "${ANDROID_NDK_ROOT}/platforms/android-14/arch-arm/usr/lib" )
|
||||
SET( GENESIS_EXTERNAL_PROJECT_DIR "${CMAKE_SOURCE_DIR}/../../genesis_externals/Externals")
|
||||
|
||||
MESSAGE( STATUS "ANDROID_NDK_ROOT:" ${ANDROID_NDK_ROOT} )
|
||||
|
||||
INCLUDE_DIRECTORIES( ${ANDROID_GUN_LIB_STD_INCLUDE_PATH} )
|
||||
INCLUDE_DIRECTORIES( ${ANDROID_GUN_LIB_STD_LIB_PATH_INCLUDE} )
|
||||
INCLUDE_DIRECTORIES( ${ANDROID_PLATFORMS_ANDROID14_INCLUDE} )
|
||||
INCLUDE_DIRECTORIES( ${GENESIS_EXTERNAL_PROJECT_DIR} )
|
||||
|
||||
LINK_DIRECTORIES( ${ANDROID_PLATFORMS_ANDROID14_LIB} )
|
||||
LINK_DIRECTORIES( ${ANDROID_GUN_LIB_STD_LIB_PATH} )
|
||||
|
||||
### specify output directory
|
||||
SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/../bin/android/" )
|
||||
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/../bin/android/" )
|
||||
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/../bin/android/" )
|
68
Engine/CMake/AndroidToolChain.cmake
Normal file
|
@ -0,0 +1,68 @@
|
|||
#****************************************************************************
|
||||
# Copyright (c) 2011-2013,WebJet Business Division,CYOU
|
||||
#
|
||||
# http://www.genesis-3d.com.cn
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
#****************************************************************************
|
||||
|
||||
#android toolchain for andorid9
|
||||
INCLUDE(CMAKEFORCECOMPILER)
|
||||
|
||||
SET( CMAKE_CROSSCOMPILING TRUE )
|
||||
SET( CMAKE_SYSTEM_NAME Linux )
|
||||
SET( CMAKE_SYSTEM_VERSION 1 )
|
||||
SET( CMAKE_SYSTEM_PROCESSOR "armv7-a" )
|
||||
|
||||
#base path
|
||||
SET( ANDROID_NDK_ROOT "${CMAKE_SOURCE_DIR}/../../genesis_externals/Externals/NDK/android-ndk-r8b-windows" )
|
||||
SET( ANDROID_NDK_TOOLCHAIN_ROOT "${ANDROID_NDK_ROOT}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows" )
|
||||
|
||||
#SET compiler
|
||||
SET( CMAKE_C_COMPILER "${ANDROID_NDK_TOOLCHAIN_ROOT}/bin/arm-linux-androideabi-gcc.exe" )
|
||||
SET( CMAKE_CXX_COMPILER "${ANDROID_NDK_TOOLCHAIN_ROOT}/bin/arm-linux-androideabi-g++.exe" )
|
||||
|
||||
CMAKE_FORCE_C_COMPILER( "${CMAKE_C_COMPILER}" GNU )
|
||||
CMAKE_FORCE_CXX_COMPILER( "${CMAKE_CXX_COMPILER}" GNU )
|
||||
|
||||
SET( CMAKE_MAKE_PROGRAM "${ANDROID_NDK_ROOT}/prebuilt/windows/bin/make.exe" CACHE PATH "make")
|
||||
SET( CMAKE_STRIP "${ANDROID_NDK_TOOLCHAIN_ROOT}/bin/arm-linux-androideabi-strip.exe" CACHE PATH "strip" )
|
||||
SET( CMAKE_AR "${ANDROID_NDK_TOOLCHAIN_ROOT}/bin/arm-linux-androideabi-ar.exe" CACHE PATH "archive" )
|
||||
SET( CMAKE_LINKER "${ANDROID_NDK_TOOLCHAIN_ROOT}/bin/arm-linux-androideabi-ld.exe" CACHE PATH "linker" )
|
||||
SET( CMAKE_NM "${ANDROID_NDK_TOOLCHAIN_ROOT}/bin/arm-linux-androideabi-nm.exe" CACHE PATH "nm" )
|
||||
SET( CMAKE_OBJCOPY "${ANDROID_NDK_TOOLCHAIN_ROOT}/bin/arm-linux-androideabi-objcopy.exe" CACHE PATH "objcopy" )
|
||||
SET( CMAKE_OBJDUMP "${ANDROID_NDK_TOOLCHAIN_ROOT}/bin/arm-linux-androideabi-objdump.exe" CACHE PATH "objdump" )
|
||||
SET( CMAKE_RANLIB "${ANDROID_NDK_TOOLCHAIN_ROOT}/bin/arm-linux-androideabi-ranlib.exe" CACHE PATH "ranlib" )
|
||||
|
||||
#cache flags
|
||||
SET( CMAKE_SHARED_LINKER_FLAGS "" CACHE STRING "linker flags" FORCE )
|
||||
|
||||
SET( CMAKE_FIND_ROOT_PATH "${ANDROID_NDK_ROOT}/platforms/android-14/arch-arm" " ${ANDROID_NDK_TOOLCHAIN_ROOT}" )
|
||||
|
||||
INCLUDE_DIRECTORIES( ${ANDROID_NDK_ROOT}/platforms/android-14/arch-arm/usr/include )
|
||||
LINK_DIRECTORIES( ${ANDROID_NDK_ROOT}/platforms/android-14/arch-arm/usr/lib )
|
||||
|
||||
SET( LIBS "${ANDROID_NDK_ROOT}/platforms/android-14/arch-arm/usr/lib" )
|
||||
|
||||
SET( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--fix-cortex-a8 -L${LIBS} --sysroot=${LIBS}/../.. " )
|
||||
|
||||
|
||||
SET ( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
|
||||
SET ( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
|
||||
SET ( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
|
52
Engine/CMake/Macros.cmake
Normal file
|
@ -0,0 +1,52 @@
|
|||
#****************************************************************************
|
||||
# Copyright (c) 2011-2013,WebJet Business Division,CYOU
|
||||
#
|
||||
# http://www.genesis-3d.com.cn
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
#****************************************************************************
|
||||
|
||||
|
||||
# Get environment variable, define it as ENV_$var and make sure backslashes are converted to forward slashes
|
||||
MACRO( _MACRO_GETENV_PATH VAR )
|
||||
SET( ENV_${VAR} $ENV{${VAR}} )
|
||||
|
||||
# replace won't work IF var is blank
|
||||
IF ( ENV_${VAR} )
|
||||
STRING( REGEX REPLACE "\\\\" "/" ENV_${VAR} ${ENV_${VAR}} )
|
||||
ENDIF ( ENV_${VAR} )
|
||||
ENDMACRO(_MACRO_GETENV_PATH)
|
||||
|
||||
#treat warring as error
|
||||
MACRO( _MACRO_TREAT_WARRINGS_AS_ERRORS arg_TargetName )
|
||||
IF ( GCC_COMPILER )
|
||||
#SunHao TODO: too many warrings, so just comment it. Recovery it later. 2013.3.6
|
||||
#SET (WARRING_AS_ERROR_PARAM "-Werror" )
|
||||
SET (WARRING_AS_ERROR_PARAM " " ) #give a null value to make CMake.exe happy
|
||||
ENDIF( GCC_COMPILER )
|
||||
|
||||
IF ( MS_COMPILER )
|
||||
SET (WARRING_AS_ERROR_PARAM "/WX" )
|
||||
ENDIF( MS_COMPILER )
|
||||
|
||||
SET_TARGET_PROPERTIES( ${arg_TargetName}
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS ${WARRING_AS_ERROR_PARAM} )
|
||||
|
||||
ENDMACRO( _MACRO_TREAT_WARRINGS_AS_ERRORS )
|
37
Engine/CMake/Options.cmake
Normal file
|
@ -0,0 +1,37 @@
|
|||
#****************************************************************************
|
||||
# Copyright (c) 2011-2013,WebJet Business Division,CYOU
|
||||
#
|
||||
# http://www.genesis-3d.com.cn
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
#****************************************************************************
|
||||
|
||||
#choose a perform
|
||||
OPTION( ANDROID_BUILD "build android edition" FALSE )
|
||||
OPTION( APPLE_BUILD "build android edition" FALSE )
|
||||
OPTION( WINDOWS_BUILD "build windows edition" FALSE )
|
||||
|
||||
|
||||
#Compile option
|
||||
OPTION( ANDROID_OPTIMIZED "turn on optimized or not" FALSE )
|
||||
OPTION( ANDROID_NDEBUG "set NDEBUG macro or not" FALSE )
|
||||
OPTION( ANDROID_PROFILE "turn on Android Profile" FALSE )
|
||||
OPTION( THIRD_PARTY_BUILD "build third-party codes" TRUE )
|
||||
OPTION( FEATURE_AUDIO "build aduio feature" TRUE )
|
||||
OPTION( FEATURE_PHYSX "build physics feature" TRUE )
|
266
Engine/CMake/WindowsBuildConfig.cmake
Normal file
|
@ -0,0 +1,266 @@
|
|||
#****************************************************************************
|
||||
# Copyright (c) 2011-2013,WebJet Business Division,CYOU
|
||||
#
|
||||
# http://www.genesis-3d.com.cn
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
#****************************************************************************
|
||||
|
||||
#set postfix
|
||||
SET(CMAKE_DEBUG_POSTFIX "_d")
|
||||
SET(CMAKE_EDITOR_DEBUG_POSTFIX "_d")
|
||||
SET(CMAKE_PROFILE_DEBUG_POSTFIX "_d")
|
||||
#Options
|
||||
# generate build type for Editor solution
|
||||
SET( GENERATE_EDITOR_BUILD_TYPE ON )
|
||||
|
||||
# let releae build typed generate debug information
|
||||
SET( RELEASE_BUILD_TYPE_GENERATE_DEBUG_INFORMATION ON )
|
||||
|
||||
#Setting build type, make Debug Editor_debug build in debug mode
|
||||
SET_PROPERTY( GLOBAL PROPERTY DEBUG_CONFIGURATIONS "Debug;Editor_Debug;Profile_Debug" )
|
||||
|
||||
###SET the configuration types
|
||||
IF ( CMAKE_CONFIGURATION_TYPES )
|
||||
|
||||
SET( CMAKE_CONFIGURATION_TYPES Debug Release Editor_Debug Editor_Release Profile_Debug Profile_Release)
|
||||
SET( CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING
|
||||
"Reset the configurations to what we need"
|
||||
FORCE )
|
||||
|
||||
ENDIF( CMAKE_CONFIGURATION_TYPES )
|
||||
|
||||
### editor build type
|
||||
IF ( ${GENERATE_EDITOR_BUILD_TYPE} )
|
||||
#debug
|
||||
SET( CMAKE_CXX_FLAGS_EDITOR_DEBUG "/D__GENESIS_EDITOR__ /D_DEBUG /MTd /Zi /Ob0 /Od /RTC1" CACHE STRING
|
||||
"Flags used by the C++ compiler during EditorDebug builds."
|
||||
FORCE )
|
||||
|
||||
SET( CMAKE_C_FLAGS_EDITOR_DEBUG "/D__GENESIS_EDITOR__ /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1" CACHE STRING
|
||||
"Flags used by the C compiler during EditorDebug builds."
|
||||
FORCE )
|
||||
|
||||
SET( CMAKE_EXE_LINKER_FLAGS_EDITOR_DEBUG
|
||||
"/DEBUG /INCREMENTAL:YES" CACHE STRING
|
||||
"Flags used for linking binaries during EditorDebug builds."
|
||||
FORCE )
|
||||
|
||||
SET( CMAKE_SHARED_LINKER_FLAGS_EDITOR_DEBUG
|
||||
"/DEBUG /INCREMENTAL:YES" CACHE STRING
|
||||
"Flags used by the shared libraries linker during EditorDebug builds."
|
||||
FORCE )
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
CMAKE_CXX_FLAGS_EDITOR_DEBUG
|
||||
CMAKE_C_FLAGS_EDITOR_DEBUG
|
||||
CMAKE_EXE_LINKER_FLAGS_EDITOR_DEBUG
|
||||
CMAKE_SHARED_LINKER_FLAGS_EDITOR_DEBUG )
|
||||
|
||||
#Release
|
||||
SET( CMAKE_CXX_FLAGS_EDITOR_RELEASE "/D__GENESIS_EDITOR__ /MT /O2 /Ob2 /D NDEBUG" CACHE STRING
|
||||
"Flags used by the C++ compiler during EditorRelease builds."
|
||||
FORCE )
|
||||
|
||||
SET( CMAKE_C_FLAGS_EDITOR_RELEASE "/D__GENESIS_EDITOR__ /MD /O2 /Ob2 /D NDEBUG" CACHE STRING
|
||||
"Flags used by the C compiler during EditorRelease builds."
|
||||
FORCE )
|
||||
|
||||
SET( CMAKE_EXE_LINKER_FLAGS_EDITOR_RELEASE
|
||||
"/INCREMENTAL:NO" CACHE STRING
|
||||
"Flags used for linking binaries during EditorRelease builds."
|
||||
FORCE )
|
||||
|
||||
SET( CMAKE_SHARED_LINKER_FLAGS_EDITOR_RELEASE
|
||||
"/INCREMENTAL:NO" CACHE STRING
|
||||
"Flags used by the shared libraries linker during EditorRelease builds."
|
||||
FORCE )
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
CMAKE_CXX_FLAGS_EDITOR_RELEASE
|
||||
CMAKE_C_FLAGS_EDITOR_RELEASE
|
||||
CMAKE_EXE_LINKER_FLAGS_EDITOR_RELEASE
|
||||
CMAKE_SHARED_LINKER_FLAGS_EDITOR_RELEASE )
|
||||
|
||||
# Update the documentation string of CMAKE_BUILD_TYPE for GUIs
|
||||
SET( CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING
|
||||
"Choose the type of build, options are: None Debug Release EditorDebug EditorRelease."
|
||||
FORCE )
|
||||
ENDIF ( ${GENERATE_EDITOR_BUILD_TYPE} )
|
||||
|
||||
|
||||
|
||||
########################## profile config ########################################
|
||||
|
||||
# profile debug
|
||||
|
||||
SET( CMAKE_CXX_FLAGS_PROFILE_DEBUG "/D__PROFILER__ /D_DEBUG /MTd /Zi /Ob0 /Od /RTC1" CACHE STRING
|
||||
"Flags used by the C++ compiler during ProfileDebug builds."
|
||||
FORCE )
|
||||
|
||||
SET( CMAKE_C_FLAGS_PROFILE_DEBUG "/D__PROFILER__ /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1" CACHE STRING
|
||||
"Flags used by the C compiler during ProfileDebug builds."
|
||||
FORCE )
|
||||
|
||||
SET( CMAKE_EXE_LINKER_FLAGS_PROFILE_DEBUG
|
||||
"/DEBUG /INCREMENTAL:YES" CACHE STRING
|
||||
"Flags used for linking binaries during ProfileDebug builds."
|
||||
FORCE )
|
||||
|
||||
SET( CMAKE_SHARED_LINKER_FLAGS_PROFILE_DEBUG
|
||||
"/DEBUG /INCREMENTAL:YES" CACHE STRING
|
||||
"Flags used by the shared libraries linker during ProfileDebug builds."
|
||||
FORCE )
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
CMAKE_CXX_FLAGS_PROFILE_DEBUG
|
||||
CMAKE_C_FLAGS_PROFILE_DEBUG
|
||||
CMAKE_EXE_LINKER_FLAGS_PROFILE_DEBUG
|
||||
CMAKE_SHARED_LINKER_FLAGS_PROFILE_DEBUG )
|
||||
|
||||
# profile release
|
||||
|
||||
SET( CMAKE_CXX_FLAGS_PROFILE_RELEASE "/D__PROFILER__ /MT /O2 /Ob2 /D NDEBUG" CACHE STRING
|
||||
"Flags used by the C++ compiler during ProfileRelease builds."
|
||||
FORCE )
|
||||
|
||||
SET( CMAKE_C_FLAGS_PROFILE_RELEASE "/D__PROFILER__ /MD /O2 /Ob2 /D NDEBUG" CACHE STRING
|
||||
"Flags used by the C compiler during ProfileRelease builds."
|
||||
FORCE )
|
||||
|
||||
SET( CMAKE_EXE_LINKER_FLAGS_PROFILE_RELEASE
|
||||
"/INCREMENTAL:NO" CACHE STRING
|
||||
"Flags used for linking binaries during ProfileRelease builds."
|
||||
FORCE )
|
||||
|
||||
SET( CMAKE_SHARED_LINKER_FLAGS_PROFILE_RELEASE
|
||||
"/INCREMENTAL:NO" CACHE STRING
|
||||
"Flags used by the shared libraries linker during ProfileRelease builds."
|
||||
FORCE )
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
CMAKE_CXX_FLAGS_PROFILE_RELEASE
|
||||
CMAKE_C_FLAGS_PROFILE_RELEASE
|
||||
CMAKE_EXE_LINKER_FLAGS_PROFILE_RELEASE
|
||||
CMAKE_SHARED_LINKER_FLAGS_PROFILE_RELEASE )
|
||||
|
||||
##################################################################################
|
||||
###multi thread
|
||||
FOREACH( flag_var
|
||||
CMAKE_CXX_FLAGS
|
||||
CMAKE_CXX_FLAGS_DEBUG
|
||||
CMAKE_CXX_FLAGS_RELEASE
|
||||
CMAKE_CXX_FLAGS_EDITOR_DEBUG
|
||||
CMAKE_CXX_FLAGS_EDITOR_RELEASE
|
||||
CMAKE_CXX_FLAGS_PROFILE_DEBUG
|
||||
CMAKE_CXX_FLAGS_PROFILE_RELEASE
|
||||
)
|
||||
|
||||
IF( ${flag_var} MATCHES "/MD" )
|
||||
STRING( REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}" )
|
||||
#force update this on the CMAKE GUI
|
||||
SET(${flag_var} "${${flag_var}}" CACHE STRING
|
||||
"Reset the configurations to what we need"
|
||||
FORCE )
|
||||
|
||||
ENDIF( ${flag_var} MATCHES "/MD" )
|
||||
|
||||
IF( ${flag_var} MATCHES "/MDd" )
|
||||
STRING( REGEX REPLACE "/MDd" "/MTd" ${flag_var} "${${flag_var}}" )
|
||||
#force update this on the CMAKE GUI
|
||||
SET(${flag_var} "${${flag_var}}" CACHE STRING
|
||||
"Reset the configurations to what we need"
|
||||
FORCE )
|
||||
|
||||
ENDIF( ${flag_var} MATCHES "/MDd" )
|
||||
|
||||
ENDFOREACH( flag_var )
|
||||
|
||||
### let release build type generate debug information
|
||||
IF ( ${RELEASE_BUILD_TYPE_GENERATE_DEBUG_INFORMATION} )
|
||||
FOREACH( flag_var
|
||||
CMAKE_CXX_FLAGS_RELEASE
|
||||
CMAKE_CXX_FLAGS_EDITOR_RELEASE
|
||||
CMAKE_CXX_FLAGS_PROFILE_RELEASE
|
||||
)
|
||||
|
||||
IF( NOT ${flag_var} MATCHES "/Zi" )
|
||||
|
||||
SET( ${flag_var} "${${flag_var}} /Zi" CACHE STRING
|
||||
"Let release build type generate debug info"
|
||||
FORCE )
|
||||
|
||||
ENDIF( NOT ${flag_var} MATCHES "/Zi" )
|
||||
ENDFOREACH( flag_var )
|
||||
ENDIF ( ${RELEASE_BUILD_TYPE_GENERATE_DEBUG_INFORMATION} )
|
||||
|
||||
INCLUDE_DIRECTORIES( ${GENESIS_EXTERNAL_PROJECT_DIR} )
|
||||
|
||||
#set directX path
|
||||
SET(DIRECTX_INCLUDE_DIR ${GENESIS_EXTERNAL_PROJECT_DIR}/dxsdk/Include)
|
||||
#set directX lib path
|
||||
IF(CMAKE_CL_64)
|
||||
SET(DIRECTX_LIB_DIR ${GENESIS_EXTERNAL_PROJECT_DIR}/dxsdk/Lib/x64)
|
||||
ELSE(CMAKE_CL_64)
|
||||
SET(DIRECTX_LIB_DIR ${GENESIS_EXTERNAL_PROJECT_DIR}/dxsdk/Lib/x86)
|
||||
ENDIF(CMAKE_CL_64)
|
||||
|
||||
MESSAGE( STATUS "DIRECTX_INCLUDE_DIR:" ${DIRECTX_INCLUDE_DIR} )
|
||||
MESSAGE( STATUS "DIRECTX_LIB_DIRS:" ${DIRECTX_LIB_DIR} )
|
||||
|
||||
INCLUDE_DIRECTORIES( ${DIRECTX_INCLUDE_DIR} )
|
||||
LINK_DIRECTORIES( ${DIRECTX_LIB_DIR} )
|
||||
|
||||
#Organize projects into folders
|
||||
SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
#Add definitions
|
||||
ADD_DEFINITIONS(
|
||||
-D__WIN32__
|
||||
-DWIN32
|
||||
-D__USE_PHYSX__
|
||||
-D__USE_AUDIO__
|
||||
-DNT_PLUGIN )
|
||||
|
||||
IF ( FEATURE_AUDIO )
|
||||
ADD_DEFINITIONS( -D__USE_AUDIO__ )
|
||||
MESSAGE( STATUS "FEATURE_AUDIO macro set!" )
|
||||
ELSE( FEATURE_AUDIO )
|
||||
MESSAGE( STATUS "FEATURE_AUDIO macro not set!" )
|
||||
ENDIF ( FEATURE_AUDIO )
|
||||
|
||||
IF ( FEATURE_PHYSX )
|
||||
ADD_DEFINITIONS( -D__USE_PHYSX__ )
|
||||
MESSAGE( STATUS "FEATURE_PHYSX macro set!" )
|
||||
ELSE( FEATURE_PHYSX )
|
||||
MESSAGE( STATUS "FEATURE_PHYSX macro not set!" )
|
||||
ENDIF ( FEATURE_PHYSX )
|
||||
|
||||
### specify output directory
|
||||
SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/../bin/win32/" )
|
||||
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/../bin/win32/" )
|
||||
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/../bin/win32/" )
|
||||
|
||||
#<-------------------------------------------------Editor------------------------------------------------>
|
||||
SET( GENESIS_EDITOR_DIR ${PROJECT_SOURCE_DIR}/../../genesis_editor)
|
||||
SET( GENESIS_EDITOR_CMAKE_FILE ${GENESIS_EDITOR_DIR}/CMake/EditorBuildConfig.cmake)
|
||||
|
||||
IF( EXISTS ${GENESIS_EDITOR_CMAKE_FILE} )
|
||||
INCLUDE ( ${GENESIS_EDITOR_CMAKE_FILE} )
|
||||
ENDIF()
|
113
Engine/CMakeLists.txt
Normal file
|
@ -0,0 +1,113 @@
|
|||
#****************************************************************************
|
||||
# Copyright (c) 2011-2013,WebJet Business Division,CYOU
|
||||
#
|
||||
# http://www.genesis-3d.com.cn
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
#****************************************************************************
|
||||
|
||||
##################################################################################
|
||||
# Build the whole Engine
|
||||
##################################################################################
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
||||
|
||||
PROJECT ( GenesisEngine )
|
||||
|
||||
|
||||
# set config
|
||||
|
||||
SET( GENESIS_EXTERNAL_LIBS_DIR ${PROJECT_SOURCE_DIR}/../../genesis_externals/Librarys)
|
||||
SET( GENESIS_EXTERNAL_PROJECT_DIR ${PROJECT_SOURCE_DIR}/../../genesis_externals/Externals)
|
||||
# debug
|
||||
MESSAGE( STATUS "CMAKE_SOURECE_DIR:" ${CMAKE_SOURCE_DIR} )
|
||||
MESSAGE( STATUS "PROJECT_SOURCE_DIR:" ${PROJECT_SOURCE_DIR} )
|
||||
MESSAGE( STATUS "PROJECT_BIN_DIR:" ${PROJECT_BINARY_DIR} )
|
||||
|
||||
MESSAGE( STATUS "GENESIS_EXTERNAL_LIBS_DIR:" ${GENESIS_EXTERNAL_LIBS_DIR} )
|
||||
MESSAGE( STATUS "GENESIS_EXTERNAL_PROJECT_DIR:" ${GENESIS_EXTERNAL_PROJECT_DIR} )
|
||||
|
||||
### binary dir should not be the same with the source dir
|
||||
IF ( ${PROJECT_SOURCE_DIR} STREQUAL ${PROJECT_BINARY_DIR} )
|
||||
MESSAGE( STATUS "Binary directory:" ${PROJECT_BINARY_DIR} )
|
||||
MESSAGE( STATUS "Source code directory:" ${PROJECT_SOURCE_DIR} )
|
||||
MESSAGE( FATAL_ERROR "Binary directory should not be the same with Source code directory!!!" )
|
||||
ENDIF( )
|
||||
|
||||
# set moudule path
|
||||
SET( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake" )
|
||||
|
||||
#Options defult setting here
|
||||
INCLUDE ( ${CMAKE_MODULE_PATH}/Options.cmake )
|
||||
|
||||
IF( WIN32 AND NOT ANDOIRD_BUILD )
|
||||
Set( WINDOWS_BUILD TRUE CACHE BOOL "" FORCE)
|
||||
ENDIF ( WIN32 AND NOT ANDOIRD_BUILD )
|
||||
#check if
|
||||
IF ( NOT ANDROID_BUILD AND
|
||||
NOT WINDOWS_BUILD AND
|
||||
NOT APPLE_BUILD )
|
||||
MESSAGE( FATAL_ERROR "Should choose a platform!" )
|
||||
ENDIF()
|
||||
|
||||
|
||||
|
||||
#Macros record here
|
||||
INCLUDE ( ${CMAKE_MODULE_PATH}/Macros.cmake )
|
||||
|
||||
IF ( WINDOWS_BUILD )
|
||||
SET( MS_COMPILER TURE )
|
||||
|
||||
INCLUDE ( ${CMAKE_MODULE_PATH}/WindowsBuildConfig.cmake )
|
||||
ENDIF ( WINDOWS_BUILD )
|
||||
|
||||
IF ( ANDROID_BUILD )
|
||||
SET( GCC_COMPILER TURE )
|
||||
|
||||
INCLUDE ( ${CMAKE_MODULE_PATH}/AndroidBuildConfig.cmake )
|
||||
ENDIF( ANDROID_BUILD )
|
||||
|
||||
IF ( APPLE_BUILD )
|
||||
SET( MS_COMPILER TURE )
|
||||
|
||||
INCLUDE ( ${CMAKE_MODULE_PATH}/AppleBuildConfig.cmake )
|
||||
ENDIF ( APPLE_BUILD )
|
||||
|
||||
#add subdirectories
|
||||
ADD_SUBDIRECTORY( depends )
|
||||
|
||||
ADD_SUBDIRECTORY( extincludes )
|
||||
|
||||
ADD_SUBDIRECTORY( addons )
|
||||
|
||||
ADD_SUBDIRECTORY( app )
|
||||
|
||||
ADD_SUBDIRECTORY( foundation )
|
||||
|
||||
ADD_SUBDIRECTORY( graphicsystem )
|
||||
|
||||
ADD_SUBDIRECTORY( rendersystem )
|
||||
|
||||
ADD_SUBDIRECTORY( profilesystem )
|
||||
|
||||
ADD_SUBDIRECTORY( players )
|
||||
|
||||
ADD_SUBDIRECTORY( buildingtools )
|
||||
|
||||
ADD_SUBDIRECTORY( packagetool )
|
49
Engine/CMake_And_BuildAndroid.bat
Normal file
|
@ -0,0 +1,49 @@
|
|||
@echo #****************************************************************************
|
||||
@echo Copyright (c) 2011-2013,WebJet Business Division,CYOU
|
||||
@echo
|
||||
@echo http://www.genesis-3d.com.cn
|
||||
@echo
|
||||
@echo Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
@echo of this software and associated documentation files (the "Software"), to deal
|
||||
@echo in the Software without restriction, including without limitation the rights
|
||||
@echo to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
@echo copies of the Software, and to permit persons to whom the Software is
|
||||
@echo furnished to do so, subject to the following conditions:
|
||||
|
||||
@echo The above copyright notice and this permission notice shall be included in
|
||||
@echo all copies or substantial portions of the Software.
|
||||
@echo
|
||||
@echo THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
@echo IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
@echo FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@echo AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
@echo LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
@echo OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
@echo THE SOFTWARE.
|
||||
@echo ****************************************************************************
|
||||
|
||||
|
||||
@rem 根据本机cmake的安装路径,修改cmakeExe变量
|
||||
set cmakeExe="D:\Program Files\cmake-2.8.8-win32-x86\bin\cmake.exe"
|
||||
|
||||
set curPath=%cd%
|
||||
|
||||
set androidBuidPath="My_Android_Build"
|
||||
|
||||
@rem delete the folder first
|
||||
RMDIR /S/Q %androidBuidPath%
|
||||
|
||||
@rem make a directory and put project files to it
|
||||
MKDIR %androidBuidPath%
|
||||
|
||||
@rem entry the directory
|
||||
cd %androidBuidPath%
|
||||
|
||||
%cmakeExe% -G "MinGW Makefiles" -DCMAKE_TOOLCHAIN_FILE:FILEPATH="%curPath%/CMake/AndroidToolChain.cmake" -DANDROID_BUILD:BOOL="1" -DCMAKE_MAKE_PROGRAM="%curPath%\..\..\..\genesis_externals\Externals\NDK\android-ndk-r8b-windows\prebuilt\windows\bin\make.exe" %curPath%
|
||||
@rem %cmakeExe% .
|
||||
|
||||
set var1=becalled
|
||||
call ../StandloneBuildAndroid.bat %var1%
|
||||
|
||||
pause
|
||||
|
41
Engine/CSharpAssembly/RegisterMonoModules.cpp
Normal file
|
@ -0,0 +1,41 @@
|
|||
#include "RegisterMonoModules.h"
|
||||
|
||||
|
||||
#include <string>
|
||||
|
||||
extern "C"
|
||||
{
|
||||
typedef void* gpointer;
|
||||
typedef int gboolean;
|
||||
void mono_dl_register_symbol (const char* name, void *addr);
|
||||
extern int mono_ficall_flag;
|
||||
void mono_aot_register_module(gpointer *aot_info);
|
||||
extern gboolean mono_aot_only;
|
||||
extern gpointer* mono_aot_module_UserDefCSharp_info; // UserDefCSharp.dll
|
||||
extern gpointer* mono_aot_module_Mono_Security_info; // Mono.Security.dll
|
||||
extern gpointer* mono_aot_module_System_info; // System.dll
|
||||
extern gpointer* mono_aot_module_ScriptFrameworkLibrary_info; // ScriptFrameworkLibrary
|
||||
extern gpointer* mono_aot_module_mscorlib_info; // mscorlib.dll
|
||||
extern gpointer* mono_aot_module_ScriptGUILibrary_info; // ScriptGUILibrary.dll
|
||||
extern gpointer* mono_aot_module_ScriptRuntimeLibrary_info; // mscorlib.dll
|
||||
extern gpointer* mono_aot_module_System_Configuration_info; // mscorlib.dll
|
||||
extern gpointer* mono_aot_module_System_Security_info; // mscorlib.dll
|
||||
extern gpointer* mono_aot_module_System_Xml_info; // mscorlib.dll
|
||||
}
|
||||
|
||||
|
||||
void RegisterMonoModules()
|
||||
{
|
||||
mono_aot_only = true;
|
||||
//mono_ficall_flag = true;
|
||||
mono_aot_register_module(mono_aot_module_mscorlib_info);
|
||||
mono_aot_register_module(mono_aot_module_UserDefCSharp_info);
|
||||
mono_aot_register_module(mono_aot_module_Mono_Security_info);
|
||||
mono_aot_register_module(mono_aot_module_System_info);
|
||||
mono_aot_register_module(mono_aot_module_ScriptFrameworkLibrary_info);
|
||||
mono_aot_register_module(mono_aot_module_ScriptGUILibrary_info);
|
||||
mono_aot_register_module(mono_aot_module_ScriptRuntimeLibrary_info);
|
||||
mono_aot_register_module(mono_aot_module_System_Configuration_info);
|
||||
mono_aot_register_module(mono_aot_module_System_Security_info);
|
||||
mono_aot_register_module(mono_aot_module_System_Xml_info);
|
||||
}
|
10
Engine/CSharpAssembly/RegisterMonoModules.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* RegisterMonoModules.h
|
||||
* iPhone-target2
|
||||
*
|
||||
* Created by Renaldas on 8/26/08.
|
||||
* Copyright 2008 __MyCompanyName__. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
void RegisterMonoModules();
|
42
Engine/ExtIncludes/CMakeLists.txt
Normal file
|
@ -0,0 +1,42 @@
|
|||
#****************************************************************************
|
||||
# Copyright (c) 2011-2013,WebJet Business Division,CYOU
|
||||
#
|
||||
# http://www.genesis-3d.com.cn
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
#****************************************************************************
|
||||
|
||||
##################################################################################
|
||||
# extlibs folder
|
||||
##################################################################################
|
||||
|
||||
|
||||
SET ( CMAKE_C_FLAGS_DEBUG "/MTd")
|
||||
SET ( CMAKE_C_FLAGS_EDITOR_DEBUG "/MTd")
|
||||
SET ( CMAKE_C_FLAGS_PROFILE_DEBUG "/MTd")
|
||||
|
||||
SET ( CMAKE_C_FLAGS_RELEASE "/MT")
|
||||
SET ( CMAKE_C_FLAGS_EDITOR_RELEASE "/MT")
|
||||
SET ( CMAKE_C_FLAGS_PROFILE_RELEASE "/MT")
|
||||
|
||||
#add subdirectory
|
||||
|
||||
IF ( ${THIRD_PARTY_BUILD} )
|
||||
|
||||
ENDIF ( ${THIRD_PARTY_BUILD} )
|
1090
Engine/ExtIncludes/FreeImage/FreeImage.h
Normal file
3
Engine/ExtIncludes/FreeImage/ReadMe.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
FreeImage-3.13.1
|
||||
static lib
|
||||
from OgreDependencies_MSVC_20101231
|
330
Engine/ExtIncludes/OpenGLES2.0/ARM/include/EGL/egl.h
Normal file
|
@ -0,0 +1,330 @@
|
|||
/* -*- mode: c; tab-width: 8; -*- */
|
||||
/* vi: set sw=4 ts=8: */
|
||||
/* Reference version of egl.h for EGL 1.4.
|
||||
* $Revision: 7244 $ on $Date: 2009-01-20 17:06:59 -0800 (Tue, 20 Jan 2009) $
|
||||
*/
|
||||
|
||||
/*
|
||||
** Copyright (c) 2007-2009 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
#ifndef __egl_h_
|
||||
#define __egl_h_
|
||||
|
||||
/* All platform-dependent types and macro boilerplate (such as EGLAPI
|
||||
* and EGLAPIENTRY) should go in eglplatform.h.
|
||||
*/
|
||||
#include <EGL/eglplatform.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* EGL Types */
|
||||
/* EGLint is defined in eglplatform.h */
|
||||
typedef unsigned int EGLBoolean;
|
||||
typedef unsigned int EGLenum;
|
||||
typedef void *EGLConfig;
|
||||
typedef void *EGLContext;
|
||||
typedef void *EGLDisplay;
|
||||
typedef void *EGLSurface;
|
||||
typedef void *EGLClientBuffer;
|
||||
|
||||
/* EGL Versioning */
|
||||
#define EGL_VERSION_1_0 1
|
||||
#define EGL_VERSION_1_1 1
|
||||
#define EGL_VERSION_1_2 1
|
||||
#define EGL_VERSION_1_3 1
|
||||
#define EGL_VERSION_1_4 1
|
||||
|
||||
/* EGL Enumerants. Bitmasks and other exceptional cases aside, most
|
||||
* enums are assigned unique values starting at 0x3000.
|
||||
*/
|
||||
|
||||
/* EGL aliases */
|
||||
#define EGL_FALSE 0
|
||||
#define EGL_TRUE 1
|
||||
|
||||
/* Out-of-band handle values */
|
||||
#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0)
|
||||
#define EGL_NO_CONTEXT ((EGLContext)0)
|
||||
#define EGL_NO_DISPLAY ((EGLDisplay)0)
|
||||
#define EGL_NO_SURFACE ((EGLSurface)0)
|
||||
|
||||
/* Out-of-band attribute value */
|
||||
#define EGL_DONT_CARE ((EGLint)-1)
|
||||
|
||||
/* Errors / GetError return values */
|
||||
#define EGL_SUCCESS 0x3000
|
||||
#define EGL_NOT_INITIALIZED 0x3001
|
||||
#define EGL_BAD_ACCESS 0x3002
|
||||
#define EGL_BAD_ALLOC 0x3003
|
||||
#define EGL_BAD_ATTRIBUTE 0x3004
|
||||
#define EGL_BAD_CONFIG 0x3005
|
||||
#define EGL_BAD_CONTEXT 0x3006
|
||||
#define EGL_BAD_CURRENT_SURFACE 0x3007
|
||||
#define EGL_BAD_DISPLAY 0x3008
|
||||
#define EGL_BAD_MATCH 0x3009
|
||||
#define EGL_BAD_NATIVE_PIXMAP 0x300A
|
||||
#define EGL_BAD_NATIVE_WINDOW 0x300B
|
||||
#define EGL_BAD_PARAMETER 0x300C
|
||||
#define EGL_BAD_SURFACE 0x300D
|
||||
#define EGL_CONTEXT_LOST 0x300E /* EGL 1.1 - IMG_power_management */
|
||||
|
||||
/* Reserved 0x300F-0x301F for additional errors */
|
||||
|
||||
/* Config attributes */
|
||||
#define EGL_BUFFER_SIZE 0x3020
|
||||
#define EGL_ALPHA_SIZE 0x3021
|
||||
#define EGL_BLUE_SIZE 0x3022
|
||||
#define EGL_GREEN_SIZE 0x3023
|
||||
#define EGL_RED_SIZE 0x3024
|
||||
#define EGL_DEPTH_SIZE 0x3025
|
||||
#define EGL_STENCIL_SIZE 0x3026
|
||||
#define EGL_CONFIG_CAVEAT 0x3027
|
||||
#define EGL_CONFIG_ID 0x3028
|
||||
#define EGL_LEVEL 0x3029
|
||||
#define EGL_MAX_PBUFFER_HEIGHT 0x302A
|
||||
#define EGL_MAX_PBUFFER_PIXELS 0x302B
|
||||
#define EGL_MAX_PBUFFER_WIDTH 0x302C
|
||||
#define EGL_NATIVE_RENDERABLE 0x302D
|
||||
#define EGL_NATIVE_VISUAL_ID 0x302E
|
||||
#define EGL_NATIVE_VISUAL_TYPE 0x302F
|
||||
#define EGL_PRESERVED_RESOURCES 0x3030
|
||||
#define EGL_SAMPLES 0x3031
|
||||
#define EGL_SAMPLE_BUFFERS 0x3032
|
||||
#define EGL_SURFACE_TYPE 0x3033
|
||||
#define EGL_TRANSPARENT_TYPE 0x3034
|
||||
#define EGL_TRANSPARENT_BLUE_VALUE 0x3035
|
||||
#define EGL_TRANSPARENT_GREEN_VALUE 0x3036
|
||||
#define EGL_TRANSPARENT_RED_VALUE 0x3037
|
||||
#define EGL_NONE 0x3038 /* Attrib list terminator */
|
||||
#define EGL_BIND_TO_TEXTURE_RGB 0x3039
|
||||
#define EGL_BIND_TO_TEXTURE_RGBA 0x303A
|
||||
#define EGL_MIN_SWAP_INTERVAL 0x303B
|
||||
#define EGL_MAX_SWAP_INTERVAL 0x303C
|
||||
#define EGL_LUMINANCE_SIZE 0x303D
|
||||
#define EGL_ALPHA_MASK_SIZE 0x303E
|
||||
#define EGL_COLOR_BUFFER_TYPE 0x303F
|
||||
#define EGL_RENDERABLE_TYPE 0x3040
|
||||
#define EGL_MATCH_NATIVE_PIXMAP 0x3041 /* Pseudo-attribute (not queryable) */
|
||||
#define EGL_CONFORMANT 0x3042
|
||||
|
||||
/* Reserved 0x3041-0x304F for additional config attributes */
|
||||
|
||||
/* Config attribute values */
|
||||
#define EGL_SLOW_CONFIG 0x3050 /* EGL_CONFIG_CAVEAT value */
|
||||
#define EGL_NON_CONFORMANT_CONFIG 0x3051 /* EGL_CONFIG_CAVEAT value */
|
||||
#define EGL_TRANSPARENT_RGB 0x3052 /* EGL_TRANSPARENT_TYPE value */
|
||||
#define EGL_RGB_BUFFER 0x308E /* EGL_COLOR_BUFFER_TYPE value */
|
||||
#define EGL_LUMINANCE_BUFFER 0x308F /* EGL_COLOR_BUFFER_TYPE value */
|
||||
|
||||
/* More config attribute values, for EGL_TEXTURE_FORMAT */
|
||||
#define EGL_NO_TEXTURE 0x305C
|
||||
#define EGL_TEXTURE_RGB 0x305D
|
||||
#define EGL_TEXTURE_RGBA 0x305E
|
||||
#define EGL_TEXTURE_2D 0x305F
|
||||
|
||||
/* Config attribute mask bits */
|
||||
#define EGL_PBUFFER_BIT 0x0001 /* EGL_SURFACE_TYPE mask bits */
|
||||
#define EGL_PIXMAP_BIT 0x0002 /* EGL_SURFACE_TYPE mask bits */
|
||||
#define EGL_WINDOW_BIT 0x0004 /* EGL_SURFACE_TYPE mask bits */
|
||||
#define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020 /* EGL_SURFACE_TYPE mask bits */
|
||||
#define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040 /* EGL_SURFACE_TYPE mask bits */
|
||||
#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200 /* EGL_SURFACE_TYPE mask bits */
|
||||
#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400 /* EGL_SURFACE_TYPE mask bits */
|
||||
|
||||
#define EGL_OPENGL_ES_BIT 0x0001 /* EGL_RENDERABLE_TYPE mask bits */
|
||||
#define EGL_OPENVG_BIT 0x0002 /* EGL_RENDERABLE_TYPE mask bits */
|
||||
#define EGL_OPENGL_ES2_BIT 0x0004 /* EGL_RENDERABLE_TYPE mask bits */
|
||||
#define EGL_OPENGL_BIT 0x0008 /* EGL_RENDERABLE_TYPE mask bits */
|
||||
|
||||
/* QueryString targets */
|
||||
#define EGL_VENDOR 0x3053
|
||||
#define EGL_VERSION 0x3054
|
||||
#define EGL_EXTENSIONS 0x3055
|
||||
#define EGL_CLIENT_APIS 0x308D
|
||||
|
||||
/* QuerySurface / SurfaceAttrib / CreatePbufferSurface targets */
|
||||
#define EGL_HEIGHT 0x3056
|
||||
#define EGL_WIDTH 0x3057
|
||||
#define EGL_LARGEST_PBUFFER 0x3058
|
||||
#define EGL_TEXTURE_FORMAT 0x3080
|
||||
#define EGL_TEXTURE_TARGET 0x3081
|
||||
#define EGL_MIPMAP_TEXTURE 0x3082
|
||||
#define EGL_MIPMAP_LEVEL 0x3083
|
||||
#define EGL_RENDER_BUFFER 0x3086
|
||||
#define EGL_VG_COLORSPACE 0x3087
|
||||
#define EGL_VG_ALPHA_FORMAT 0x3088
|
||||
#define EGL_HORIZONTAL_RESOLUTION 0x3090
|
||||
#define EGL_VERTICAL_RESOLUTION 0x3091
|
||||
#define EGL_PIXEL_ASPECT_RATIO 0x3092
|
||||
#define EGL_SWAP_BEHAVIOR 0x3093
|
||||
#define EGL_MULTISAMPLE_RESOLVE 0x3099
|
||||
|
||||
/* EGL_RENDER_BUFFER values / BindTexImage / ReleaseTexImage buffer targets */
|
||||
#define EGL_BACK_BUFFER 0x3084
|
||||
#define EGL_SINGLE_BUFFER 0x3085
|
||||
|
||||
/* OpenVG color spaces */
|
||||
#define EGL_VG_COLORSPACE_sRGB 0x3089 /* EGL_VG_COLORSPACE value */
|
||||
#define EGL_VG_COLORSPACE_LINEAR 0x308A /* EGL_VG_COLORSPACE value */
|
||||
|
||||
/* OpenVG alpha formats */
|
||||
#define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B /* EGL_ALPHA_FORMAT value */
|
||||
#define EGL_VG_ALPHA_FORMAT_PRE 0x308C /* EGL_ALPHA_FORMAT value */
|
||||
|
||||
/* Constant scale factor by which fractional display resolutions &
|
||||
* aspect ratio are scaled when queried as integer values.
|
||||
*/
|
||||
#define EGL_DISPLAY_SCALING 10000
|
||||
|
||||
/* Unknown display resolution/aspect ratio */
|
||||
#define EGL_UNKNOWN ((EGLint)-1)
|
||||
|
||||
/* Back buffer swap behaviors */
|
||||
#define EGL_BUFFER_PRESERVED 0x3094 /* EGL_SWAP_BEHAVIOR value */
|
||||
#define EGL_BUFFER_DESTROYED 0x3095 /* EGL_SWAP_BEHAVIOR value */
|
||||
|
||||
/* CreatePbufferFromClientBuffer buffer types */
|
||||
#define EGL_OPENVG_IMAGE 0x3096
|
||||
|
||||
/* QueryContext targets */
|
||||
#define EGL_CONTEXT_CLIENT_TYPE 0x3097
|
||||
|
||||
/* CreateContext attributes */
|
||||
#define EGL_CONTEXT_CLIENT_VERSION 0x3098
|
||||
|
||||
/* Multisample resolution behaviors */
|
||||
#define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A /* EGL_MULTISAMPLE_RESOLVE value */
|
||||
#define EGL_MULTISAMPLE_RESOLVE_BOX 0x309B /* EGL_MULTISAMPLE_RESOLVE value */
|
||||
|
||||
/* BindAPI/QueryAPI targets */
|
||||
#define EGL_OPENGL_ES_API 0x30A0
|
||||
#define EGL_OPENVG_API 0x30A1
|
||||
#define EGL_OPENGL_API 0x30A2
|
||||
|
||||
/* GetCurrentSurface targets */
|
||||
#define EGL_DRAW 0x3059
|
||||
#define EGL_READ 0x305A
|
||||
|
||||
/* WaitNative engines */
|
||||
#define EGL_CORE_NATIVE_ENGINE 0x305B
|
||||
|
||||
/* EGL 1.2 tokens renamed for consistency in EGL 1.3 */
|
||||
#define EGL_COLORSPACE EGL_VG_COLORSPACE
|
||||
#define EGL_ALPHA_FORMAT EGL_VG_ALPHA_FORMAT
|
||||
#define EGL_COLORSPACE_sRGB EGL_VG_COLORSPACE_sRGB
|
||||
#define EGL_COLORSPACE_LINEAR EGL_VG_COLORSPACE_LINEAR
|
||||
#define EGL_ALPHA_FORMAT_NONPRE EGL_VG_ALPHA_FORMAT_NONPRE
|
||||
#define EGL_ALPHA_FORMAT_PRE EGL_VG_ALPHA_FORMAT_PRE
|
||||
|
||||
/* EGL extensions must request enum blocks from the Khronos
|
||||
* API Registrar, who maintains the enumerant registry. Submit
|
||||
* a bug in Khronos Bugzilla against task "Registry".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/* EGL Functions */
|
||||
|
||||
EGLAPI EGLint EGLAPIENTRY eglGetError(void);
|
||||
|
||||
EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy);
|
||||
|
||||
EGLAPI const char * EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name);
|
||||
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy, EGLConfig *configs,
|
||||
EGLint config_size, EGLint *num_config);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list,
|
||||
EGLConfig *configs, EGLint config_size,
|
||||
EGLint *num_config);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config,
|
||||
EGLint attribute, EGLint *value);
|
||||
|
||||
EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config,
|
||||
EGLNativeWindowType win,
|
||||
const EGLint *attrib_list);
|
||||
EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config,
|
||||
const EGLint *attrib_list);
|
||||
EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config,
|
||||
EGLNativePixmapType pixmap,
|
||||
const EGLint *attrib_list);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy, EGLSurface surface);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy, EGLSurface surface,
|
||||
EGLint attribute, EGLint *value);
|
||||
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api);
|
||||
EGLAPI EGLenum EGLAPIENTRY eglQueryAPI(void);
|
||||
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient(void);
|
||||
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread(void);
|
||||
|
||||
EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer(
|
||||
EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,
|
||||
EGLConfig config, const EGLint *attrib_list);
|
||||
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface,
|
||||
EGLint attribute, EGLint value);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
|
||||
|
||||
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval);
|
||||
|
||||
|
||||
EGLAPI EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy, EGLConfig config,
|
||||
EGLContext share_context,
|
||||
const EGLint *attrib_list);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy, EGLSurface draw,
|
||||
EGLSurface read, EGLContext ctx);
|
||||
|
||||
EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext(void);
|
||||
EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface(EGLint readdraw);
|
||||
EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay(void);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext(EGLDisplay dpy, EGLContext ctx,
|
||||
EGLint attribute, EGLint *value);
|
||||
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL(void);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface,
|
||||
EGLNativePixmapType target);
|
||||
|
||||
/* This is a generic function pointer type, whose name indicates it must
|
||||
* be cast to the proper type *and calling convention* before use.
|
||||
*/
|
||||
typedef void (*__eglMustCastToProperFunctionPointerType)(void);
|
||||
|
||||
/* Now, define eglGetProcAddress using the generic function ptr. type */
|
||||
EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY
|
||||
eglGetProcAddress(const char *procname);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __egl_h_ */
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* $Copyright:
|
||||
* ----------------------------------------------------------------
|
||||
* This confidential and proprietary software may be used only as
|
||||
* authorised by a licensing agreement from ARM Limited
|
||||
* (C) COPYRIGHT 2008 ARM Limited
|
||||
* ALL RIGHTS RESERVED
|
||||
* The entire notice above must be reproduced on all authorised
|
||||
* copies and copies may only be made to the extent permitted
|
||||
* by a licensing agreement from ARM Limited.
|
||||
* $
|
||||
*
|
||||
* egl_native_types.h - EGL Native types definitions for use with
|
||||
* OpenGL ES 2.O Emulation library
|
||||
*/
|
||||
#ifndef _EGL_NATIVE_TYPES_H_
|
||||
#define _EGL_NATIVE_TYPES_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef INT32 int32_t;
|
||||
|
||||
typedef HDC NativeDisplayType;
|
||||
typedef HBITMAP NativePixmapType;
|
||||
typedef HWND NativeWindowType;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _EGL_NATIVE_TYPES_H_ */
|
138
Engine/ExtIncludes/OpenGLES2.0/ARM/include/EGL/eglext.h
Normal file
|
@ -0,0 +1,138 @@
|
|||
#ifndef __eglext_h_
|
||||
#define __eglext_h_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2007-2009 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
#include <EGL/eglplatform.h>
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
/* Header file version number */
|
||||
/* Current version at http://www.khronos.org/registry/egl/ */
|
||||
/* $Revision: 7244 $ on $Date: 2009-01-20 17:06:59 -0800 (Tue, 20 Jan 2009) $ */
|
||||
#define EGL_EGLEXT_VERSION 3
|
||||
|
||||
#ifndef EGL_KHR_config_attribs
|
||||
#define EGL_KHR_config_attribs 1
|
||||
#define EGL_CONFORMANT_KHR 0x3042 /* EGLConfig attribute */
|
||||
#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR 0x0020 /* EGL_SURFACE_TYPE bitfield */
|
||||
#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR 0x0040 /* EGL_SURFACE_TYPE bitfield */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_lock_surface
|
||||
#define EGL_KHR_lock_surface 1
|
||||
#define EGL_READ_SURFACE_BIT_KHR 0x0001 /* EGL_LOCK_USAGE_HINT_KHR bitfield */
|
||||
#define EGL_WRITE_SURFACE_BIT_KHR 0x0002 /* EGL_LOCK_USAGE_HINT_KHR bitfield */
|
||||
#define EGL_LOCK_SURFACE_BIT_KHR 0x0080 /* EGL_SURFACE_TYPE bitfield */
|
||||
#define EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100 /* EGL_SURFACE_TYPE bitfield */
|
||||
#define EGL_MATCH_FORMAT_KHR 0x3043 /* EGLConfig attribute */
|
||||
#define EGL_FORMAT_RGB_565_EXACT_KHR 0x30C0 /* EGL_MATCH_FORMAT_KHR value */
|
||||
#define EGL_FORMAT_RGB_565_KHR 0x30C1 /* EGL_MATCH_FORMAT_KHR value */
|
||||
#define EGL_FORMAT_RGBA_8888_EXACT_KHR 0x30C2 /* EGL_MATCH_FORMAT_KHR value */
|
||||
#define EGL_FORMAT_RGBA_8888_KHR 0x30C3 /* EGL_MATCH_FORMAT_KHR value */
|
||||
#define EGL_MAP_PRESERVE_PIXELS_KHR 0x30C4 /* eglLockSurfaceKHR attribute */
|
||||
#define EGL_LOCK_USAGE_HINT_KHR 0x30C5 /* eglLockSurfaceKHR attribute */
|
||||
#define EGL_BITMAP_POINTER_KHR 0x30C6 /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_PITCH_KHR 0x30C7 /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_ORIGIN_KHR 0x30C8 /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR 0x30C9 /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR 0x30CB /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD /* eglQuerySurface attribute */
|
||||
#define EGL_LOWER_LEFT_KHR 0x30CE /* EGL_BITMAP_ORIGIN_KHR value */
|
||||
#define EGL_UPPER_LEFT_KHR 0x30CF /* EGL_BITMAP_ORIGIN_KHR value */
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay display, EGLSurface surface);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface);
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_image
|
||||
#define EGL_KHR_image 1
|
||||
#define EGL_NATIVE_PIXMAP_KHR 0x30B0 /* eglCreateImageKHR target */
|
||||
typedef void *EGLImageKHR;
|
||||
#define EGL_NO_IMAGE_KHR ((EGLImageKHR)0)
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image);
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_vg_parent_image
|
||||
#define EGL_KHR_vg_parent_image 1
|
||||
#define EGL_VG_PARENT_IMAGE_KHR 0x30BA /* eglCreateImageKHR target */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_gl_texture_2D_image
|
||||
#define EGL_KHR_gl_texture_2D_image 1
|
||||
#define EGL_GL_TEXTURE_2D_KHR 0x30B1 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC /* eglCreateImageKHR attribute */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_gl_texture_cubemap_image
|
||||
#define EGL_KHR_gl_texture_cubemap_image 1
|
||||
#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8 /* eglCreateImageKHR target */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_gl_texture_3D_image
|
||||
#define EGL_KHR_gl_texture_3D_image 1
|
||||
#define EGL_GL_TEXTURE_3D_KHR 0x30B2 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD /* eglCreateImageKHR attribute */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_gl_renderbuffer_image
|
||||
#define EGL_KHR_gl_renderbuffer_image 1
|
||||
#define EGL_GL_RENDERBUFFER_KHR 0x30B9 /* eglCreateImageKHR target */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_image_base
|
||||
#define EGL_KHR_image_base 1
|
||||
/* Most interfaces defined by EGL_KHR_image_pixmap above */
|
||||
#define EGL_IMAGE_PRESERVED_KHR 0x30D2 /* eglCreateImageKHR attribute */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_image_pixmap
|
||||
#define EGL_KHR_image_pixmap 1
|
||||
/* Interfaces defined by EGL_KHR_image above */
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
104
Engine/ExtIncludes/OpenGLES2.0/ARM/include/EGL/eglplatform.h
Normal file
|
@ -0,0 +1,104 @@
|
|||
/*
|
||||
* $Copyright:
|
||||
* ----------------------------------------------------------------
|
||||
* This confidential and proprietary software may be used only as
|
||||
* authorised by a licensing agreement from ARM Limited
|
||||
* (C) COPYRIGHT 2009 ARM Limited
|
||||
* ALL RIGHTS RESERVED
|
||||
* The entire notice above must be reproduced on all authorised
|
||||
* copies and copies may only be made to the extent permitted
|
||||
* by a licensing agreement from ARM Limited.
|
||||
* $
|
||||
*/
|
||||
|
||||
/* -*- mode: c; tab-width: 8; -*- */
|
||||
/* vi: set sw=4 ts=8: */
|
||||
/* Platform-specific types and definitions for egl.h */
|
||||
|
||||
#ifndef __eglplatform_h_
|
||||
#define __eglplatform_h_
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
/* Macros used in EGL function prototype declarations.
|
||||
*
|
||||
* EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
|
||||
* typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
|
||||
*
|
||||
* On Windows, EGLAPIENTRY can be defined like APIENTRY.
|
||||
* On most other platforms, it should be empty.
|
||||
*/
|
||||
|
||||
#ifndef EGLAPI
|
||||
# if (defined(_WIN32) || defined(__VC32__)) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
|
||||
# define EGLAPI __declspec(dllimport)
|
||||
# elif defined (__SYMBIAN32__) /* Symbian */
|
||||
# define EGLAPI IMPORT_C
|
||||
# else
|
||||
# define EGLAPI
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if (defined(_WIN32) || defined(__VC32__)) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) && !defined(_WIN32_WCE) /* Win32 */
|
||||
#define EGLAPIENTRY __stdcall
|
||||
#else
|
||||
#define EGLAPIENTRY
|
||||
#endif
|
||||
|
||||
#define EGLAPIENTRYP EGLAPIENTRY *
|
||||
|
||||
/* The types NativeDisplayType, NativeWindowType, and NativePixmapType
|
||||
* are aliases of window-system-dependent types, such as X Display * or
|
||||
* Windows Device Context. They must be defined in platform-specific
|
||||
* code below. The EGL-prefixed versions of Native*Type are the same
|
||||
* types, renamed in EGL 1.3 so all types in the API start with "EGL".
|
||||
*/
|
||||
|
||||
#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN 1
|
||||
#endif
|
||||
#include <windows.h>
|
||||
|
||||
typedef HDC NativeDisplayType;
|
||||
typedef HBITMAP NativePixmapType;
|
||||
typedef HWND NativeWindowType;
|
||||
|
||||
#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */
|
||||
|
||||
typedef int NativeDisplayType;
|
||||
typedef void *NativeWindowType;
|
||||
typedef void *NativePixmapType;
|
||||
|
||||
#elif defined(__unix__)
|
||||
|
||||
/* X11 (tentative) */
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
typedef Display *NativeDisplayType;
|
||||
typedef Pixmap NativePixmapType;
|
||||
typedef Window NativeWindowType;
|
||||
|
||||
#else
|
||||
#error "Platform not recognized"
|
||||
#endif
|
||||
|
||||
/* EGL 1.2 types, renamed for consistency in EGL 1.3 */
|
||||
typedef NativeDisplayType EGLNativeDisplayType;
|
||||
typedef NativePixmapType EGLNativePixmapType;
|
||||
typedef NativeWindowType EGLNativeWindowType;
|
||||
|
||||
/* Obtain int32_t for egl.h */
|
||||
#if (defined(__STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L) || defined(__GNUC__)
|
||||
#include <stdint.h>
|
||||
#elif (defined(_WIN32) || defined(__VC32__)) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
|
||||
#include <windows.h>
|
||||
typedef INT32 int32_t;
|
||||
#else
|
||||
typedef int int32_t;
|
||||
#endif
|
||||
|
||||
typedef int32_t EGLint;
|
||||
|
||||
#endif /* __eglplatform_h */
|
769
Engine/ExtIncludes/OpenGLES2.0/ARM/include/GLES/gl.h
Normal file
|
@ -0,0 +1,769 @@
|
|||
#ifndef __gl_h_
|
||||
#define __gl_h_
|
||||
|
||||
/* $Revision: 7172 $ on $Date:: 2009-01-09 11:17:41 -0800 #$ */
|
||||
|
||||
#include <GLES/glplatform.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This document is licensed under the SGI Free Software B License Version
|
||||
* 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
|
||||
*/
|
||||
|
||||
typedef void GLvoid;
|
||||
typedef unsigned int GLenum;
|
||||
typedef unsigned char GLboolean;
|
||||
typedef unsigned int GLbitfield;
|
||||
typedef khronos_int8_t GLbyte;
|
||||
typedef short GLshort;
|
||||
typedef int GLint;
|
||||
typedef int GLsizei;
|
||||
typedef khronos_uint8_t GLubyte;
|
||||
typedef unsigned short GLushort;
|
||||
typedef unsigned int GLuint;
|
||||
typedef khronos_float_t GLfloat;
|
||||
typedef khronos_float_t GLclampf;
|
||||
typedef khronos_int32_t GLfixed;
|
||||
typedef khronos_int32_t GLclampx;
|
||||
|
||||
typedef khronos_intptr_t GLintptr;
|
||||
typedef khronos_ssize_t GLsizeiptr;
|
||||
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
/* OpenGL ES core versions */
|
||||
#define GL_VERSION_ES_CM_1_0 1
|
||||
#define GL_VERSION_ES_CL_1_0 1
|
||||
#define GL_VERSION_ES_CM_1_1 1
|
||||
#define GL_VERSION_ES_CL_1_1 1
|
||||
|
||||
/* ClearBufferMask */
|
||||
#define GL_DEPTH_BUFFER_BIT 0x00000100
|
||||
#define GL_STENCIL_BUFFER_BIT 0x00000400
|
||||
#define GL_COLOR_BUFFER_BIT 0x00004000
|
||||
|
||||
/* Boolean */
|
||||
#define GL_FALSE 0
|
||||
#define GL_TRUE 1
|
||||
|
||||
/* BeginMode */
|
||||
#define GL_POINTS 0x0000
|
||||
#define GL_LINES 0x0001
|
||||
#define GL_LINE_LOOP 0x0002
|
||||
#define GL_LINE_STRIP 0x0003
|
||||
#define GL_TRIANGLES 0x0004
|
||||
#define GL_TRIANGLE_STRIP 0x0005
|
||||
#define GL_TRIANGLE_FAN 0x0006
|
||||
|
||||
/* AlphaFunction */
|
||||
#define GL_NEVER 0x0200
|
||||
#define GL_LESS 0x0201
|
||||
#define GL_EQUAL 0x0202
|
||||
#define GL_LEQUAL 0x0203
|
||||
#define GL_GREATER 0x0204
|
||||
#define GL_NOTEQUAL 0x0205
|
||||
#define GL_GEQUAL 0x0206
|
||||
#define GL_ALWAYS 0x0207
|
||||
|
||||
/* BlendingFactorDest */
|
||||
#define GL_ZERO 0
|
||||
#define GL_ONE 1
|
||||
#define GL_SRC_COLOR 0x0300
|
||||
#define GL_ONE_MINUS_SRC_COLOR 0x0301
|
||||
#define GL_SRC_ALPHA 0x0302
|
||||
#define GL_ONE_MINUS_SRC_ALPHA 0x0303
|
||||
#define GL_DST_ALPHA 0x0304
|
||||
#define GL_ONE_MINUS_DST_ALPHA 0x0305
|
||||
|
||||
/* BlendingFactorSrc */
|
||||
/* GL_ZERO */
|
||||
/* GL_ONE */
|
||||
#define GL_DST_COLOR 0x0306
|
||||
#define GL_ONE_MINUS_DST_COLOR 0x0307
|
||||
#define GL_SRC_ALPHA_SATURATE 0x0308
|
||||
/* GL_SRC_ALPHA */
|
||||
/* GL_ONE_MINUS_SRC_ALPHA */
|
||||
/* GL_DST_ALPHA */
|
||||
/* GL_ONE_MINUS_DST_ALPHA */
|
||||
|
||||
/* ClipPlaneName */
|
||||
#define GL_CLIP_PLANE0 0x3000
|
||||
#define GL_CLIP_PLANE1 0x3001
|
||||
#define GL_CLIP_PLANE2 0x3002
|
||||
#define GL_CLIP_PLANE3 0x3003
|
||||
#define GL_CLIP_PLANE4 0x3004
|
||||
#define GL_CLIP_PLANE5 0x3005
|
||||
|
||||
/* ColorMaterialFace */
|
||||
/* GL_FRONT_AND_BACK */
|
||||
|
||||
/* ColorMaterialParameter */
|
||||
/* GL_AMBIENT_AND_DIFFUSE */
|
||||
|
||||
/* ColorPointerType */
|
||||
/* GL_UNSIGNED_BYTE */
|
||||
/* GL_FLOAT */
|
||||
/* GL_FIXED */
|
||||
|
||||
/* CullFaceMode */
|
||||
#define GL_FRONT 0x0404
|
||||
#define GL_BACK 0x0405
|
||||
#define GL_FRONT_AND_BACK 0x0408
|
||||
|
||||
/* DepthFunction */
|
||||
/* GL_NEVER */
|
||||
/* GL_LESS */
|
||||
/* GL_EQUAL */
|
||||
/* GL_LEQUAL */
|
||||
/* GL_GREATER */
|
||||
/* GL_NOTEQUAL */
|
||||
/* GL_GEQUAL */
|
||||
/* GL_ALWAYS */
|
||||
|
||||
/* EnableCap */
|
||||
#define GL_FOG 0x0B60
|
||||
#define GL_LIGHTING 0x0B50
|
||||
#define GL_TEXTURE_2D 0x0DE1
|
||||
#define GL_CULL_FACE 0x0B44
|
||||
#define GL_ALPHA_TEST 0x0BC0
|
||||
#define GL_BLEND 0x0BE2
|
||||
#define GL_COLOR_LOGIC_OP 0x0BF2
|
||||
#define GL_DITHER 0x0BD0
|
||||
#define GL_STENCIL_TEST 0x0B90
|
||||
#define GL_DEPTH_TEST 0x0B71
|
||||
/* GL_LIGHT0 */
|
||||
/* GL_LIGHT1 */
|
||||
/* GL_LIGHT2 */
|
||||
/* GL_LIGHT3 */
|
||||
/* GL_LIGHT4 */
|
||||
/* GL_LIGHT5 */
|
||||
/* GL_LIGHT6 */
|
||||
/* GL_LIGHT7 */
|
||||
#define GL_POINT_SMOOTH 0x0B10
|
||||
#define GL_LINE_SMOOTH 0x0B20
|
||||
#define GL_SCISSOR_TEST 0x0C11
|
||||
#define GL_COLOR_MATERIAL 0x0B57
|
||||
#define GL_NORMALIZE 0x0BA1
|
||||
#define GL_RESCALE_NORMAL 0x803A
|
||||
#define GL_POLYGON_OFFSET_FILL 0x8037
|
||||
#define GL_VERTEX_ARRAY 0x8074
|
||||
#define GL_NORMAL_ARRAY 0x8075
|
||||
#define GL_COLOR_ARRAY 0x8076
|
||||
#define GL_TEXTURE_COORD_ARRAY 0x8078
|
||||
#define GL_MULTISAMPLE 0x809D
|
||||
#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
|
||||
#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
|
||||
#define GL_SAMPLE_COVERAGE 0x80A0
|
||||
|
||||
/* ErrorCode */
|
||||
#define GL_NO_ERROR 0
|
||||
#define GL_INVALID_ENUM 0x0500
|
||||
#define GL_INVALID_VALUE 0x0501
|
||||
#define GL_INVALID_OPERATION 0x0502
|
||||
#define GL_STACK_OVERFLOW 0x0503
|
||||
#define GL_STACK_UNDERFLOW 0x0504
|
||||
#define GL_OUT_OF_MEMORY 0x0505
|
||||
|
||||
/* FogMode */
|
||||
/* GL_LINEAR */
|
||||
#define GL_EXP 0x0800
|
||||
#define GL_EXP2 0x0801
|
||||
|
||||
/* FogParameter */
|
||||
#define GL_FOG_DENSITY 0x0B62
|
||||
#define GL_FOG_START 0x0B63
|
||||
#define GL_FOG_END 0x0B64
|
||||
#define GL_FOG_MODE 0x0B65
|
||||
#define GL_FOG_COLOR 0x0B66
|
||||
|
||||
/* FrontFaceDirection */
|
||||
#define GL_CW 0x0900
|
||||
#define GL_CCW 0x0901
|
||||
|
||||
/* GetPName */
|
||||
#define GL_CURRENT_COLOR 0x0B00
|
||||
#define GL_CURRENT_NORMAL 0x0B02
|
||||
#define GL_CURRENT_TEXTURE_COORDS 0x0B03
|
||||
#define GL_POINT_SIZE 0x0B11
|
||||
#define GL_POINT_SIZE_MIN 0x8126
|
||||
#define GL_POINT_SIZE_MAX 0x8127
|
||||
#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
|
||||
#define GL_POINT_DISTANCE_ATTENUATION 0x8129
|
||||
#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
|
||||
#define GL_LINE_WIDTH 0x0B21
|
||||
#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
|
||||
#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
|
||||
#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
|
||||
#define GL_CULL_FACE_MODE 0x0B45
|
||||
#define GL_FRONT_FACE 0x0B46
|
||||
#define GL_SHADE_MODEL 0x0B54
|
||||
#define GL_DEPTH_RANGE 0x0B70
|
||||
#define GL_DEPTH_WRITEMASK 0x0B72
|
||||
#define GL_DEPTH_CLEAR_VALUE 0x0B73
|
||||
#define GL_DEPTH_FUNC 0x0B74
|
||||
#define GL_STENCIL_CLEAR_VALUE 0x0B91
|
||||
#define GL_STENCIL_FUNC 0x0B92
|
||||
#define GL_STENCIL_VALUE_MASK 0x0B93
|
||||
#define GL_STENCIL_FAIL 0x0B94
|
||||
#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
|
||||
#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
|
||||
#define GL_STENCIL_REF 0x0B97
|
||||
#define GL_STENCIL_WRITEMASK 0x0B98
|
||||
#define GL_MATRIX_MODE 0x0BA0
|
||||
#define GL_VIEWPORT 0x0BA2
|
||||
#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
|
||||
#define GL_PROJECTION_STACK_DEPTH 0x0BA4
|
||||
#define GL_TEXTURE_STACK_DEPTH 0x0BA5
|
||||
#define GL_MODELVIEW_MATRIX 0x0BA6
|
||||
#define GL_PROJECTION_MATRIX 0x0BA7
|
||||
#define GL_TEXTURE_MATRIX 0x0BA8
|
||||
#define GL_ALPHA_TEST_FUNC 0x0BC1
|
||||
#define GL_ALPHA_TEST_REF 0x0BC2
|
||||
#define GL_BLEND_DST 0x0BE0
|
||||
#define GL_BLEND_SRC 0x0BE1
|
||||
#define GL_LOGIC_OP_MODE 0x0BF0
|
||||
#define GL_SCISSOR_BOX 0x0C10
|
||||
#define GL_SCISSOR_TEST 0x0C11
|
||||
#define GL_COLOR_CLEAR_VALUE 0x0C22
|
||||
#define GL_COLOR_WRITEMASK 0x0C23
|
||||
#define GL_UNPACK_ALIGNMENT 0x0CF5
|
||||
#define GL_PACK_ALIGNMENT 0x0D05
|
||||
#define GL_MAX_LIGHTS 0x0D31
|
||||
#define GL_MAX_CLIP_PLANES 0x0D32
|
||||
#define GL_MAX_TEXTURE_SIZE 0x0D33
|
||||
#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
|
||||
#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
|
||||
#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
|
||||
#define GL_MAX_VIEWPORT_DIMS 0x0D3A
|
||||
#define GL_MAX_TEXTURE_UNITS 0x84E2
|
||||
#define GL_SUBPIXEL_BITS 0x0D50
|
||||
#define GL_RED_BITS 0x0D52
|
||||
#define GL_GREEN_BITS 0x0D53
|
||||
#define GL_BLUE_BITS 0x0D54
|
||||
#define GL_ALPHA_BITS 0x0D55
|
||||
#define GL_DEPTH_BITS 0x0D56
|
||||
#define GL_STENCIL_BITS 0x0D57
|
||||
#define GL_POLYGON_OFFSET_UNITS 0x2A00
|
||||
#define GL_POLYGON_OFFSET_FILL 0x8037
|
||||
#define GL_POLYGON_OFFSET_FACTOR 0x8038
|
||||
#define GL_TEXTURE_BINDING_2D 0x8069
|
||||
#define GL_VERTEX_ARRAY_SIZE 0x807A
|
||||
#define GL_VERTEX_ARRAY_TYPE 0x807B
|
||||
#define GL_VERTEX_ARRAY_STRIDE 0x807C
|
||||
#define GL_NORMAL_ARRAY_TYPE 0x807E
|
||||
#define GL_NORMAL_ARRAY_STRIDE 0x807F
|
||||
#define GL_COLOR_ARRAY_SIZE 0x8081
|
||||
#define GL_COLOR_ARRAY_TYPE 0x8082
|
||||
#define GL_COLOR_ARRAY_STRIDE 0x8083
|
||||
#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
|
||||
#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
|
||||
#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
|
||||
#define GL_VERTEX_ARRAY_POINTER 0x808E
|
||||
#define GL_NORMAL_ARRAY_POINTER 0x808F
|
||||
#define GL_COLOR_ARRAY_POINTER 0x8090
|
||||
#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
|
||||
#define GL_SAMPLE_BUFFERS 0x80A8
|
||||
#define GL_SAMPLES 0x80A9
|
||||
#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
|
||||
#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
|
||||
|
||||
/* GetTextureParameter */
|
||||
/* GL_TEXTURE_MAG_FILTER */
|
||||
/* GL_TEXTURE_MIN_FILTER */
|
||||
/* GL_TEXTURE_WRAP_S */
|
||||
/* GL_TEXTURE_WRAP_T */
|
||||
|
||||
#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
|
||||
#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
|
||||
|
||||
/* HintMode */
|
||||
#define GL_DONT_CARE 0x1100
|
||||
#define GL_FASTEST 0x1101
|
||||
#define GL_NICEST 0x1102
|
||||
|
||||
/* HintTarget */
|
||||
#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
|
||||
#define GL_POINT_SMOOTH_HINT 0x0C51
|
||||
#define GL_LINE_SMOOTH_HINT 0x0C52
|
||||
#define GL_FOG_HINT 0x0C54
|
||||
#define GL_GENERATE_MIPMAP_HINT 0x8192
|
||||
|
||||
/* LightModelParameter */
|
||||
#define GL_LIGHT_MODEL_AMBIENT 0x0B53
|
||||
#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
|
||||
|
||||
/* LightParameter */
|
||||
#define GL_AMBIENT 0x1200
|
||||
#define GL_DIFFUSE 0x1201
|
||||
#define GL_SPECULAR 0x1202
|
||||
#define GL_POSITION 0x1203
|
||||
#define GL_SPOT_DIRECTION 0x1204
|
||||
#define GL_SPOT_EXPONENT 0x1205
|
||||
#define GL_SPOT_CUTOFF 0x1206
|
||||
#define GL_CONSTANT_ATTENUATION 0x1207
|
||||
#define GL_LINEAR_ATTENUATION 0x1208
|
||||
#define GL_QUADRATIC_ATTENUATION 0x1209
|
||||
|
||||
/* DataType */
|
||||
#define GL_BYTE 0x1400
|
||||
#define GL_UNSIGNED_BYTE 0x1401
|
||||
#define GL_SHORT 0x1402
|
||||
#define GL_UNSIGNED_SHORT 0x1403
|
||||
#define GL_FLOAT 0x1406
|
||||
#define GL_FIXED 0x140C
|
||||
|
||||
/* LogicOp */
|
||||
#define GL_CLEAR 0x1500
|
||||
#define GL_AND 0x1501
|
||||
#define GL_AND_REVERSE 0x1502
|
||||
#define GL_COPY 0x1503
|
||||
#define GL_AND_INVERTED 0x1504
|
||||
#define GL_NOOP 0x1505
|
||||
#define GL_XOR 0x1506
|
||||
#define GL_OR 0x1507
|
||||
#define GL_NOR 0x1508
|
||||
#define GL_EQUIV 0x1509
|
||||
#define GL_INVERT 0x150A
|
||||
#define GL_OR_REVERSE 0x150B
|
||||
#define GL_COPY_INVERTED 0x150C
|
||||
#define GL_OR_INVERTED 0x150D
|
||||
#define GL_NAND 0x150E
|
||||
#define GL_SET 0x150F
|
||||
|
||||
/* MaterialFace */
|
||||
/* GL_FRONT_AND_BACK */
|
||||
|
||||
/* MaterialParameter */
|
||||
#define GL_EMISSION 0x1600
|
||||
#define GL_SHININESS 0x1601
|
||||
#define GL_AMBIENT_AND_DIFFUSE 0x1602
|
||||
/* GL_AMBIENT */
|
||||
/* GL_DIFFUSE */
|
||||
/* GL_SPECULAR */
|
||||
|
||||
/* MatrixMode */
|
||||
#define GL_MODELVIEW 0x1700
|
||||
#define GL_PROJECTION 0x1701
|
||||
#define GL_TEXTURE 0x1702
|
||||
|
||||
/* NormalPointerType */
|
||||
/* GL_BYTE */
|
||||
/* GL_SHORT */
|
||||
/* GL_FLOAT */
|
||||
/* GL_FIXED */
|
||||
|
||||
/* PixelFormat */
|
||||
#define GL_ALPHA 0x1906
|
||||
#define GL_RGB 0x1907
|
||||
#define GL_RGBA 0x1908
|
||||
#define GL_LUMINANCE 0x1909
|
||||
#define GL_LUMINANCE_ALPHA 0x190A
|
||||
|
||||
/* PixelStoreParameter */
|
||||
#define GL_UNPACK_ALIGNMENT 0x0CF5
|
||||
#define GL_PACK_ALIGNMENT 0x0D05
|
||||
|
||||
/* PixelType */
|
||||
/* GL_UNSIGNED_BYTE */
|
||||
#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
|
||||
#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
|
||||
#define GL_UNSIGNED_SHORT_5_6_5 0x8363
|
||||
|
||||
/* ShadingModel */
|
||||
#define GL_FLAT 0x1D00
|
||||
#define GL_SMOOTH 0x1D01
|
||||
|
||||
/* StencilFunction */
|
||||
/* GL_NEVER */
|
||||
/* GL_LESS */
|
||||
/* GL_EQUAL */
|
||||
/* GL_LEQUAL */
|
||||
/* GL_GREATER */
|
||||
/* GL_NOTEQUAL */
|
||||
/* GL_GEQUAL */
|
||||
/* GL_ALWAYS */
|
||||
|
||||
/* StencilOp */
|
||||
/* GL_ZERO */
|
||||
#define GL_KEEP 0x1E00
|
||||
#define GL_REPLACE 0x1E01
|
||||
#define GL_INCR 0x1E02
|
||||
#define GL_DECR 0x1E03
|
||||
/* GL_INVERT */
|
||||
|
||||
/* StringName */
|
||||
#define GL_VENDOR 0x1F00
|
||||
#define GL_RENDERER 0x1F01
|
||||
#define GL_VERSION 0x1F02
|
||||
#define GL_EXTENSIONS 0x1F03
|
||||
|
||||
/* TexCoordPointerType */
|
||||
/* GL_SHORT */
|
||||
/* GL_FLOAT */
|
||||
/* GL_FIXED */
|
||||
/* GL_BYTE */
|
||||
|
||||
/* TextureEnvMode */
|
||||
#define GL_MODULATE 0x2100
|
||||
#define GL_DECAL 0x2101
|
||||
/* GL_BLEND */
|
||||
#define GL_ADD 0x0104
|
||||
/* GL_REPLACE */
|
||||
|
||||
/* TextureEnvParameter */
|
||||
#define GL_TEXTURE_ENV_MODE 0x2200
|
||||
#define GL_TEXTURE_ENV_COLOR 0x2201
|
||||
|
||||
/* TextureEnvTarget */
|
||||
#define GL_TEXTURE_ENV 0x2300
|
||||
|
||||
/* TextureMagFilter */
|
||||
#define GL_NEAREST 0x2600
|
||||
#define GL_LINEAR 0x2601
|
||||
|
||||
/* TextureMinFilter */
|
||||
/* GL_NEAREST */
|
||||
/* GL_LINEAR */
|
||||
#define GL_NEAREST_MIPMAP_NEAREST 0x2700
|
||||
#define GL_LINEAR_MIPMAP_NEAREST 0x2701
|
||||
#define GL_NEAREST_MIPMAP_LINEAR 0x2702
|
||||
#define GL_LINEAR_MIPMAP_LINEAR 0x2703
|
||||
|
||||
/* TextureParameterName */
|
||||
#define GL_TEXTURE_MAG_FILTER 0x2800
|
||||
#define GL_TEXTURE_MIN_FILTER 0x2801
|
||||
#define GL_TEXTURE_WRAP_S 0x2802
|
||||
#define GL_TEXTURE_WRAP_T 0x2803
|
||||
#define GL_GENERATE_MIPMAP 0x8191
|
||||
|
||||
/* TextureTarget */
|
||||
/* GL_TEXTURE_2D */
|
||||
|
||||
/* TextureUnit */
|
||||
#define GL_TEXTURE0 0x84C0
|
||||
#define GL_TEXTURE1 0x84C1
|
||||
#define GL_TEXTURE2 0x84C2
|
||||
#define GL_TEXTURE3 0x84C3
|
||||
#define GL_TEXTURE4 0x84C4
|
||||
#define GL_TEXTURE5 0x84C5
|
||||
#define GL_TEXTURE6 0x84C6
|
||||
#define GL_TEXTURE7 0x84C7
|
||||
#define GL_TEXTURE8 0x84C8
|
||||
#define GL_TEXTURE9 0x84C9
|
||||
#define GL_TEXTURE10 0x84CA
|
||||
#define GL_TEXTURE11 0x84CB
|
||||
#define GL_TEXTURE12 0x84CC
|
||||
#define GL_TEXTURE13 0x84CD
|
||||
#define GL_TEXTURE14 0x84CE
|
||||
#define GL_TEXTURE15 0x84CF
|
||||
#define GL_TEXTURE16 0x84D0
|
||||
#define GL_TEXTURE17 0x84D1
|
||||
#define GL_TEXTURE18 0x84D2
|
||||
#define GL_TEXTURE19 0x84D3
|
||||
#define GL_TEXTURE20 0x84D4
|
||||
#define GL_TEXTURE21 0x84D5
|
||||
#define GL_TEXTURE22 0x84D6
|
||||
#define GL_TEXTURE23 0x84D7
|
||||
#define GL_TEXTURE24 0x84D8
|
||||
#define GL_TEXTURE25 0x84D9
|
||||
#define GL_TEXTURE26 0x84DA
|
||||
#define GL_TEXTURE27 0x84DB
|
||||
#define GL_TEXTURE28 0x84DC
|
||||
#define GL_TEXTURE29 0x84DD
|
||||
#define GL_TEXTURE30 0x84DE
|
||||
#define GL_TEXTURE31 0x84DF
|
||||
#define GL_ACTIVE_TEXTURE 0x84E0
|
||||
#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
|
||||
|
||||
/* TextureWrapMode */
|
||||
#define GL_REPEAT 0x2901
|
||||
#define GL_CLAMP_TO_EDGE 0x812F
|
||||
|
||||
/* VertexPointerType */
|
||||
/* GL_SHORT */
|
||||
/* GL_FLOAT */
|
||||
/* GL_FIXED */
|
||||
/* GL_BYTE */
|
||||
|
||||
/* LightName */
|
||||
#define GL_LIGHT0 0x4000
|
||||
#define GL_LIGHT1 0x4001
|
||||
#define GL_LIGHT2 0x4002
|
||||
#define GL_LIGHT3 0x4003
|
||||
#define GL_LIGHT4 0x4004
|
||||
#define GL_LIGHT5 0x4005
|
||||
#define GL_LIGHT6 0x4006
|
||||
#define GL_LIGHT7 0x4007
|
||||
|
||||
/* Buffer Objects */
|
||||
#define GL_ARRAY_BUFFER 0x8892
|
||||
#define GL_ELEMENT_ARRAY_BUFFER 0x8893
|
||||
|
||||
#define GL_ARRAY_BUFFER_BINDING 0x8894
|
||||
#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
|
||||
#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
|
||||
#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
|
||||
#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
|
||||
#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
|
||||
|
||||
#define GL_STATIC_DRAW 0x88E4
|
||||
#define GL_DYNAMIC_DRAW 0x88E8
|
||||
|
||||
#define GL_BUFFER_SIZE 0x8764
|
||||
#define GL_BUFFER_USAGE 0x8765
|
||||
|
||||
/* Texture combine + dot3 */
|
||||
#define GL_SUBTRACT 0x84E7
|
||||
#define GL_COMBINE 0x8570
|
||||
#define GL_COMBINE_RGB 0x8571
|
||||
#define GL_COMBINE_ALPHA 0x8572
|
||||
#define GL_RGB_SCALE 0x8573
|
||||
#define GL_ADD_SIGNED 0x8574
|
||||
#define GL_INTERPOLATE 0x8575
|
||||
#define GL_CONSTANT 0x8576
|
||||
#define GL_PRIMARY_COLOR 0x8577
|
||||
#define GL_PREVIOUS 0x8578
|
||||
#define GL_OPERAND0_RGB 0x8590
|
||||
#define GL_OPERAND1_RGB 0x8591
|
||||
#define GL_OPERAND2_RGB 0x8592
|
||||
#define GL_OPERAND0_ALPHA 0x8598
|
||||
#define GL_OPERAND1_ALPHA 0x8599
|
||||
#define GL_OPERAND2_ALPHA 0x859A
|
||||
|
||||
#define GL_ALPHA_SCALE 0x0D1C
|
||||
|
||||
#define GL_SRC0_RGB 0x8580
|
||||
#define GL_SRC1_RGB 0x8581
|
||||
#define GL_SRC2_RGB 0x8582
|
||||
#define GL_SRC0_ALPHA 0x8588
|
||||
#define GL_SRC1_ALPHA 0x8589
|
||||
#define GL_SRC2_ALPHA 0x858A
|
||||
|
||||
#define GL_DOT3_RGB 0x86AE
|
||||
#define GL_DOT3_RGBA 0x86AF
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* required OES extension tokens
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* OES_read_format */
|
||||
#ifndef GL_OES_read_format
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
|
||||
#endif
|
||||
|
||||
/* GL_OES_compressed_paletted_texture */
|
||||
#ifndef GL_OES_compressed_paletted_texture
|
||||
#define GL_PALETTE4_RGB8_OES 0x8B90
|
||||
#define GL_PALETTE4_RGBA8_OES 0x8B91
|
||||
#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
|
||||
#define GL_PALETTE4_RGBA4_OES 0x8B93
|
||||
#define GL_PALETTE4_RGB5_A1_OES 0x8B94
|
||||
#define GL_PALETTE8_RGB8_OES 0x8B95
|
||||
#define GL_PALETTE8_RGBA8_OES 0x8B96
|
||||
#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
|
||||
#define GL_PALETTE8_RGBA4_OES 0x8B98
|
||||
#define GL_PALETTE8_RGB5_A1_OES 0x8B99
|
||||
#endif
|
||||
|
||||
/* OES_point_size_array */
|
||||
#ifndef GL_OES_point_size_array
|
||||
#define GL_POINT_SIZE_ARRAY_OES 0x8B9C
|
||||
#define GL_POINT_SIZE_ARRAY_TYPE_OES 0x898A
|
||||
#define GL_POINT_SIZE_ARRAY_STRIDE_OES 0x898B
|
||||
#define GL_POINT_SIZE_ARRAY_POINTER_OES 0x898C
|
||||
#define GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES 0x8B9F
|
||||
#endif
|
||||
|
||||
/* GL_OES_point_sprite */
|
||||
#ifndef GL_OES_point_sprite
|
||||
#define GL_POINT_SPRITE_OES 0x8861
|
||||
#define GL_COORD_REPLACE_OES 0x8862
|
||||
#endif
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
/* Available only in Common profile */
|
||||
GL_API void GL_APIENTRY glAlphaFunc (GLenum func, GLclampf ref);
|
||||
GL_API void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||
GL_API void GL_APIENTRY glClearDepthf (GLclampf depth);
|
||||
GL_API void GL_APIENTRY glClipPlanef (GLenum plane, const GLfloat *equation);
|
||||
GL_API void GL_APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
GL_API void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
|
||||
GL_API void GL_APIENTRY glFogf (GLenum pname, GLfloat param);
|
||||
GL_API void GL_APIENTRY glFogfv (GLenum pname, const GLfloat *params);
|
||||
GL_API void GL_APIENTRY glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
|
||||
GL_API void GL_APIENTRY glGetClipPlanef (GLenum pname, GLfloat eqn[4]);
|
||||
GL_API void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *params);
|
||||
GL_API void GL_APIENTRY glGetLightfv (GLenum light, GLenum pname, GLfloat *params);
|
||||
GL_API void GL_APIENTRY glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params);
|
||||
GL_API void GL_APIENTRY glGetTexEnvfv (GLenum env, GLenum pname, GLfloat *params);
|
||||
GL_API void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
|
||||
GL_API void GL_APIENTRY glLightModelf (GLenum pname, GLfloat param);
|
||||
GL_API void GL_APIENTRY glLightModelfv (GLenum pname, const GLfloat *params);
|
||||
GL_API void GL_APIENTRY glLightf (GLenum light, GLenum pname, GLfloat param);
|
||||
GL_API void GL_APIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params);
|
||||
GL_API void GL_APIENTRY glLineWidth (GLfloat width);
|
||||
GL_API void GL_APIENTRY glLoadMatrixf (const GLfloat *m);
|
||||
GL_API void GL_APIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param);
|
||||
GL_API void GL_APIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params);
|
||||
GL_API void GL_APIENTRY glMultMatrixf (const GLfloat *m);
|
||||
GL_API void GL_APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
|
||||
GL_API void GL_APIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz);
|
||||
GL_API void GL_APIENTRY glOrthof (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
|
||||
GL_API void GL_APIENTRY glPointParameterf (GLenum pname, GLfloat param);
|
||||
GL_API void GL_APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params);
|
||||
GL_API void GL_APIENTRY glPointSize (GLfloat size);
|
||||
GL_API void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
|
||||
GL_API void GL_APIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
|
||||
GL_API void GL_APIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z);
|
||||
GL_API void GL_APIENTRY glTexEnvf (GLenum target, GLenum pname, GLfloat param);
|
||||
GL_API void GL_APIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params);
|
||||
GL_API void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
|
||||
GL_API void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
|
||||
GL_API void GL_APIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z);
|
||||
|
||||
/* Available in both Common and Common-Lite profiles */
|
||||
GL_API void GL_APIENTRY glActiveTexture (GLenum texture);
|
||||
GL_API void GL_APIENTRY glAlphaFuncx (GLenum func, GLclampx ref);
|
||||
GL_API void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
|
||||
GL_API void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
|
||||
GL_API void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
|
||||
GL_API void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
|
||||
GL_API void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
|
||||
GL_API void GL_APIENTRY glClear (GLbitfield mask);
|
||||
GL_API void GL_APIENTRY glClearColorx (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
|
||||
GL_API void GL_APIENTRY glClearDepthx (GLclampx depth);
|
||||
GL_API void GL_APIENTRY glClearStencil (GLint s);
|
||||
GL_API void GL_APIENTRY glClientActiveTexture (GLenum texture);
|
||||
GL_API void GL_APIENTRY glClipPlanex (GLenum plane, const GLfixed *equation);
|
||||
GL_API void GL_APIENTRY glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
|
||||
GL_API void GL_APIENTRY glColor4x (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
|
||||
GL_API void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
||||
GL_API void GL_APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
GL_API void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
|
||||
GL_API void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
|
||||
GL_API void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
|
||||
GL_API void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GL_API void GL_APIENTRY glCullFace (GLenum mode);
|
||||
GL_API void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
|
||||
GL_API void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
|
||||
GL_API void GL_APIENTRY glDepthFunc (GLenum func);
|
||||
GL_API void GL_APIENTRY glDepthMask (GLboolean flag);
|
||||
GL_API void GL_APIENTRY glDepthRangex (GLclampx zNear, GLclampx zFar);
|
||||
GL_API void GL_APIENTRY glDisable (GLenum cap);
|
||||
GL_API void GL_APIENTRY glDisableClientState (GLenum array);
|
||||
GL_API void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
|
||||
GL_API void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
|
||||
GL_API void GL_APIENTRY glEnable (GLenum cap);
|
||||
GL_API void GL_APIENTRY glEnableClientState (GLenum array);
|
||||
GL_API void GL_APIENTRY glFinish (void);
|
||||
GL_API void GL_APIENTRY glFlush (void);
|
||||
GL_API void GL_APIENTRY glFogx (GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glFogxv (GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glFrontFace (GLenum mode);
|
||||
GL_API void GL_APIENTRY glFrustumx (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
|
||||
GL_API void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *params);
|
||||
GL_API void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
|
||||
GL_API void GL_APIENTRY glGetClipPlanex (GLenum pname, GLfixed eqn[4]);
|
||||
GL_API void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
|
||||
GL_API void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures);
|
||||
GL_API GLenum GL_APIENTRY glGetError (void);
|
||||
GL_API void GL_APIENTRY glGetFixedv (GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *params);
|
||||
GL_API void GL_APIENTRY glGetLightxv (GLenum light, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glGetMaterialxv (GLenum face, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glGetPointerv (GLenum pname, void **params);
|
||||
GL_API const GLubyte * GL_APIENTRY glGetString (GLenum name);
|
||||
GL_API void GL_APIENTRY glGetTexEnviv (GLenum env, GLenum pname, GLint *params);
|
||||
GL_API void GL_APIENTRY glGetTexEnvxv (GLenum env, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
|
||||
GL_API void GL_APIENTRY glGetTexParameterxv (GLenum target, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glHint (GLenum target, GLenum mode);
|
||||
GL_API GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
|
||||
GL_API GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
|
||||
GL_API GLboolean GL_APIENTRY glIsTexture (GLuint texture);
|
||||
GL_API void GL_APIENTRY glLightModelx (GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glLightModelxv (GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glLightx (GLenum light, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glLightxv (GLenum light, GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glLineWidthx (GLfixed width);
|
||||
GL_API void GL_APIENTRY glLoadIdentity (void);
|
||||
GL_API void GL_APIENTRY glLoadMatrixx (const GLfixed *m);
|
||||
GL_API void GL_APIENTRY glLogicOp (GLenum opcode);
|
||||
GL_API void GL_APIENTRY glMaterialx (GLenum face, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glMaterialxv (GLenum face, GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glMatrixMode (GLenum mode);
|
||||
GL_API void GL_APIENTRY glMultMatrixx (const GLfixed *m);
|
||||
GL_API void GL_APIENTRY glMultiTexCoord4x (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
|
||||
GL_API void GL_APIENTRY glNormal3x (GLfixed nx, GLfixed ny, GLfixed nz);
|
||||
GL_API void GL_APIENTRY glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
GL_API void GL_APIENTRY glOrthox (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
|
||||
GL_API void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
|
||||
GL_API void GL_APIENTRY glPointParameterx (GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glPointParameterxv (GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glPointSizex (GLfixed size);
|
||||
GL_API void GL_APIENTRY glPolygonOffsetx (GLfixed factor, GLfixed units);
|
||||
GL_API void GL_APIENTRY glPopMatrix (void);
|
||||
GL_API void GL_APIENTRY glPushMatrix (void);
|
||||
GL_API void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
|
||||
GL_API void GL_APIENTRY glRotatex (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
|
||||
GL_API void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
|
||||
GL_API void GL_APIENTRY glSampleCoveragex (GLclampx value, GLboolean invert);
|
||||
GL_API void GL_APIENTRY glScalex (GLfixed x, GLfixed y, GLfixed z);
|
||||
GL_API void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GL_API void GL_APIENTRY glShadeModel (GLenum mode);
|
||||
GL_API void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
|
||||
GL_API void GL_APIENTRY glStencilMask (GLuint mask);
|
||||
GL_API void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
|
||||
GL_API void GL_APIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
GL_API void GL_APIENTRY glTexEnvi (GLenum target, GLenum pname, GLint param);
|
||||
GL_API void GL_APIENTRY glTexEnvx (GLenum target, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glTexEnviv (GLenum target, GLenum pname, const GLint *params);
|
||||
GL_API void GL_APIENTRY glTexEnvxv (GLenum target, GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
|
||||
GL_API void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
|
||||
GL_API void GL_APIENTRY glTexParameterx (GLenum target, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
|
||||
GL_API void GL_APIENTRY glTexParameterxv (GLenum target, GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
|
||||
GL_API void GL_APIENTRY glTranslatex (GLfixed x, GLfixed y, GLfixed z);
|
||||
GL_API void GL_APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
GL_API void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* Required OES extension functions
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_OES_read_format */
|
||||
#ifndef GL_OES_read_format
|
||||
#define GL_OES_read_format 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_compressed_paletted_texture */
|
||||
#ifndef GL_OES_compressed_paletted_texture
|
||||
#define GL_OES_compressed_paletted_texture 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_point_size_array */
|
||||
#ifndef GL_OES_point_size_array
|
||||
#define GL_OES_point_size_array 1
|
||||
GL_API void GL_APIENTRY glPointSizePointerOES (GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
#endif
|
||||
|
||||
/* GL_OES_point_sprite */
|
||||
#ifndef GL_OES_point_sprite
|
||||
#define GL_OES_point_sprite 1
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __gl_h_ */
|
||||
|
607
Engine/ExtIncludes/OpenGLES2.0/ARM/include/GLES/glext.h
Normal file
|
@ -0,0 +1,607 @@
|
|||
#ifndef __glext_h_
|
||||
#define __glext_h_
|
||||
|
||||
/* $Revision: 7172 $ on $Date:: 2009-01-09 11:17:41 -0800 #$ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This document is licensed under the SGI Free Software B License Version
|
||||
* 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
|
||||
*/
|
||||
|
||||
#ifndef GL_APIENTRYP
|
||||
# define GL_APIENTRYP GL_APIENTRY*
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* OES extension tokens
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_OES_blend_equation_separate */
|
||||
#ifndef GL_OES_blend_equation_separate
|
||||
/* BLEND_EQUATION_RGB_OES same as BLEND_EQUATION_OES */
|
||||
#define GL_BLEND_EQUATION_RGB_OES 0x8009
|
||||
#define GL_BLEND_EQUATION_ALPHA_OES 0x883D
|
||||
#endif
|
||||
|
||||
/* GL_OES_blend_func_separate */
|
||||
#ifndef GL_OES_blend_func_separate
|
||||
#define GL_BLEND_DST_RGB_OES 0x80C8
|
||||
#define GL_BLEND_SRC_RGB_OES 0x80C9
|
||||
#define GL_BLEND_DST_ALPHA_OES 0x80CA
|
||||
#define GL_BLEND_SRC_ALPHA_OES 0x80CB
|
||||
#endif
|
||||
|
||||
/* GL_OES_blend_subtract */
|
||||
#ifndef GL_OES_blend_subtract
|
||||
#define GL_BLEND_EQUATION_OES 0x8009
|
||||
#define GL_FUNC_ADD_OES 0x8006
|
||||
#define GL_FUNC_SUBTRACT_OES 0x800A
|
||||
#define GL_FUNC_REVERSE_SUBTRACT_OES 0x800B
|
||||
#endif
|
||||
|
||||
/* GL_OES_compressed_ETC1_RGB8_texture */
|
||||
#ifndef GL_OES_compressed_ETC1_RGB8_texture
|
||||
#define GL_ETC1_RGB8_OES 0x8D64
|
||||
#endif
|
||||
|
||||
/* GL_OES_depth24 */
|
||||
#ifndef GL_OES_depth24
|
||||
#define GL_DEPTH_COMPONENT24_OES 0x81A6
|
||||
#endif
|
||||
|
||||
/* GL_OES_depth32 */
|
||||
#ifndef GL_OES_depth32
|
||||
#define GL_DEPTH_COMPONENT32_OES 0x81A7
|
||||
#endif
|
||||
|
||||
/* GL_OES_draw_texture */
|
||||
#ifndef GL_OES_draw_texture
|
||||
#define GL_TEXTURE_CROP_RECT_OES 0x8B9D
|
||||
#endif
|
||||
|
||||
/* GL_OES_EGL_image */
|
||||
#ifndef GL_OES_EGL_image
|
||||
typedef void* GLeglImageOES;
|
||||
#endif
|
||||
|
||||
/* GL_OES_fixed_point */
|
||||
#ifndef GL_OES_fixed_point
|
||||
#define GL_FIXED_OES 0x140C
|
||||
#endif
|
||||
|
||||
/* GL_OES_framebuffer_object */
|
||||
#ifndef GL_OES_framebuffer_object
|
||||
#define GL_NONE_OES 0
|
||||
#define GL_FRAMEBUFFER_OES 0x8D40
|
||||
#define GL_RENDERBUFFER_OES 0x8D41
|
||||
#define GL_RGBA4_OES 0x8056
|
||||
#define GL_RGB5_A1_OES 0x8057
|
||||
#define GL_RGB565_OES 0x8D62
|
||||
#define GL_DEPTH_COMPONENT16_OES 0x81A5
|
||||
#define GL_RENDERBUFFER_WIDTH_OES 0x8D42
|
||||
#define GL_RENDERBUFFER_HEIGHT_OES 0x8D43
|
||||
#define GL_RENDERBUFFER_INTERNAL_FORMAT_OES 0x8D44
|
||||
#define GL_RENDERBUFFER_RED_SIZE_OES 0x8D50
|
||||
#define GL_RENDERBUFFER_GREEN_SIZE_OES 0x8D51
|
||||
#define GL_RENDERBUFFER_BLUE_SIZE_OES 0x8D52
|
||||
#define GL_RENDERBUFFER_ALPHA_SIZE_OES 0x8D53
|
||||
#define GL_RENDERBUFFER_DEPTH_SIZE_OES 0x8D54
|
||||
#define GL_RENDERBUFFER_STENCIL_SIZE_OES 0x8D55
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES 0x8CD0
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES 0x8CD1
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES 0x8CD2
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES 0x8CD3
|
||||
#define GL_COLOR_ATTACHMENT0_OES 0x8CE0
|
||||
#define GL_DEPTH_ATTACHMENT_OES 0x8D00
|
||||
#define GL_STENCIL_ATTACHMENT_OES 0x8D20
|
||||
#define GL_FRAMEBUFFER_COMPLETE_OES 0x8CD5
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES 0x8CD6
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES 0x8CD7
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES 0x8CD9
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES 0x8CDA
|
||||
#define GL_FRAMEBUFFER_UNSUPPORTED_OES 0x8CDD
|
||||
#define GL_FRAMEBUFFER_BINDING_OES 0x8CA6
|
||||
#define GL_RENDERBUFFER_BINDING_OES 0x8CA7
|
||||
#define GL_MAX_RENDERBUFFER_SIZE_OES 0x84E8
|
||||
#define GL_INVALID_FRAMEBUFFER_OPERATION_OES 0x0506
|
||||
#endif
|
||||
|
||||
/* GL_OES_mapbuffer */
|
||||
#ifndef GL_OES_mapbuffer
|
||||
#define GL_WRITE_ONLY_OES 0x88B9
|
||||
#define GL_BUFFER_ACCESS_OES 0x88BB
|
||||
#define GL_BUFFER_MAPPED_OES 0x88BC
|
||||
#define GL_BUFFER_MAP_POINTER_OES 0x88BD
|
||||
#endif
|
||||
|
||||
/* GL_OES_matrix_get */
|
||||
#ifndef GL_OES_matrix_get
|
||||
#define GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES 0x898D
|
||||
#define GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES 0x898E
|
||||
#define GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES 0x898F
|
||||
#endif
|
||||
|
||||
/* GL_OES_matrix_palette */
|
||||
#ifndef GL_OES_matrix_palette
|
||||
#define GL_MAX_VERTEX_UNITS_OES 0x86A4
|
||||
#define GL_MAX_PALETTE_MATRICES_OES 0x8842
|
||||
#define GL_MATRIX_PALETTE_OES 0x8840
|
||||
#define GL_MATRIX_INDEX_ARRAY_OES 0x8844
|
||||
#define GL_WEIGHT_ARRAY_OES 0x86AD
|
||||
#define GL_CURRENT_PALETTE_MATRIX_OES 0x8843
|
||||
#define GL_MATRIX_INDEX_ARRAY_SIZE_OES 0x8846
|
||||
#define GL_MATRIX_INDEX_ARRAY_TYPE_OES 0x8847
|
||||
#define GL_MATRIX_INDEX_ARRAY_STRIDE_OES 0x8848
|
||||
#define GL_MATRIX_INDEX_ARRAY_POINTER_OES 0x8849
|
||||
#define GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES 0x8B9E
|
||||
#define GL_WEIGHT_ARRAY_SIZE_OES 0x86AB
|
||||
#define GL_WEIGHT_ARRAY_TYPE_OES 0x86A9
|
||||
#define GL_WEIGHT_ARRAY_STRIDE_OES 0x86AA
|
||||
#define GL_WEIGHT_ARRAY_POINTER_OES 0x86AC
|
||||
#define GL_WEIGHT_ARRAY_BUFFER_BINDING_OES 0x889E
|
||||
#endif
|
||||
|
||||
/* GL_OES_packed_depth_stencil */
|
||||
#ifndef GL_OES_packed_depth_stencil
|
||||
#define GL_DEPTH_STENCIL_OES 0x84F9
|
||||
#define GL_UNSIGNED_INT_24_8_OES 0x84FA
|
||||
#define GL_DEPTH24_STENCIL8_OES 0x88F0
|
||||
#endif
|
||||
|
||||
/* GL_OES_rgb8_rgba8 */
|
||||
#ifndef GL_OES_rgb8_rgba8
|
||||
#define GL_RGB8_OES 0x8051
|
||||
#define GL_RGBA8_OES 0x8058
|
||||
#endif
|
||||
|
||||
/* GL_OES_stencil1 */
|
||||
#ifndef GL_OES_stencil1
|
||||
#define GL_STENCIL_INDEX1_OES 0x8D46
|
||||
#endif
|
||||
|
||||
/* GL_OES_stencil4 */
|
||||
#ifndef GL_OES_stencil4
|
||||
#define GL_STENCIL_INDEX4_OES 0x8D47
|
||||
#endif
|
||||
|
||||
/* GL_OES_stencil8 */
|
||||
#ifndef GL_OES_stencil8
|
||||
#define GL_STENCIL_INDEX8_OES 0x8D48
|
||||
#endif
|
||||
|
||||
/* GL_OES_stencil_wrap */
|
||||
#ifndef GL_OES_stencil_wrap
|
||||
#define GL_INCR_WRAP_OES 0x8507
|
||||
#define GL_DECR_WRAP_OES 0x8508
|
||||
#endif
|
||||
|
||||
/* GL_OES_texture_cube_map */
|
||||
#ifndef GL_OES_texture_cube_map
|
||||
#define GL_NORMAL_MAP_OES 0x8511
|
||||
#define GL_REFLECTION_MAP_OES 0x8512
|
||||
#define GL_TEXTURE_CUBE_MAP_OES 0x8513
|
||||
#define GL_TEXTURE_BINDING_CUBE_MAP_OES 0x8514
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES 0x8515
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES 0x8516
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES 0x8517
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES 0x8518
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES 0x8519
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES 0x851A
|
||||
#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES 0x851C
|
||||
#define GL_TEXTURE_GEN_MODE_OES 0x2500
|
||||
#define GL_TEXTURE_GEN_STR_OES 0x8D60
|
||||
#endif
|
||||
|
||||
/* GL_OES_texture_mirrored_repeat */
|
||||
#ifndef GL_OES_texture_mirrored_repeat
|
||||
#define GL_MIRRORED_REPEAT_OES 0x8370
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* AMD extension tokens
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_AMD_compressed_3DC_texture */
|
||||
#ifndef GL_AMD_compressed_3DC_texture
|
||||
#define GL_3DC_X_AMD 0x87F9
|
||||
#define GL_3DC_XY_AMD 0x87FA
|
||||
#endif
|
||||
|
||||
/* GL_AMD_compressed_ATC_texture */
|
||||
#ifndef GL_AMD_compressed_ATC_texture
|
||||
#define GL_ATC_RGB_AMD 0x8C92
|
||||
#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
|
||||
#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* EXT extension tokens
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_EXT_texture_filter_anisotropic */
|
||||
#ifndef GL_EXT_texture_filter_anisotropic
|
||||
#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
|
||||
#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* OES extension functions
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_OES_blend_equation_separate */
|
||||
#ifndef GL_OES_blend_equation_separate
|
||||
#define GL_OES_blend_equation_separate 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glBlendEquationSeparateOES (GLenum modeRGB, GLenum modeAlpha);
|
||||
#endif
|
||||
typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEOESPROC) (GLenum modeRGB, GLenum modeAlpha);
|
||||
#endif
|
||||
|
||||
/* GL_OES_blend_func_separate */
|
||||
#ifndef GL_OES_blend_func_separate
|
||||
#define GL_OES_blend_func_separate 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glBlendFuncSeparateOES (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
|
||||
#endif
|
||||
typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEOESPROC) (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
|
||||
#endif
|
||||
|
||||
/* GL_OES_blend_subtract */
|
||||
#ifndef GL_OES_blend_subtract
|
||||
#define GL_OES_blend_subtract 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glBlendEquationOES (GLenum mode);
|
||||
#endif
|
||||
typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONOESPROC) (GLenum mode);
|
||||
#endif
|
||||
|
||||
/* GL_OES_byte_coordinates */
|
||||
#ifndef GL_OES_byte_coordinates
|
||||
#define GL_OES_byte_coordinates 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_compressed_ETC1_RGB8_texture */
|
||||
#ifndef GL_OES_compressed_ETC1_RGB8_texture
|
||||
#define GL_OES_compressed_ETC1_RGB8_texture 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_depth24 */
|
||||
#ifndef GL_OES_depth24
|
||||
#define GL_OES_depth24 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_depth32 */
|
||||
#ifndef GL_OES_depth32
|
||||
#define GL_OES_depth32 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_draw_texture */
|
||||
#ifndef GL_OES_draw_texture
|
||||
#define GL_OES_draw_texture 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glDrawTexsOES (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
|
||||
GL_API void GL_APIENTRY glDrawTexiOES (GLint x, GLint y, GLint z, GLint width, GLint height);
|
||||
GL_API void GL_APIENTRY glDrawTexxOES (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
|
||||
GL_API void GL_APIENTRY glDrawTexsvOES (const GLshort *coords);
|
||||
GL_API void GL_APIENTRY glDrawTexivOES (const GLint *coords);
|
||||
GL_API void GL_APIENTRY glDrawTexxvOES (const GLfixed *coords);
|
||||
GL_API void GL_APIENTRY glDrawTexfOES (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
|
||||
GL_API void GL_APIENTRY glDrawTexfvOES (const GLfloat *coords);
|
||||
#endif
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWTEXSOESPROC) (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWTEXIOESPROC) (GLint x, GLint y, GLint z, GLint width, GLint height);
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWTEXXOESPROC) (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWTEXSVOESPROC) (const GLshort *coords);
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWTEXIVOESPROC) (const GLint *coords);
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWTEXXVOESPROC) (const GLfixed *coords);
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWTEXFOESPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWTEXFVOESPROC) (const GLfloat *coords);
|
||||
#endif
|
||||
|
||||
/* GL_OES_EGL_image */
|
||||
#ifndef GL_OES_EGL_image
|
||||
#define GL_OES_EGL_image 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
|
||||
GL_API void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
|
||||
#endif
|
||||
typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
|
||||
typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
|
||||
#endif
|
||||
|
||||
/* GL_OES_element_index_uint */
|
||||
#ifndef GL_OES_element_index_uint
|
||||
#define GL_OES_element_index_uint 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_extended_matrix_palette */
|
||||
#ifndef GL_OES_extended_matrix_palette
|
||||
#define GL_OES_extended_matrix_palette 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_fbo_render_mipmap */
|
||||
#ifndef GL_OES_fbo_render_mipmap
|
||||
#define GL_OES_fbo_render_mipmap 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_fixed_point */
|
||||
#ifndef GL_OES_fixed_point
|
||||
#define GL_OES_fixed_point 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glAlphaFuncxOES (GLenum func, GLclampx ref);
|
||||
GL_API void GL_APIENTRY glClearColorxOES (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
|
||||
GL_API void GL_APIENTRY glClearDepthxOES (GLclampx depth);
|
||||
GL_API void GL_APIENTRY glClipPlanexOES (GLenum plane, const GLfixed *equation);
|
||||
GL_API void GL_APIENTRY glColor4xOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
|
||||
GL_API void GL_APIENTRY glDepthRangexOES (GLclampx zNear, GLclampx zFar);
|
||||
GL_API void GL_APIENTRY glFogxOES (GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glFogxvOES (GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glFrustumxOES (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
|
||||
GL_API void GL_APIENTRY glGetClipPlanexOES (GLenum pname, GLfixed eqn[4]);
|
||||
GL_API void GL_APIENTRY glGetFixedvOES (GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glGetLightxvOES (GLenum light, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glGetMaterialxvOES (GLenum face, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glGetTexEnvxvOES (GLenum env, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glGetTexParameterxvOES (GLenum target, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glLightModelxOES (GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glLightModelxvOES (GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glLightxOES (GLenum light, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glLightxvOES (GLenum light, GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glLineWidthxOES (GLfixed width);
|
||||
GL_API void GL_APIENTRY glLoadMatrixxOES (const GLfixed *m);
|
||||
GL_API void GL_APIENTRY glMaterialxOES (GLenum face, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glMultMatrixxOES (const GLfixed *m);
|
||||
GL_API void GL_APIENTRY glMultiTexCoord4xOES (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
|
||||
GL_API void GL_APIENTRY glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz);
|
||||
GL_API void GL_APIENTRY glOrthoxOES (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
|
||||
GL_API void GL_APIENTRY glPointParameterxOES (GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glPointParameterxvOES (GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glPointSizexOES (GLfixed size);
|
||||
GL_API void GL_APIENTRY glPolygonOffsetxOES (GLfixed factor, GLfixed units);
|
||||
GL_API void GL_APIENTRY glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
|
||||
GL_API void GL_APIENTRY glSampleCoveragexOES (GLclampx value, GLboolean invert);
|
||||
GL_API void GL_APIENTRY glScalexOES (GLfixed x, GLfixed y, GLfixed z);
|
||||
GL_API void GL_APIENTRY glTexEnvxOES (GLenum target, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glTexParameterxOES (GLenum target, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glTranslatexOES (GLfixed x, GLfixed y, GLfixed z);
|
||||
#endif
|
||||
typedef void (GL_APIENTRYP PFNGLALPHAFUNCXOESPROC) (GLenum func, GLclampx ref);
|
||||
typedef void (GL_APIENTRYP PFNGLCLEARCOLORXOESPROC) (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
|
||||
typedef void (GL_APIENTRYP PFNGLCLEARDEPTHXOESPROC) (GLclampx depth);
|
||||
typedef void (GL_APIENTRYP PFNGLCLIPPLANEXOESPROC) (GLenum plane, const GLfixed *equation);
|
||||
typedef void (GL_APIENTRYP PFNGLCOLOR4XOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
|
||||
typedef void (GL_APIENTRYP PFNGLDEPTHRANGEXOESPROC) (GLclampx zNear, GLclampx zFar);
|
||||
typedef void (GL_APIENTRYP PFNGLFOGXOESPROC) (GLenum pname, GLfixed param);
|
||||
typedef void (GL_APIENTRYP PFNGLFOGXVOESPROC) (GLenum pname, const GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLFRUSTUMXOESPROC) (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
|
||||
typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEXOESPROC) (GLenum pname, GLfixed eqn[4]);
|
||||
typedef void (GL_APIENTRYP PFNGLGETFIXEDVOESPROC) (GLenum pname, GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETLIGHTXVOESPROC) (GLenum light, GLenum pname, GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETMATERIALXVOESPROC) (GLenum face, GLenum pname, GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETTEXENVXVOESPROC) (GLenum env, GLenum pname, GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLLIGHTMODELXOESPROC) (GLenum pname, GLfixed param);
|
||||
typedef void (GL_APIENTRYP PFNGLLIGHTMODELXVOESPROC) (GLenum pname, const GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed param);
|
||||
typedef void (GL_APIENTRYP PFNGLLIGHTXVOESPROC) (GLenum light, GLenum pname, const GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLLINEWIDTHXOESPROC) (GLfixed width);
|
||||
typedef void (GL_APIENTRYP PFNGLLOADMATRIXXOESPROC) (const GLfixed *m);
|
||||
typedef void (GL_APIENTRYP PFNGLMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param);
|
||||
typedef void (GL_APIENTRYP PFNGLMATERIALXVOESPROC) (GLenum face, GLenum pname, const GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLMULTMATRIXXOESPROC) (const GLfixed *m);
|
||||
typedef void (GL_APIENTRYP PFNGLMULTITEXCOORD4XOESPROC) (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
|
||||
typedef void (GL_APIENTRYP PFNGLNORMAL3XOESPROC) (GLfixed nx, GLfixed ny, GLfixed nz);
|
||||
typedef void (GL_APIENTRYP PFNGLORTHOXOESPROC) (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
|
||||
typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXOESPROC) (GLenum pname, GLfixed param);
|
||||
typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, const GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLPOINTSIZEXOESPROC) (GLfixed size);
|
||||
typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, GLfixed units);
|
||||
typedef void (GL_APIENTRYP PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
|
||||
typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEXOESPROC) (GLclampx value, GLboolean invert);
|
||||
typedef void (GL_APIENTRYP PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, GLfixed param);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);
|
||||
#endif
|
||||
|
||||
/* GL_OES_framebuffer_object */
|
||||
#ifndef GL_OES_framebuffer_object
|
||||
#define GL_OES_framebuffer_object 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API GLboolean GL_APIENTRY glIsRenderbufferOES (GLuint renderbuffer);
|
||||
GL_API void GL_APIENTRY glBindRenderbufferOES (GLenum target, GLuint renderbuffer);
|
||||
GL_API void GL_APIENTRY glDeleteRenderbuffersOES (GLsizei n, const GLuint* renderbuffers);
|
||||
GL_API void GL_APIENTRY glGenRenderbuffersOES (GLsizei n, GLuint* renderbuffers);
|
||||
GL_API void GL_APIENTRY glRenderbufferStorageOES (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
GL_API void GL_APIENTRY glGetRenderbufferParameterivOES (GLenum target, GLenum pname, GLint* params);
|
||||
GL_API GLboolean GL_APIENTRY glIsFramebufferOES (GLuint framebuffer);
|
||||
GL_API void GL_APIENTRY glBindFramebufferOES (GLenum target, GLuint framebuffer);
|
||||
GL_API void GL_APIENTRY glDeleteFramebuffersOES (GLsizei n, const GLuint* framebuffers);
|
||||
GL_API void GL_APIENTRY glGenFramebuffersOES (GLsizei n, GLuint* framebuffers);
|
||||
GL_API GLenum GL_APIENTRY glCheckFramebufferStatusOES (GLenum target);
|
||||
GL_API void GL_APIENTRY glFramebufferRenderbufferOES (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
GL_API void GL_APIENTRY glFramebufferTexture2DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
GL_API void GL_APIENTRY glGetFramebufferAttachmentParameterivOES (GLenum target, GLenum attachment, GLenum pname, GLint* params);
|
||||
GL_API void GL_APIENTRY glGenerateMipmapOES (GLenum target);
|
||||
#endif
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFEROESPROC) (GLuint renderbuffer);
|
||||
typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFEROESPROC) (GLenum target, GLuint renderbuffer);
|
||||
typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSOESPROC) (GLsizei n, const GLuint* renderbuffers);
|
||||
typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSOESPROC) (GLsizei n, GLuint* renderbuffers);
|
||||
typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVOESPROC) (GLenum target, GLenum pname, GLint* params);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFEROESPROC) (GLuint framebuffer);
|
||||
typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFEROESPROC) (GLenum target, GLuint framebuffer);
|
||||
typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSOESPROC) (GLsizei n, const GLuint* framebuffers);
|
||||
typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSOESPROC) (GLsizei n, GLuint* framebuffers);
|
||||
typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSOESPROC) (GLenum target);
|
||||
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEROESPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC) (GLenum target, GLenum attachment, GLenum pname, GLint* params);
|
||||
typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPOESPROC) (GLenum target);
|
||||
#endif
|
||||
|
||||
/* GL_OES_mapbuffer */
|
||||
#ifndef GL_OES_mapbuffer
|
||||
#define GL_OES_mapbuffer 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
|
||||
GL_API GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
|
||||
GL_API void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, void** params);
|
||||
#endif
|
||||
typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
|
||||
typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void** params);
|
||||
#endif
|
||||
|
||||
/* GL_OES_matrix_get */
|
||||
#ifndef GL_OES_matrix_get
|
||||
#define GL_OES_matrix_get 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_matrix_palette */
|
||||
#ifndef GL_OES_matrix_palette
|
||||
#define GL_OES_matrix_palette 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glCurrentPaletteMatrixOES (GLuint matrixpaletteindex);
|
||||
GL_API void GL_APIENTRY glLoadPaletteFromModelViewMatrixOES (void);
|
||||
GL_API void GL_APIENTRY glMatrixIndexPointerOES (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
GL_API void GL_APIENTRY glWeightPointerOES (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
#endif
|
||||
typedef void (GL_APIENTRYP PFNGLCURRENTPALETTEMATRIXOESPROC) (GLuint matrixpaletteindex);
|
||||
typedef void (GL_APIENTRYP PFNGLLOADPALETTEFROMMODELVIEWMATRIXOESPROC) (void);
|
||||
typedef void (GL_APIENTRYP PFNGLMATRIXINDEXPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
typedef void (GL_APIENTRYP PFNGLWEIGHTPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
#endif
|
||||
|
||||
/* GL_OES_packed_depth_stencil */
|
||||
#ifndef GL_OES_packed_depth_stencil
|
||||
#define GL_OES_packed_depth_stencil 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_query_matrix */
|
||||
#ifndef GL_OES_query_matrix
|
||||
#define GL_OES_query_matrix 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API GLbitfield GL_APIENTRY glQueryMatrixxOES (GLfixed mantissa[16], GLint exponent[16]);
|
||||
#endif
|
||||
typedef GLbitfield (GL_APIENTRYP PFNGLQUERYMATRIXXOESPROC) (GLfixed mantissa[16], GLint exponent[16]);
|
||||
#endif
|
||||
|
||||
/* GL_OES_rgb8_rgba8 */
|
||||
#ifndef GL_OES_rgb8_rgba8
|
||||
#define GL_OES_rgb8_rgba8 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_single_precision */
|
||||
#ifndef GL_OES_single_precision
|
||||
#define GL_OES_single_precision 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glDepthRangefOES (GLclampf zNear, GLclampf zFar);
|
||||
GL_API void GL_APIENTRY glFrustumfOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
|
||||
GL_API void GL_APIENTRY glOrthofOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
|
||||
GL_API void GL_APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation);
|
||||
GL_API void GL_APIENTRY glGetClipPlanefOES (GLenum pname, GLfloat eqn[4]);
|
||||
GL_API void GL_APIENTRY glClearDepthfOES (GLclampf depth);
|
||||
#endif
|
||||
typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFOESPROC) (GLclampf zNear, GLclampf zFar);
|
||||
typedef void (GL_APIENTRYP PFNGLFRUSTUMFOESPROC) (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
|
||||
typedef void (GL_APIENTRYP PFNGLORTHOFOESPROC) (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
|
||||
typedef void (GL_APIENTRYP PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat *equation);
|
||||
typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEFOESPROC) (GLenum pname, GLfloat eqn[4]);
|
||||
typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFOESPROC) (GLclampf depth);
|
||||
#endif
|
||||
|
||||
/* GL_OES_stencil1 */
|
||||
#ifndef GL_OES_stencil1
|
||||
#define GL_OES_stencil1 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_stencil4 */
|
||||
#ifndef GL_OES_stencil4
|
||||
#define GL_OES_stencil4 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_stencil8 */
|
||||
#ifndef GL_OES_stencil8
|
||||
#define GL_OES_stencil8 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_stencil_wrap */
|
||||
#ifndef GL_OES_stencil_wrap
|
||||
#define GL_OES_stencil_wrap 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_texture_cube_map */
|
||||
#ifndef GL_OES_texture_cube_map
|
||||
#define GL_OES_texture_cube_map 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glTexGenfOES (GLenum coord, GLenum pname, GLfloat param);
|
||||
GL_API void GL_APIENTRY glTexGenfvOES (GLenum coord, GLenum pname, const GLfloat *params);
|
||||
GL_API void GL_APIENTRY glTexGeniOES (GLenum coord, GLenum pname, GLint param);
|
||||
GL_API void GL_APIENTRY glTexGenivOES (GLenum coord, GLenum pname, const GLint *params);
|
||||
GL_API void GL_APIENTRY glTexGenxOES (GLenum coord, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glTexGenxvOES (GLenum coord, GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glGetTexGenfvOES (GLenum coord, GLenum pname, GLfloat *params);
|
||||
GL_API void GL_APIENTRY glGetTexGenivOES (GLenum coord, GLenum pname, GLint *params);
|
||||
GL_API void GL_APIENTRY glGetTexGenxvOES (GLenum coord, GLenum pname, GLfixed *params);
|
||||
#endif
|
||||
typedef void (GL_APIENTRYP PFNGLTEXGENFOESPROC) (GLenum coord, GLenum pname, GLfloat param);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXGENFVOESPROC) (GLenum coord, GLenum pname, const GLfloat *params);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXGENIOESPROC) (GLenum coord, GLenum pname, GLint param);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXGENIVOESPROC) (GLenum coord, GLenum pname, const GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETTEXGENFVOESPROC) (GLenum coord, GLenum pname, GLfloat *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETTEXGENIVOESPROC) (GLenum coord, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params);
|
||||
#endif
|
||||
|
||||
/* GL_OES_texture_env_crossbar */
|
||||
#ifndef GL_OES_texture_env_crossbar
|
||||
#define GL_OES_texture_env_crossbar 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_texture_mirrored_repeat */
|
||||
#ifndef GL_OES_texture_mirrored_repeat
|
||||
#define GL_OES_texture_mirrored_repeat 1
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* AMD extension functions
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_AMD_compressed_3DC_texture */
|
||||
#ifndef GL_AMD_compressed_3DC_texture
|
||||
#define GL_AMD_compressed_3DC_texture 1
|
||||
#endif
|
||||
|
||||
/* GL_AMD_compressed_ATC_texture */
|
||||
#ifndef GL_AMD_compressed_ATC_texture
|
||||
#define GL_AMD_compressed_ATC_texture 1
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* EXT extension functions
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_EXT_texture_filter_anisotropic */
|
||||
#ifndef GL_EXT_texture_filter_anisotropic
|
||||
#define GL_EXT_texture_filter_anisotropic 1
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __glext_h_ */
|
||||
|
29
Engine/ExtIncludes/OpenGLES2.0/ARM/include/GLES/glplatform.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
#ifndef __glplatform_h_
|
||||
#define __glplatform_h_
|
||||
|
||||
/* $Revision: 7172 $ on $Date:: 2009-01-09 11:17:41 -0800 #$ */
|
||||
|
||||
/*
|
||||
* This document is licensed under the SGI Free Software B License Version
|
||||
* 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
|
||||
*/
|
||||
|
||||
/* Platform-specific types and definitions for OpenGL ES 1.X gl.h
|
||||
* Last modified on 2008/12/19
|
||||
*
|
||||
* Adopters may modify khrplatform.h and this file to suit their platform.
|
||||
* You are encouraged to submit all modifications to the Khronos group so that
|
||||
* they can be included in future versions of this file. Please submit changes
|
||||
* by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
|
||||
* by filing a bug against product "OpenGL-ES" component "Registry".
|
||||
*/
|
||||
|
||||
#include <KHR/khrplatform.h>
|
||||
|
||||
#ifndef GL_API
|
||||
#define GL_API KHRONOS_APICALL
|
||||
#endif
|
||||
|
||||
#define GL_APIENTRY KHRONOS_APIENTRY
|
||||
|
||||
#endif /* __glplatform_h_ */
|
620
Engine/ExtIncludes/OpenGLES2.0/ARM/include/GLES2/gl2.h
Normal file
|
@ -0,0 +1,620 @@
|
|||
#ifndef __gl2_h_
|
||||
#define __gl2_h_
|
||||
|
||||
/* $Revision: 7173 $ on $Date:: 2009-01-09 11:18:21 -0800 #$ */
|
||||
|
||||
#include <GLES2/gl2platform.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This document is licensed under the SGI Free Software B License Version
|
||||
* 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
|
||||
*/
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Data type definitions
|
||||
*-----------------------------------------------------------------------*/
|
||||
|
||||
typedef void GLvoid;
|
||||
typedef unsigned int GLenum;
|
||||
typedef unsigned char GLboolean;
|
||||
typedef unsigned int GLbitfield;
|
||||
typedef khronos_int8_t GLbyte;
|
||||
typedef short GLshort;
|
||||
typedef int GLint;
|
||||
typedef int GLsizei;
|
||||
typedef khronos_uint8_t GLubyte;
|
||||
typedef unsigned short GLushort;
|
||||
typedef unsigned int GLuint;
|
||||
typedef khronos_float_t GLfloat;
|
||||
typedef khronos_float_t GLclampf;
|
||||
typedef khronos_int32_t GLfixed;
|
||||
|
||||
/* GL types for handling large vertex buffer objects */
|
||||
typedef khronos_intptr_t GLintptr;
|
||||
typedef khronos_ssize_t GLsizeiptr;
|
||||
|
||||
/* OpenGL ES core versions */
|
||||
#define GL_ES_VERSION_2_0 1
|
||||
|
||||
/* ClearBufferMask */
|
||||
#define GL_DEPTH_BUFFER_BIT 0x00000100
|
||||
#define GL_STENCIL_BUFFER_BIT 0x00000400
|
||||
#define GL_COLOR_BUFFER_BIT 0x00004000
|
||||
|
||||
/* Boolean */
|
||||
#define GL_FALSE 0
|
||||
#define GL_TRUE 1
|
||||
|
||||
/* BeginMode */
|
||||
#define GL_POINTS 0x0000
|
||||
#define GL_LINES 0x0001
|
||||
#define GL_LINE_LOOP 0x0002
|
||||
#define GL_LINE_STRIP 0x0003
|
||||
#define GL_TRIANGLES 0x0004
|
||||
#define GL_TRIANGLE_STRIP 0x0005
|
||||
#define GL_TRIANGLE_FAN 0x0006
|
||||
|
||||
/* AlphaFunction (not supported in ES20) */
|
||||
/* GL_NEVER */
|
||||
/* GL_LESS */
|
||||
/* GL_EQUAL */
|
||||
/* GL_LEQUAL */
|
||||
/* GL_GREATER */
|
||||
/* GL_NOTEQUAL */
|
||||
/* GL_GEQUAL */
|
||||
/* GL_ALWAYS */
|
||||
|
||||
/* BlendingFactorDest */
|
||||
#define GL_ZERO 0
|
||||
#define GL_ONE 1
|
||||
#define GL_SRC_COLOR 0x0300
|
||||
#define GL_ONE_MINUS_SRC_COLOR 0x0301
|
||||
#define GL_SRC_ALPHA 0x0302
|
||||
#define GL_ONE_MINUS_SRC_ALPHA 0x0303
|
||||
#define GL_DST_ALPHA 0x0304
|
||||
#define GL_ONE_MINUS_DST_ALPHA 0x0305
|
||||
|
||||
/* BlendingFactorSrc */
|
||||
/* GL_ZERO */
|
||||
/* GL_ONE */
|
||||
#define GL_DST_COLOR 0x0306
|
||||
#define GL_ONE_MINUS_DST_COLOR 0x0307
|
||||
#define GL_SRC_ALPHA_SATURATE 0x0308
|
||||
/* GL_SRC_ALPHA */
|
||||
/* GL_ONE_MINUS_SRC_ALPHA */
|
||||
/* GL_DST_ALPHA */
|
||||
/* GL_ONE_MINUS_DST_ALPHA */
|
||||
|
||||
/* BlendEquationSeparate */
|
||||
#define GL_FUNC_ADD 0x8006
|
||||
#define GL_BLEND_EQUATION 0x8009
|
||||
#define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */
|
||||
#define GL_BLEND_EQUATION_ALPHA 0x883D
|
||||
|
||||
/* BlendSubtract */
|
||||
#define GL_FUNC_SUBTRACT 0x800A
|
||||
#define GL_FUNC_REVERSE_SUBTRACT 0x800B
|
||||
|
||||
/* Separate Blend Functions */
|
||||
#define GL_BLEND_DST_RGB 0x80C8
|
||||
#define GL_BLEND_SRC_RGB 0x80C9
|
||||
#define GL_BLEND_DST_ALPHA 0x80CA
|
||||
#define GL_BLEND_SRC_ALPHA 0x80CB
|
||||
#define GL_CONSTANT_COLOR 0x8001
|
||||
#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
|
||||
#define GL_CONSTANT_ALPHA 0x8003
|
||||
#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
|
||||
#define GL_BLEND_COLOR 0x8005
|
||||
|
||||
/* Buffer Objects */
|
||||
#define GL_ARRAY_BUFFER 0x8892
|
||||
#define GL_ELEMENT_ARRAY_BUFFER 0x8893
|
||||
#define GL_ARRAY_BUFFER_BINDING 0x8894
|
||||
#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
|
||||
|
||||
#define GL_STREAM_DRAW 0x88E0
|
||||
#define GL_STATIC_DRAW 0x88E4
|
||||
#define GL_DYNAMIC_DRAW 0x88E8
|
||||
|
||||
#define GL_BUFFER_SIZE 0x8764
|
||||
#define GL_BUFFER_USAGE 0x8765
|
||||
|
||||
#define GL_CURRENT_VERTEX_ATTRIB 0x8626
|
||||
|
||||
/* CullFaceMode */
|
||||
#define GL_FRONT 0x0404
|
||||
#define GL_BACK 0x0405
|
||||
#define GL_FRONT_AND_BACK 0x0408
|
||||
|
||||
/* DepthFunction */
|
||||
/* GL_NEVER */
|
||||
/* GL_LESS */
|
||||
/* GL_EQUAL */
|
||||
/* GL_LEQUAL */
|
||||
/* GL_GREATER */
|
||||
/* GL_NOTEQUAL */
|
||||
/* GL_GEQUAL */
|
||||
/* GL_ALWAYS */
|
||||
|
||||
/* EnableCap */
|
||||
#define GL_TEXTURE_2D 0x0DE1
|
||||
#define GL_CULL_FACE 0x0B44
|
||||
#define GL_BLEND 0x0BE2
|
||||
#define GL_DITHER 0x0BD0
|
||||
#define GL_STENCIL_TEST 0x0B90
|
||||
#define GL_DEPTH_TEST 0x0B71
|
||||
#define GL_SCISSOR_TEST 0x0C11
|
||||
#define GL_POLYGON_OFFSET_FILL 0x8037
|
||||
#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
|
||||
#define GL_SAMPLE_COVERAGE 0x80A0
|
||||
|
||||
/* ErrorCode */
|
||||
#define GL_NO_ERROR 0
|
||||
#define GL_INVALID_ENUM 0x0500
|
||||
#define GL_INVALID_VALUE 0x0501
|
||||
#define GL_INVALID_OPERATION 0x0502
|
||||
#define GL_OUT_OF_MEMORY 0x0505
|
||||
|
||||
/* FrontFaceDirection */
|
||||
#define GL_CW 0x0900
|
||||
#define GL_CCW 0x0901
|
||||
|
||||
/* GetPName */
|
||||
#define GL_LINE_WIDTH 0x0B21
|
||||
#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
|
||||
#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
|
||||
#define GL_CULL_FACE_MODE 0x0B45
|
||||
#define GL_FRONT_FACE 0x0B46
|
||||
#define GL_DEPTH_RANGE 0x0B70
|
||||
#define GL_DEPTH_WRITEMASK 0x0B72
|
||||
#define GL_DEPTH_CLEAR_VALUE 0x0B73
|
||||
#define GL_DEPTH_FUNC 0x0B74
|
||||
#define GL_STENCIL_CLEAR_VALUE 0x0B91
|
||||
#define GL_STENCIL_FUNC 0x0B92
|
||||
#define GL_STENCIL_FAIL 0x0B94
|
||||
#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
|
||||
#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
|
||||
#define GL_STENCIL_REF 0x0B97
|
||||
#define GL_STENCIL_VALUE_MASK 0x0B93
|
||||
#define GL_STENCIL_WRITEMASK 0x0B98
|
||||
#define GL_STENCIL_BACK_FUNC 0x8800
|
||||
#define GL_STENCIL_BACK_FAIL 0x8801
|
||||
#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
|
||||
#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
|
||||
#define GL_STENCIL_BACK_REF 0x8CA3
|
||||
#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
|
||||
#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
|
||||
#define GL_VIEWPORT 0x0BA2
|
||||
#define GL_SCISSOR_BOX 0x0C10
|
||||
/* GL_SCISSOR_TEST */
|
||||
#define GL_COLOR_CLEAR_VALUE 0x0C22
|
||||
#define GL_COLOR_WRITEMASK 0x0C23
|
||||
#define GL_UNPACK_ALIGNMENT 0x0CF5
|
||||
#define GL_PACK_ALIGNMENT 0x0D05
|
||||
#define GL_MAX_TEXTURE_SIZE 0x0D33
|
||||
#define GL_MAX_VIEWPORT_DIMS 0x0D3A
|
||||
#define GL_SUBPIXEL_BITS 0x0D50
|
||||
#define GL_RED_BITS 0x0D52
|
||||
#define GL_GREEN_BITS 0x0D53
|
||||
#define GL_BLUE_BITS 0x0D54
|
||||
#define GL_ALPHA_BITS 0x0D55
|
||||
#define GL_DEPTH_BITS 0x0D56
|
||||
#define GL_STENCIL_BITS 0x0D57
|
||||
#define GL_POLYGON_OFFSET_UNITS 0x2A00
|
||||
/* GL_POLYGON_OFFSET_FILL */
|
||||
#define GL_POLYGON_OFFSET_FACTOR 0x8038
|
||||
#define GL_TEXTURE_BINDING_2D 0x8069
|
||||
#define GL_SAMPLE_BUFFERS 0x80A8
|
||||
#define GL_SAMPLES 0x80A9
|
||||
#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
|
||||
#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
|
||||
|
||||
/* GetTextureParameter */
|
||||
/* GL_TEXTURE_MAG_FILTER */
|
||||
/* GL_TEXTURE_MIN_FILTER */
|
||||
/* GL_TEXTURE_WRAP_S */
|
||||
/* GL_TEXTURE_WRAP_T */
|
||||
|
||||
#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
|
||||
#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
|
||||
|
||||
/* HintMode */
|
||||
#define GL_DONT_CARE 0x1100
|
||||
#define GL_FASTEST 0x1101
|
||||
#define GL_NICEST 0x1102
|
||||
|
||||
/* HintTarget */
|
||||
#define GL_GENERATE_MIPMAP_HINT 0x8192
|
||||
|
||||
/* DataType */
|
||||
#define GL_BYTE 0x1400
|
||||
#define GL_UNSIGNED_BYTE 0x1401
|
||||
#define GL_SHORT 0x1402
|
||||
#define GL_UNSIGNED_SHORT 0x1403
|
||||
#define GL_INT 0x1404
|
||||
#define GL_UNSIGNED_INT 0x1405
|
||||
#define GL_FLOAT 0x1406
|
||||
#define GL_FIXED 0x140C
|
||||
|
||||
/* PixelFormat */
|
||||
#define GL_DEPTH_COMPONENT 0x1902
|
||||
#define GL_ALPHA 0x1906
|
||||
#define GL_RGB 0x1907
|
||||
#define GL_RGBA 0x1908
|
||||
#define GL_LUMINANCE 0x1909
|
||||
#define GL_LUMINANCE_ALPHA 0x190A
|
||||
|
||||
/* PixelType */
|
||||
/* GL_UNSIGNED_BYTE */
|
||||
#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
|
||||
#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
|
||||
#define GL_UNSIGNED_SHORT_5_6_5 0x8363
|
||||
|
||||
/* Shaders */
|
||||
#define GL_FRAGMENT_SHADER 0x8B30
|
||||
#define GL_VERTEX_SHADER 0x8B31
|
||||
#define GL_MAX_VERTEX_ATTRIBS 0x8869
|
||||
#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
|
||||
#define GL_MAX_VARYING_VECTORS 0x8DFC
|
||||
#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
|
||||
#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
|
||||
#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
|
||||
#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
|
||||
#define GL_SHADER_TYPE 0x8B4F
|
||||
#define GL_DELETE_STATUS 0x8B80
|
||||
#define GL_LINK_STATUS 0x8B82
|
||||
#define GL_VALIDATE_STATUS 0x8B83
|
||||
#define GL_ATTACHED_SHADERS 0x8B85
|
||||
#define GL_ACTIVE_UNIFORMS 0x8B86
|
||||
#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
|
||||
#define GL_ACTIVE_ATTRIBUTES 0x8B89
|
||||
#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
|
||||
#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
|
||||
#define GL_CURRENT_PROGRAM 0x8B8D
|
||||
|
||||
/* StencilFunction */
|
||||
#define GL_NEVER 0x0200
|
||||
#define GL_LESS 0x0201
|
||||
#define GL_EQUAL 0x0202
|
||||
#define GL_LEQUAL 0x0203
|
||||
#define GL_GREATER 0x0204
|
||||
#define GL_NOTEQUAL 0x0205
|
||||
#define GL_GEQUAL 0x0206
|
||||
#define GL_ALWAYS 0x0207
|
||||
|
||||
/* StencilOp */
|
||||
/* GL_ZERO */
|
||||
#define GL_KEEP 0x1E00
|
||||
#define GL_REPLACE 0x1E01
|
||||
#define GL_INCR 0x1E02
|
||||
#define GL_DECR 0x1E03
|
||||
#define GL_INVERT 0x150A
|
||||
#define GL_INCR_WRAP 0x8507
|
||||
#define GL_DECR_WRAP 0x8508
|
||||
|
||||
/* StringName */
|
||||
#define GL_VENDOR 0x1F00
|
||||
#define GL_RENDERER 0x1F01
|
||||
#define GL_VERSION 0x1F02
|
||||
#define GL_EXTENSIONS 0x1F03
|
||||
|
||||
/* TextureMagFilter */
|
||||
#define GL_NEAREST 0x2600
|
||||
#define GL_LINEAR 0x2601
|
||||
|
||||
/* TextureMinFilter */
|
||||
/* GL_NEAREST */
|
||||
/* GL_LINEAR */
|
||||
#define GL_NEAREST_MIPMAP_NEAREST 0x2700
|
||||
#define GL_LINEAR_MIPMAP_NEAREST 0x2701
|
||||
#define GL_NEAREST_MIPMAP_LINEAR 0x2702
|
||||
#define GL_LINEAR_MIPMAP_LINEAR 0x2703
|
||||
|
||||
/* TextureParameterName */
|
||||
#define GL_TEXTURE_MAG_FILTER 0x2800
|
||||
#define GL_TEXTURE_MIN_FILTER 0x2801
|
||||
#define GL_TEXTURE_WRAP_S 0x2802
|
||||
#define GL_TEXTURE_WRAP_T 0x2803
|
||||
|
||||
/* TextureTarget */
|
||||
/* GL_TEXTURE_2D */
|
||||
#define GL_TEXTURE 0x1702
|
||||
|
||||
#define GL_TEXTURE_CUBE_MAP 0x8513
|
||||
#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
|
||||
#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
|
||||
|
||||
/* TextureUnit */
|
||||
#define GL_TEXTURE0 0x84C0
|
||||
#define GL_TEXTURE1 0x84C1
|
||||
#define GL_TEXTURE2 0x84C2
|
||||
#define GL_TEXTURE3 0x84C3
|
||||
#define GL_TEXTURE4 0x84C4
|
||||
#define GL_TEXTURE5 0x84C5
|
||||
#define GL_TEXTURE6 0x84C6
|
||||
#define GL_TEXTURE7 0x84C7
|
||||
#define GL_TEXTURE8 0x84C8
|
||||
#define GL_TEXTURE9 0x84C9
|
||||
#define GL_TEXTURE10 0x84CA
|
||||
#define GL_TEXTURE11 0x84CB
|
||||
#define GL_TEXTURE12 0x84CC
|
||||
#define GL_TEXTURE13 0x84CD
|
||||
#define GL_TEXTURE14 0x84CE
|
||||
#define GL_TEXTURE15 0x84CF
|
||||
#define GL_TEXTURE16 0x84D0
|
||||
#define GL_TEXTURE17 0x84D1
|
||||
#define GL_TEXTURE18 0x84D2
|
||||
#define GL_TEXTURE19 0x84D3
|
||||
#define GL_TEXTURE20 0x84D4
|
||||
#define GL_TEXTURE21 0x84D5
|
||||
#define GL_TEXTURE22 0x84D6
|
||||
#define GL_TEXTURE23 0x84D7
|
||||
#define GL_TEXTURE24 0x84D8
|
||||
#define GL_TEXTURE25 0x84D9
|
||||
#define GL_TEXTURE26 0x84DA
|
||||
#define GL_TEXTURE27 0x84DB
|
||||
#define GL_TEXTURE28 0x84DC
|
||||
#define GL_TEXTURE29 0x84DD
|
||||
#define GL_TEXTURE30 0x84DE
|
||||
#define GL_TEXTURE31 0x84DF
|
||||
#define GL_ACTIVE_TEXTURE 0x84E0
|
||||
|
||||
/* TextureWrapMode */
|
||||
#define GL_REPEAT 0x2901
|
||||
#define GL_CLAMP_TO_EDGE 0x812F
|
||||
#define GL_MIRRORED_REPEAT 0x8370
|
||||
|
||||
/* Uniform Types */
|
||||
#define GL_FLOAT_VEC2 0x8B50
|
||||
#define GL_FLOAT_VEC3 0x8B51
|
||||
#define GL_FLOAT_VEC4 0x8B52
|
||||
#define GL_INT_VEC2 0x8B53
|
||||
#define GL_INT_VEC3 0x8B54
|
||||
#define GL_INT_VEC4 0x8B55
|
||||
#define GL_BOOL 0x8B56
|
||||
#define GL_BOOL_VEC2 0x8B57
|
||||
#define GL_BOOL_VEC3 0x8B58
|
||||
#define GL_BOOL_VEC4 0x8B59
|
||||
#define GL_FLOAT_MAT2 0x8B5A
|
||||
#define GL_FLOAT_MAT3 0x8B5B
|
||||
#define GL_FLOAT_MAT4 0x8B5C
|
||||
#define GL_SAMPLER_2D 0x8B5E
|
||||
#define GL_SAMPLER_CUBE 0x8B60
|
||||
|
||||
/* Vertex Arrays */
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
|
||||
|
||||
/* Read Format */
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
|
||||
|
||||
/* Shader Source */
|
||||
#define GL_COMPILE_STATUS 0x8B81
|
||||
#define GL_INFO_LOG_LENGTH 0x8B84
|
||||
#define GL_SHADER_SOURCE_LENGTH 0x8B88
|
||||
#define GL_SHADER_COMPILER 0x8DFA
|
||||
|
||||
/* Shader Binary */
|
||||
#define GL_SHADER_BINARY_FORMATS 0x8DF8
|
||||
#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
|
||||
|
||||
/* Shader Precision-Specified Types */
|
||||
#define GL_LOW_FLOAT 0x8DF0
|
||||
#define GL_MEDIUM_FLOAT 0x8DF1
|
||||
#define GL_HIGH_FLOAT 0x8DF2
|
||||
#define GL_LOW_INT 0x8DF3
|
||||
#define GL_MEDIUM_INT 0x8DF4
|
||||
#define GL_HIGH_INT 0x8DF5
|
||||
|
||||
/* Framebuffer Object. */
|
||||
#define GL_FRAMEBUFFER 0x8D40
|
||||
#define GL_RENDERBUFFER 0x8D41
|
||||
|
||||
#define GL_RGBA4 0x8056
|
||||
#define GL_RGB5_A1 0x8057
|
||||
#define GL_RGB565 0x8D62
|
||||
#define GL_DEPTH_COMPONENT16 0x81A5
|
||||
#define GL_STENCIL_INDEX 0x1901
|
||||
#define GL_STENCIL_INDEX8 0x8D48
|
||||
|
||||
#define GL_RENDERBUFFER_WIDTH 0x8D42
|
||||
#define GL_RENDERBUFFER_HEIGHT 0x8D43
|
||||
#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
|
||||
#define GL_RENDERBUFFER_RED_SIZE 0x8D50
|
||||
#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
|
||||
#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
|
||||
#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
|
||||
#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
|
||||
#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
|
||||
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
|
||||
|
||||
#define GL_COLOR_ATTACHMENT0 0x8CE0
|
||||
#define GL_DEPTH_ATTACHMENT 0x8D00
|
||||
#define GL_STENCIL_ATTACHMENT 0x8D20
|
||||
|
||||
#define GL_NONE 0
|
||||
|
||||
#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
|
||||
#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
|
||||
|
||||
#define GL_FRAMEBUFFER_BINDING 0x8CA6
|
||||
#define GL_RENDERBUFFER_BINDING 0x8CA7
|
||||
#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
|
||||
|
||||
#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* GL core functions.
|
||||
*-----------------------------------------------------------------------*/
|
||||
|
||||
GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
|
||||
GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const char* name);
|
||||
GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
|
||||
GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
|
||||
GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
|
||||
GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
|
||||
GL_APICALL void GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||
GL_APICALL void GL_APIENTRY glBlendEquation ( GLenum mode );
|
||||
GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
|
||||
GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
|
||||
GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
|
||||
GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void* data, GLenum usage);
|
||||
GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void* data);
|
||||
GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
|
||||
GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
|
||||
GL_APICALL void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||
GL_APICALL void GL_APIENTRY glClearDepthf (GLclampf depth);
|
||||
GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
|
||||
GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
||||
GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data);
|
||||
GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data);
|
||||
GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
|
||||
GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
|
||||
GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
|
||||
GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
|
||||
GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers);
|
||||
GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers);
|
||||
GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers);
|
||||
GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures);
|
||||
GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
|
||||
GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
|
||||
GL_APICALL void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
|
||||
GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
|
||||
GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
|
||||
GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
|
||||
GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void* indices);
|
||||
GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
|
||||
GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
|
||||
GL_APICALL void GL_APIENTRY glFinish (void);
|
||||
GL_APICALL void GL_APIENTRY glFlush (void);
|
||||
GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
|
||||
GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers);
|
||||
GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
|
||||
GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers);
|
||||
GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);
|
||||
GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures);
|
||||
GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
|
||||
GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
|
||||
GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
|
||||
GL_APICALL int GL_APIENTRY glGetAttribLocation (GLuint program, const char* name);
|
||||
GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params);
|
||||
GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
|
||||
GL_APICALL GLenum GL_APIENTRY glGetError (void);
|
||||
GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params);
|
||||
GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, char* infolog);
|
||||
GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, char* source);
|
||||
GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name);
|
||||
GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
|
||||
GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);
|
||||
GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);
|
||||
GL_APICALL int GL_APIENTRY glGetUniformLocation (GLuint program, const char* name);
|
||||
GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
|
||||
GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void** pointer);
|
||||
GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
|
||||
GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
|
||||
GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
|
||||
GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
|
||||
GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels);
|
||||
GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
|
||||
GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
GL_APICALL void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
|
||||
GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length);
|
||||
GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const char** string, const GLint* length);
|
||||
GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
|
||||
GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
|
||||
GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels);
|
||||
GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
|
||||
GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params);
|
||||
GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
|
||||
GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels);
|
||||
GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat x);
|
||||
GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint x);
|
||||
GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y);
|
||||
GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y);
|
||||
GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z);
|
||||
GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z);
|
||||
GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w);
|
||||
GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v);
|
||||
GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
|
||||
GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
|
||||
GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
|
||||
GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr);
|
||||
GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __gl2_h_ */
|
359
Engine/ExtIncludes/OpenGLES2.0/ARM/include/GLES2/gl2ext.h
Normal file
|
@ -0,0 +1,359 @@
|
|||
#ifndef __gl2ext_h_
|
||||
#define __gl2ext_h_
|
||||
|
||||
/* $Revision: 7173 $ on $Date:: 2009-01-09 11:18:21 -0800 #$ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This document is licensed under the SGI Free Software B License Version
|
||||
* 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
|
||||
*/
|
||||
|
||||
#ifndef GL_APIENTRYP
|
||||
# define GL_APIENTRYP GL_APIENTRY*
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* OES extension tokens
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_OES_compressed_ETC1_RGB8_texture */
|
||||
#ifndef GL_OES_compressed_ETC1_RGB8_texture
|
||||
#define GL_ETC1_RGB8_OES 0x8D64
|
||||
#endif
|
||||
|
||||
/* GL_OES_compressed_paletted_texture */
|
||||
#ifndef GL_OES_compressed_paletted_texture
|
||||
#define GL_PALETTE4_RGB8_OES 0x8B90
|
||||
#define GL_PALETTE4_RGBA8_OES 0x8B91
|
||||
#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
|
||||
#define GL_PALETTE4_RGBA4_OES 0x8B93
|
||||
#define GL_PALETTE4_RGB5_A1_OES 0x8B94
|
||||
#define GL_PALETTE8_RGB8_OES 0x8B95
|
||||
#define GL_PALETTE8_RGBA8_OES 0x8B96
|
||||
#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
|
||||
#define GL_PALETTE8_RGBA4_OES 0x8B98
|
||||
#define GL_PALETTE8_RGB5_A1_OES 0x8B99
|
||||
#endif
|
||||
|
||||
/* GL_OES_depth24 */
|
||||
#ifndef GL_OES_depth24
|
||||
#define GL_DEPTH_COMPONENT24_OES 0x81A6
|
||||
#endif
|
||||
|
||||
/* GL_OES_depth32 */
|
||||
#ifndef GL_OES_depth32
|
||||
#define GL_DEPTH_COMPONENT32_OES 0x81A7
|
||||
#endif
|
||||
|
||||
/* GL_OES_depth_texture */
|
||||
/* No new tokens introduced by this extension. */
|
||||
|
||||
/* GL_OES_EGL_image */
|
||||
#ifndef GL_OES_EGL_image
|
||||
typedef void* GLeglImageOES;
|
||||
#endif
|
||||
|
||||
/* GL_OES_get_program_binary */
|
||||
#ifndef GL_OES_get_program_binary
|
||||
#define GL_PROGRAM_BINARY_LENGTH_OES 0x8741
|
||||
#define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE
|
||||
#define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF
|
||||
#endif
|
||||
|
||||
/* GL_OES_mapbuffer */
|
||||
#ifndef GL_OES_mapbuffer
|
||||
#define GL_WRITE_ONLY_OES 0x88B9
|
||||
#define GL_BUFFER_ACCESS_OES 0x88BB
|
||||
#define GL_BUFFER_MAPPED_OES 0x88BC
|
||||
#define GL_BUFFER_MAP_POINTER_OES 0x88BD
|
||||
#endif
|
||||
|
||||
/* GL_OES_packed_depth_stencil */
|
||||
#ifndef GL_OES_packed_depth_stencil
|
||||
#define GL_DEPTH_STENCIL_OES 0x84F9
|
||||
#define GL_UNSIGNED_INT_24_8_OES 0x84FA
|
||||
#define GL_DEPTH24_STENCIL8_OES 0x88F0
|
||||
#endif
|
||||
|
||||
/* GL_OES_rgb8_rgba8 */
|
||||
#ifndef GL_OES_rgb8_rgba8
|
||||
#define GL_RGB8_OES 0x8051
|
||||
#define GL_RGBA8_OES 0x8058
|
||||
#endif
|
||||
|
||||
/* GL_OES_standard_derivatives */
|
||||
#ifndef GL_OES_standard_derivatives
|
||||
#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B
|
||||
#endif
|
||||
|
||||
/* GL_OES_stencil1 */
|
||||
#ifndef GL_OES_stencil1
|
||||
#define GL_STENCIL_INDEX1_OES 0x8D46
|
||||
#endif
|
||||
|
||||
/* GL_OES_stencil4 */
|
||||
#ifndef GL_OES_stencil4
|
||||
#define GL_STENCIL_INDEX4_OES 0x8D47
|
||||
#endif
|
||||
|
||||
/* GL_OES_texture3D */
|
||||
#ifndef GL_OES_texture3D
|
||||
#define GL_TEXTURE_WRAP_R_OES 0x8072
|
||||
#define GL_TEXTURE_3D_OES 0x806F
|
||||
#define GL_TEXTURE_BINDING_3D_OES 0x806A
|
||||
#define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073
|
||||
#define GL_SAMPLER_3D_OES 0x8B5F
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4
|
||||
#endif
|
||||
|
||||
/* GL_OES_texture_half_float */
|
||||
#ifndef GL_OES_texture_half_float
|
||||
#define GL_HALF_FLOAT_OES 0x8D61
|
||||
#endif
|
||||
|
||||
/* GL_OES_vertex_half_float */
|
||||
/* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */
|
||||
|
||||
/* GL_OES_vertex_type_10_10_10_2 */
|
||||
#ifndef GL_OES_vertex_type_10_10_10_2
|
||||
#define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6
|
||||
#define GL_INT_10_10_10_2_OES 0x8DF7
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* AMD extension tokens
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_AMD_compressed_3DC_texture */
|
||||
#ifndef GL_AMD_compressed_3DC_texture
|
||||
#define GL_3DC_X_AMD 0x87F9
|
||||
#define GL_3DC_XY_AMD 0x87FA
|
||||
#endif
|
||||
|
||||
/* GL_AMD_compressed_ATC_texture */
|
||||
#ifndef GL_AMD_compressed_ATC_texture
|
||||
#define GL_ATC_RGB_AMD 0x8C92
|
||||
#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
|
||||
#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
|
||||
#endif
|
||||
|
||||
/* GL_AMD_program_binary_Z400 */
|
||||
#ifndef GL_AMD_program_binary_Z400
|
||||
#define GL_Z400_BINARY_AMD 0x8740
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* EXT extension tokens
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_EXT_texture_filter_anisotropic */
|
||||
#ifndef GL_EXT_texture_filter_anisotropic
|
||||
#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
|
||||
#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
|
||||
#endif
|
||||
|
||||
/* GL_EXT_texture_type_2_10_10_10_REV */
|
||||
#ifndef GL_EXT_texture_type_2_10_10_10_REV
|
||||
#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* OES extension functions
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_OES_compressed_ETC1_RGB8_texture */
|
||||
#ifndef GL_OES_compressed_ETC1_RGB8_texture
|
||||
#define GL_OES_compressed_ETC1_RGB8_texture 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_compressed_paletted_texture */
|
||||
#ifndef GL_OES_compressed_paletted_texture
|
||||
#define GL_OES_compressed_paletted_texture 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_EGL_image */
|
||||
#ifndef GL_OES_EGL_image
|
||||
#define GL_OES_EGL_image 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
|
||||
GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
|
||||
#endif
|
||||
typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
|
||||
typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
|
||||
#endif
|
||||
|
||||
/* GL_OES_depth24 */
|
||||
#ifndef GL_OES_depth24
|
||||
#define GL_OES_depth24 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_depth32 */
|
||||
#ifndef GL_OES_depth32
|
||||
#define GL_OES_depth32 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_depth_texture */
|
||||
#ifndef GL_OES_depth_texture
|
||||
#define GL_OES_depth_texture 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_element_index_uint */
|
||||
#ifndef GL_OES_element_index_uint
|
||||
#define GL_OES_element_index_uint 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_fbo_render_mipmap */
|
||||
#ifndef GL_OES_fbo_render_mipmap
|
||||
#define GL_OES_fbo_render_mipmap 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_fragment_precision_high */
|
||||
#ifndef GL_OES_fragment_precision_high
|
||||
#define GL_OES_fragment_precision_high 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_get_program_binary */
|
||||
#ifndef GL_OES_get_program_binary
|
||||
#define GL_OES_get_program_binary 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
|
||||
GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const void *binary, GLint length);
|
||||
#endif
|
||||
typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
|
||||
typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLint length);
|
||||
#endif
|
||||
|
||||
/* GL_OES_mapbuffer */
|
||||
#ifndef GL_OES_mapbuffer
|
||||
#define GL_OES_mapbuffer 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
|
||||
GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
|
||||
GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, void** params);
|
||||
#endif
|
||||
typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
|
||||
typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void** params);
|
||||
#endif
|
||||
|
||||
/* GL_OES_packed_depth_stencil */
|
||||
#ifndef GL_OES_packed_depth_stencil
|
||||
#define GL_OES_packed_depth_stencil 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_rgb8_rgba8 */
|
||||
#ifndef GL_OES_rgb8_rgba8
|
||||
#define GL_OES_rgb8_rgba8 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_standard_derivatives */
|
||||
#ifndef GL_OES_standard_derivatives
|
||||
#define GL_OES_standard_derivatives 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_stencil1 */
|
||||
#ifndef GL_OES_stencil1
|
||||
#define GL_OES_stencil1 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_stencil4 */
|
||||
#ifndef GL_OES_stencil4
|
||||
#define GL_OES_stencil4 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_texture_3D */
|
||||
#ifndef GL_OES_texture_3D
|
||||
#define GL_OES_texture_3D 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels);
|
||||
GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels);
|
||||
GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data);
|
||||
GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data);
|
||||
GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
|
||||
#endif
|
||||
typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels);
|
||||
typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data);
|
||||
typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data);
|
||||
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
|
||||
#endif
|
||||
|
||||
/* GL_OES_texture_float_linear */
|
||||
#ifndef GL_OES_texture_float_linear
|
||||
#define GL_OES_texture_float_linear 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_texture_half_float_linear */
|
||||
#ifndef GL_OES_texture_half_float_linear
|
||||
#define GL_OES_texture_half_float_linear 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_texture_float */
|
||||
#ifndef GL_OES_texture_float
|
||||
#define GL_OES_texture_float 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_texture_half_float */
|
||||
#ifndef GL_OES_texture_half_float
|
||||
#define GL_OES_texture_half_float 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_texture_npot */
|
||||
#ifndef GL_OES_texture_npot
|
||||
#define GL_OES_texture_npot 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_vertex_half_float */
|
||||
#ifndef GL_OES_vertex_half_float
|
||||
#define GL_OES_vertex_half_float 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_vertex_type_10_10_10_2 */
|
||||
#ifndef GL_OES_vertex_type_10_10_10_2
|
||||
#define GL_OES_vertex_type_10_10_10_2 1
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* AMD extension functions
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_AMD_compressed_3DC_texture */
|
||||
#ifndef GL_AMD_compressed_3DC_texture
|
||||
#define GL_AMD_compressed_3DC_texture 1
|
||||
#endif
|
||||
|
||||
/* GL_AMD_compressed_ATC_texture */
|
||||
#ifndef GL_AMD_compressed_ATC_texture
|
||||
#define GL_AMD_compressed_ATC_texture 1
|
||||
#endif
|
||||
|
||||
/* GL_AMD_program_binary_Z400 */
|
||||
#ifndef GL_AMD_program_binary_Z400
|
||||
#define GL_AMD_program_binary_Z400 1
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* EXT extension functions
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_EXT_texture_filter_anisotropic */
|
||||
#ifndef GL_EXT_texture_filter_anisotropic
|
||||
#define GL_EXT_texture_filter_anisotropic 1
|
||||
#endif
|
||||
|
||||
/* GL_EXT_texture_type_2_10_10_10_REV */
|
||||
#ifndef GL_EXT_texture_type_2_10_10_10_REV
|
||||
#define GL_EXT_texture_type_2_10_10_10_REV 1
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __gl2ext_h_ */
|
48
Engine/ExtIncludes/OpenGLES2.0/ARM/include/GLES2/gl2extimg.h
Normal file
|
@ -0,0 +1,48 @@
|
|||
#ifndef __gl2extimg_h_
|
||||
#define __gl2extimg_h_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* IMG extension tokens
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_IMG_binary_shader */
|
||||
#ifndef GL_IMG_binary_shader
|
||||
#define GL_SGX_BINARY_IMG 0x8C0A
|
||||
#endif
|
||||
|
||||
/* GL_IMG_texture_compression_pvrtc */
|
||||
#ifndef GL_IMG_texture_compression_pvrtc
|
||||
#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
|
||||
#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
|
||||
#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
|
||||
#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
|
||||
#endif
|
||||
|
||||
|
||||
/* GL_IMG_texture_format_BGRA8888 */
|
||||
#define GL_BGRA 0x80E1
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* IMG extension functions
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_IMG_binary_shader */
|
||||
#ifndef GL_IMG_binary_shader
|
||||
#define GL_IMG_binary_shader 1
|
||||
#endif
|
||||
|
||||
/* GL_IMG_texture_compression_pvrtc */
|
||||
#ifndef GL_IMG_texture_compression_pvrtc
|
||||
#define GL_IMG_texture_compression_pvrtc 1
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __gl2extimg_h_ */
|
|
@ -0,0 +1,29 @@
|
|||
#ifndef __gl2platform_h_
|
||||
#define __gl2platform_h_
|
||||
|
||||
/* $Revision: 7173 $ on $Date:: 2009-01-09 11:18:21 -0800 #$ */
|
||||
|
||||
/*
|
||||
* This document is licensed under the SGI Free Software B License Version
|
||||
* 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
|
||||
*/
|
||||
|
||||
/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h
|
||||
* Last modified on 2008/12/19
|
||||
*
|
||||
* Adopters may modify khrplatform.h and this file to suit their platform.
|
||||
* You are encouraged to submit all modifications to the Khronos group so that
|
||||
* they can be included in future versions of this file. Please submit changes
|
||||
* by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
|
||||
* by filing a bug against product "OpenGL-ES" component "Registry".
|
||||
*/
|
||||
|
||||
#include <KHR/khrplatform.h>
|
||||
|
||||
#ifndef GL_APICALL
|
||||
#define GL_APICALL KHRONOS_APICALL
|
||||
#endif
|
||||
|
||||
#define GL_APIENTRY KHRONOS_APIENTRY
|
||||
|
||||
#endif /* __gl2platform_h_ */
|
43
Engine/ExtIncludes/OpenGLES2.0/ARM/include/KHR/khrplatform.h
Normal file
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
* This confidential and proprietary software may be used only as
|
||||
* authorised by a licensing agreement from ARM Limited
|
||||
* (C) COPYRIGHT 2009 ARM Limited
|
||||
* ALL RIGHTS RESERVED
|
||||
* The entire notice above must be reproduced on all authorised
|
||||
* copies and copies may only be made to the extent permitted
|
||||
* by a licensing agreement from ARM Limited.
|
||||
*/
|
||||
|
||||
#ifndef _MALI_KHRPLATFORM_H_
|
||||
#define _MALI_KHRPLATFORM_H_
|
||||
|
||||
#ifndef KHRONOS_APICALL
|
||||
#if (defined(_WIN32) || defined(__VC32__)) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
|
||||
# if defined (_DLL_EXPORTS)
|
||||
# define KHRONOS_APICALL __declspec(dllexport)
|
||||
# else
|
||||
# define KHRONOS_APICALL __declspec(dllimport)
|
||||
# endif
|
||||
#elif defined (__SYMBIAN32__)
|
||||
# define KHRONOS_APICALL IMPORT_C
|
||||
#else
|
||||
# define KHRONOS_APICALL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (defined(_WIN32) || defined(__VC32__)) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) && !defined(_WIN32_WCE) /* Win32 but not WinCE */
|
||||
#define KHRONOS_APIENTRY __stdcall
|
||||
#else
|
||||
#define KHRONOS_APIENTRY
|
||||
#endif
|
||||
|
||||
typedef signed char khronos_int8_t;
|
||||
typedef unsigned char khronos_uint8_t;
|
||||
typedef int khronos_int32_t;
|
||||
|
||||
typedef float khronos_float_t;
|
||||
|
||||
typedef int khronos_intptr_t;
|
||||
typedef int khronos_ssize_t;
|
||||
|
||||
#endif /* _MALI_KHRPLATFORM_H_ */
|
329
Engine/ExtIncludes/OpenGLES2.0/PowerVR/include/EGL/egl.h
Normal file
|
@ -0,0 +1,329 @@
|
|||
/* -*- mode: c; tab-width: 8; -*- */
|
||||
/* vi: set sw=4 ts=8: */
|
||||
/* Reference version of egl.h for EGL 1.4.
|
||||
*/
|
||||
|
||||
/*
|
||||
** Copyright (c) 2007-2009 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
#ifndef __egl_h_
|
||||
#define __egl_h_
|
||||
|
||||
/* All platform-dependent types and macro boilerplate (such as EGLAPI
|
||||
* and EGLAPIENTRY) should go in eglplatform.h.
|
||||
*/
|
||||
#include <EGL/eglplatform.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* EGL Types */
|
||||
/* EGLint is defined in eglplatform.h */
|
||||
typedef unsigned int EGLBoolean;
|
||||
typedef unsigned int EGLenum;
|
||||
typedef void *EGLConfig;
|
||||
typedef void *EGLContext;
|
||||
typedef void *EGLDisplay;
|
||||
typedef void *EGLSurface;
|
||||
typedef void *EGLClientBuffer;
|
||||
|
||||
/* EGL Versioning */
|
||||
#define EGL_VERSION_1_0 1
|
||||
#define EGL_VERSION_1_1 1
|
||||
#define EGL_VERSION_1_2 1
|
||||
#define EGL_VERSION_1_3 1
|
||||
#define EGL_VERSION_1_4 1
|
||||
|
||||
/* EGL Enumerants. Bitmasks and other exceptional cases aside, most
|
||||
* enums are assigned unique values starting at 0x3000.
|
||||
*/
|
||||
|
||||
/* EGL aliases */
|
||||
#define EGL_FALSE 0
|
||||
#define EGL_TRUE 1
|
||||
|
||||
/* Out-of-band handle values */
|
||||
#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0)
|
||||
#define EGL_NO_CONTEXT ((EGLContext)0)
|
||||
#define EGL_NO_DISPLAY ((EGLDisplay)0)
|
||||
#define EGL_NO_SURFACE ((EGLSurface)0)
|
||||
|
||||
/* Out-of-band attribute value */
|
||||
#define EGL_DONT_CARE ((EGLint)-1)
|
||||
|
||||
/* Errors / GetError return values */
|
||||
#define EGL_SUCCESS 0x3000
|
||||
#define EGL_NOT_INITIALIZED 0x3001
|
||||
#define EGL_BAD_ACCESS 0x3002
|
||||
#define EGL_BAD_ALLOC 0x3003
|
||||
#define EGL_BAD_ATTRIBUTE 0x3004
|
||||
#define EGL_BAD_CONFIG 0x3005
|
||||
#define EGL_BAD_CONTEXT 0x3006
|
||||
#define EGL_BAD_CURRENT_SURFACE 0x3007
|
||||
#define EGL_BAD_DISPLAY 0x3008
|
||||
#define EGL_BAD_MATCH 0x3009
|
||||
#define EGL_BAD_NATIVE_PIXMAP 0x300A
|
||||
#define EGL_BAD_NATIVE_WINDOW 0x300B
|
||||
#define EGL_BAD_PARAMETER 0x300C
|
||||
#define EGL_BAD_SURFACE 0x300D
|
||||
#define EGL_CONTEXT_LOST 0x300E /* EGL 1.1 - IMG_power_management */
|
||||
|
||||
/* Reserved 0x300F-0x301F for additional errors */
|
||||
|
||||
/* Config attributes */
|
||||
#define EGL_BUFFER_SIZE 0x3020
|
||||
#define EGL_ALPHA_SIZE 0x3021
|
||||
#define EGL_BLUE_SIZE 0x3022
|
||||
#define EGL_GREEN_SIZE 0x3023
|
||||
#define EGL_RED_SIZE 0x3024
|
||||
#define EGL_DEPTH_SIZE 0x3025
|
||||
#define EGL_STENCIL_SIZE 0x3026
|
||||
#define EGL_CONFIG_CAVEAT 0x3027
|
||||
#define EGL_CONFIG_ID 0x3028
|
||||
#define EGL_LEVEL 0x3029
|
||||
#define EGL_MAX_PBUFFER_HEIGHT 0x302A
|
||||
#define EGL_MAX_PBUFFER_PIXELS 0x302B
|
||||
#define EGL_MAX_PBUFFER_WIDTH 0x302C
|
||||
#define EGL_NATIVE_RENDERABLE 0x302D
|
||||
#define EGL_NATIVE_VISUAL_ID 0x302E
|
||||
#define EGL_NATIVE_VISUAL_TYPE 0x302F
|
||||
#define EGL_PRESERVED_RESOURCES 0x3030
|
||||
#define EGL_SAMPLES 0x3031
|
||||
#define EGL_SAMPLE_BUFFERS 0x3032
|
||||
#define EGL_SURFACE_TYPE 0x3033
|
||||
#define EGL_TRANSPARENT_TYPE 0x3034
|
||||
#define EGL_TRANSPARENT_BLUE_VALUE 0x3035
|
||||
#define EGL_TRANSPARENT_GREEN_VALUE 0x3036
|
||||
#define EGL_TRANSPARENT_RED_VALUE 0x3037
|
||||
#define EGL_NONE 0x3038 /* Attrib list terminator */
|
||||
#define EGL_BIND_TO_TEXTURE_RGB 0x3039
|
||||
#define EGL_BIND_TO_TEXTURE_RGBA 0x303A
|
||||
#define EGL_MIN_SWAP_INTERVAL 0x303B
|
||||
#define EGL_MAX_SWAP_INTERVAL 0x303C
|
||||
#define EGL_LUMINANCE_SIZE 0x303D
|
||||
#define EGL_ALPHA_MASK_SIZE 0x303E
|
||||
#define EGL_COLOR_BUFFER_TYPE 0x303F
|
||||
#define EGL_RENDERABLE_TYPE 0x3040
|
||||
#define EGL_MATCH_NATIVE_PIXMAP 0x3041 /* Pseudo-attribute (not queryable) */
|
||||
#define EGL_CONFORMANT 0x3042
|
||||
|
||||
/* Reserved 0x3041-0x304F for additional config attributes */
|
||||
|
||||
/* Config attribute values */
|
||||
#define EGL_SLOW_CONFIG 0x3050 /* EGL_CONFIG_CAVEAT value */
|
||||
#define EGL_NON_CONFORMANT_CONFIG 0x3051 /* EGL_CONFIG_CAVEAT value */
|
||||
#define EGL_TRANSPARENT_RGB 0x3052 /* EGL_TRANSPARENT_TYPE value */
|
||||
#define EGL_RGB_BUFFER 0x308E /* EGL_COLOR_BUFFER_TYPE value */
|
||||
#define EGL_LUMINANCE_BUFFER 0x308F /* EGL_COLOR_BUFFER_TYPE value */
|
||||
|
||||
/* More config attribute values, for EGL_TEXTURE_FORMAT */
|
||||
#define EGL_NO_TEXTURE 0x305C
|
||||
#define EGL_TEXTURE_RGB 0x305D
|
||||
#define EGL_TEXTURE_RGBA 0x305E
|
||||
#define EGL_TEXTURE_2D 0x305F
|
||||
|
||||
/* Config attribute mask bits */
|
||||
#define EGL_PBUFFER_BIT 0x0001 /* EGL_SURFACE_TYPE mask bits */
|
||||
#define EGL_PIXMAP_BIT 0x0002 /* EGL_SURFACE_TYPE mask bits */
|
||||
#define EGL_WINDOW_BIT 0x0004 /* EGL_SURFACE_TYPE mask bits */
|
||||
#define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020 /* EGL_SURFACE_TYPE mask bits */
|
||||
#define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040 /* EGL_SURFACE_TYPE mask bits */
|
||||
#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200 /* EGL_SURFACE_TYPE mask bits */
|
||||
#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400 /* EGL_SURFACE_TYPE mask bits */
|
||||
|
||||
#define EGL_OPENGL_ES_BIT 0x0001 /* EGL_RENDERABLE_TYPE mask bits */
|
||||
#define EGL_OPENVG_BIT 0x0002 /* EGL_RENDERABLE_TYPE mask bits */
|
||||
#define EGL_OPENGL_ES2_BIT 0x0004 /* EGL_RENDERABLE_TYPE mask bits */
|
||||
#define EGL_OPENGL_BIT 0x0008 /* EGL_RENDERABLE_TYPE mask bits */
|
||||
|
||||
/* QueryString targets */
|
||||
#define EGL_VENDOR 0x3053
|
||||
#define EGL_VERSION 0x3054
|
||||
#define EGL_EXTENSIONS 0x3055
|
||||
#define EGL_CLIENT_APIS 0x308D
|
||||
|
||||
/* QuerySurface / SurfaceAttrib / CreatePbufferSurface targets */
|
||||
#define EGL_HEIGHT 0x3056
|
||||
#define EGL_WIDTH 0x3057
|
||||
#define EGL_LARGEST_PBUFFER 0x3058
|
||||
#define EGL_TEXTURE_FORMAT 0x3080
|
||||
#define EGL_TEXTURE_TARGET 0x3081
|
||||
#define EGL_MIPMAP_TEXTURE 0x3082
|
||||
#define EGL_MIPMAP_LEVEL 0x3083
|
||||
#define EGL_RENDER_BUFFER 0x3086
|
||||
#define EGL_VG_COLORSPACE 0x3087
|
||||
#define EGL_VG_ALPHA_FORMAT 0x3088
|
||||
#define EGL_HORIZONTAL_RESOLUTION 0x3090
|
||||
#define EGL_VERTICAL_RESOLUTION 0x3091
|
||||
#define EGL_PIXEL_ASPECT_RATIO 0x3092
|
||||
#define EGL_SWAP_BEHAVIOR 0x3093
|
||||
#define EGL_MULTISAMPLE_RESOLVE 0x3099
|
||||
|
||||
/* EGL_RENDER_BUFFER values / BindTexImage / ReleaseTexImage buffer targets */
|
||||
#define EGL_BACK_BUFFER 0x3084
|
||||
#define EGL_SINGLE_BUFFER 0x3085
|
||||
|
||||
/* OpenVG color spaces */
|
||||
#define EGL_VG_COLORSPACE_sRGB 0x3089 /* EGL_VG_COLORSPACE value */
|
||||
#define EGL_VG_COLORSPACE_LINEAR 0x308A /* EGL_VG_COLORSPACE value */
|
||||
|
||||
/* OpenVG alpha formats */
|
||||
#define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B /* EGL_ALPHA_FORMAT value */
|
||||
#define EGL_VG_ALPHA_FORMAT_PRE 0x308C /* EGL_ALPHA_FORMAT value */
|
||||
|
||||
/* Constant scale factor by which fractional display resolutions &
|
||||
* aspect ratio are scaled when queried as integer values.
|
||||
*/
|
||||
#define EGL_DISPLAY_SCALING 10000
|
||||
|
||||
/* Unknown display resolution/aspect ratio */
|
||||
#define EGL_UNKNOWN ((EGLint)-1)
|
||||
|
||||
/* Back buffer swap behaviors */
|
||||
#define EGL_BUFFER_PRESERVED 0x3094 /* EGL_SWAP_BEHAVIOR value */
|
||||
#define EGL_BUFFER_DESTROYED 0x3095 /* EGL_SWAP_BEHAVIOR value */
|
||||
|
||||
/* CreatePbufferFromClientBuffer buffer types */
|
||||
#define EGL_OPENVG_IMAGE 0x3096
|
||||
|
||||
/* QueryContext targets */
|
||||
#define EGL_CONTEXT_CLIENT_TYPE 0x3097
|
||||
|
||||
/* CreateContext attributes */
|
||||
#define EGL_CONTEXT_CLIENT_VERSION 0x3098
|
||||
|
||||
/* Multisample resolution behaviors */
|
||||
#define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A /* EGL_MULTISAMPLE_RESOLVE value */
|
||||
#define EGL_MULTISAMPLE_RESOLVE_BOX 0x309B /* EGL_MULTISAMPLE_RESOLVE value */
|
||||
|
||||
/* BindAPI/QueryAPI targets */
|
||||
#define EGL_OPENGL_ES_API 0x30A0
|
||||
#define EGL_OPENVG_API 0x30A1
|
||||
#define EGL_OPENGL_API 0x30A2
|
||||
|
||||
/* GetCurrentSurface targets */
|
||||
#define EGL_DRAW 0x3059
|
||||
#define EGL_READ 0x305A
|
||||
|
||||
/* WaitNative engines */
|
||||
#define EGL_CORE_NATIVE_ENGINE 0x305B
|
||||
|
||||
/* EGL 1.2 tokens renamed for consistency in EGL 1.3 */
|
||||
#define EGL_COLORSPACE EGL_VG_COLORSPACE
|
||||
#define EGL_ALPHA_FORMAT EGL_VG_ALPHA_FORMAT
|
||||
#define EGL_COLORSPACE_sRGB EGL_VG_COLORSPACE_sRGB
|
||||
#define EGL_COLORSPACE_LINEAR EGL_VG_COLORSPACE_LINEAR
|
||||
#define EGL_ALPHA_FORMAT_NONPRE EGL_VG_ALPHA_FORMAT_NONPRE
|
||||
#define EGL_ALPHA_FORMAT_PRE EGL_VG_ALPHA_FORMAT_PRE
|
||||
|
||||
/* EGL extensions must request enum blocks from the Khronos
|
||||
* API Registrar, who maintains the enumerant registry. Submit
|
||||
* a bug in Khronos Bugzilla against task "Registry".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/* EGL Functions */
|
||||
|
||||
EGLAPI EGLint EGLAPIENTRY eglGetError(void);
|
||||
|
||||
EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy);
|
||||
|
||||
EGLAPI const char * EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name);
|
||||
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy, EGLConfig *configs,
|
||||
EGLint config_size, EGLint *num_config);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list,
|
||||
EGLConfig *configs, EGLint config_size,
|
||||
EGLint *num_config);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config,
|
||||
EGLint attribute, EGLint *value);
|
||||
|
||||
EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config,
|
||||
EGLNativeWindowType win,
|
||||
const EGLint *attrib_list);
|
||||
EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config,
|
||||
const EGLint *attrib_list);
|
||||
EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config,
|
||||
EGLNativePixmapType pixmap,
|
||||
const EGLint *attrib_list);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy, EGLSurface surface);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy, EGLSurface surface,
|
||||
EGLint attribute, EGLint *value);
|
||||
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api);
|
||||
EGLAPI EGLenum EGLAPIENTRY eglQueryAPI(void);
|
||||
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient(void);
|
||||
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread(void);
|
||||
|
||||
EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer(
|
||||
EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,
|
||||
EGLConfig config, const EGLint *attrib_list);
|
||||
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface,
|
||||
EGLint attribute, EGLint value);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
|
||||
|
||||
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval);
|
||||
|
||||
|
||||
EGLAPI EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy, EGLConfig config,
|
||||
EGLContext share_context,
|
||||
const EGLint *attrib_list);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy, EGLSurface draw,
|
||||
EGLSurface read, EGLContext ctx);
|
||||
|
||||
EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext(void);
|
||||
EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface(EGLint readdraw);
|
||||
EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay(void);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext(EGLDisplay dpy, EGLContext ctx,
|
||||
EGLint attribute, EGLint *value);
|
||||
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL(void);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface,
|
||||
EGLNativePixmapType target);
|
||||
|
||||
/* This is a generic function pointer type, whose name indicates it must
|
||||
* be cast to the proper type *and calling convention* before use.
|
||||
*/
|
||||
typedef void (*__eglMustCastToProperFunctionPointerType)(void);
|
||||
|
||||
/* Now, define eglGetProcAddress using the generic function ptr. type */
|
||||
EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY
|
||||
eglGetProcAddress(const char *procname);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __egl_h_ */
|
175
Engine/ExtIncludes/OpenGLES2.0/PowerVR/include/EGL/eglext.h
Normal file
|
@ -0,0 +1,175 @@
|
|||
#ifndef __eglext_h_
|
||||
#define __eglext_h_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2007-2009 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
#include <EGL/eglplatform.h>
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
/* Header file version number */
|
||||
/* Current version at http://www.khronos.org/registry/egl/ */
|
||||
#define EGL_EGLEXT_VERSION 4
|
||||
|
||||
#ifndef EGL_KHR_config_attribs
|
||||
#define EGL_KHR_config_attribs 1
|
||||
#define EGL_CONFORMANT_KHR 0x3042 /* EGLConfig attribute */
|
||||
#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR 0x0020 /* EGL_SURFACE_TYPE bitfield */
|
||||
#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR 0x0040 /* EGL_SURFACE_TYPE bitfield */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_lock_surface
|
||||
#define EGL_KHR_lock_surface 1
|
||||
#define EGL_READ_SURFACE_BIT_KHR 0x0001 /* EGL_LOCK_USAGE_HINT_KHR bitfield */
|
||||
#define EGL_WRITE_SURFACE_BIT_KHR 0x0002 /* EGL_LOCK_USAGE_HINT_KHR bitfield */
|
||||
#define EGL_LOCK_SURFACE_BIT_KHR 0x0080 /* EGL_SURFACE_TYPE bitfield */
|
||||
#define EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100 /* EGL_SURFACE_TYPE bitfield */
|
||||
#define EGL_MATCH_FORMAT_KHR 0x3043 /* EGLConfig attribute */
|
||||
#define EGL_FORMAT_RGB_565_EXACT_KHR 0x30C0 /* EGL_MATCH_FORMAT_KHR value */
|
||||
#define EGL_FORMAT_RGB_565_KHR 0x30C1 /* EGL_MATCH_FORMAT_KHR value */
|
||||
#define EGL_FORMAT_RGBA_8888_EXACT_KHR 0x30C2 /* EGL_MATCH_FORMAT_KHR value */
|
||||
#define EGL_FORMAT_RGBA_8888_KHR 0x30C3 /* EGL_MATCH_FORMAT_KHR value */
|
||||
#define EGL_MAP_PRESERVE_PIXELS_KHR 0x30C4 /* eglLockSurfaceKHR attribute */
|
||||
#define EGL_LOCK_USAGE_HINT_KHR 0x30C5 /* eglLockSurfaceKHR attribute */
|
||||
#define EGL_BITMAP_POINTER_KHR 0x30C6 /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_PITCH_KHR 0x30C7 /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_ORIGIN_KHR 0x30C8 /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR 0x30C9 /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR 0x30CB /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD /* eglQuerySurface attribute */
|
||||
#define EGL_LOWER_LEFT_KHR 0x30CE /* EGL_BITMAP_ORIGIN_KHR value */
|
||||
#define EGL_UPPER_LEFT_KHR 0x30CF /* EGL_BITMAP_ORIGIN_KHR value */
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay display, EGLSurface surface);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface);
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_image
|
||||
#define EGL_KHR_image 1
|
||||
#define EGL_NATIVE_PIXMAP_KHR 0x30B0 /* eglCreateImageKHR target */
|
||||
typedef void *EGLImageKHR;
|
||||
#define EGL_NO_IMAGE_KHR ((EGLImageKHR)0)
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image);
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_vg_parent_image
|
||||
#define EGL_KHR_vg_parent_image 1
|
||||
#define EGL_VG_PARENT_IMAGE_KHR 0x30BA /* eglCreateImageKHR target */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_gl_texture_2D_image
|
||||
#define EGL_KHR_gl_texture_2D_image 1
|
||||
#define EGL_GL_TEXTURE_2D_KHR 0x30B1 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC /* eglCreateImageKHR attribute */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_gl_texture_cubemap_image
|
||||
#define EGL_KHR_gl_texture_cubemap_image 1
|
||||
#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8 /* eglCreateImageKHR target */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_gl_texture_3D_image
|
||||
#define EGL_KHR_gl_texture_3D_image 1
|
||||
#define EGL_GL_TEXTURE_3D_KHR 0x30B2 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD /* eglCreateImageKHR attribute */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_gl_renderbuffer_image
|
||||
#define EGL_KHR_gl_renderbuffer_image 1
|
||||
#define EGL_GL_RENDERBUFFER_KHR 0x30B9 /* eglCreateImageKHR target */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_reusable_sync
|
||||
#define EGL_KHR_reusable_sync 1
|
||||
|
||||
typedef void* EGLSyncKHR;
|
||||
typedef khronos_utime_nanoseconds_t EGLTimeKHR;
|
||||
|
||||
#define EGL_SYNC_STATUS_KHR 0x30F1
|
||||
#define EGL_SIGNALED_KHR 0x30F2
|
||||
#define EGL_UNSIGNALED_KHR 0x30F3
|
||||
#define EGL_TIMEOUT_EXPIRED_KHR 0x30F5
|
||||
#define EGL_CONDITION_SATISFIED_KHR 0x30F6
|
||||
#define EGL_SYNC_TYPE_KHR 0x30F7
|
||||
#define EGL_SYNC_REUSABLE_KHR 0x30FA
|
||||
#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001 /* eglClientWaitSyncKHR <flags> bitfield */
|
||||
#define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull
|
||||
#define EGL_NO_SYNC_KHR ((EGLSyncKHR)0)
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync);
|
||||
EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHR) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHR) (EGLDisplay dpy, EGLSyncKHR sync);
|
||||
typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHR) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHR) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHR) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_image_base
|
||||
#define EGL_KHR_image_base 1
|
||||
/* Most interfaces defined by EGL_KHR_image_pixmap above */
|
||||
#define EGL_IMAGE_PRESERVED_KHR 0x30D2 /* eglCreateImageKHR attribute */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_image_pixmap
|
||||
#define EGL_KHR_image_pixmap 1
|
||||
/* Interfaces defined by EGL_KHR_image above */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_IMG_context_priority
|
||||
#define EGL_IMG_context_priority 1
|
||||
#define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100
|
||||
#define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101
|
||||
#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102
|
||||
#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
124
Engine/ExtIncludes/OpenGLES2.0/PowerVR/include/EGL/eglplatform.h
Normal file
|
@ -0,0 +1,124 @@
|
|||
#ifndef __eglplatform_h_
|
||||
#define __eglplatform_h_
|
||||
|
||||
/*
|
||||
** Copyright (c) 2007-2009 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
/* Platform-specific types and definitions for egl.h
|
||||
*
|
||||
* Adopters may modify khrplatform.h and this file to suit their platform.
|
||||
* You are encouraged to submit all modifications to the Khronos group so that
|
||||
* they can be included in future versions of this file. Please submit changes
|
||||
* by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
|
||||
* by filing a bug against product "EGL" component "Registry".
|
||||
*/
|
||||
|
||||
#include <KHR/khrplatform.h>
|
||||
|
||||
/* Macros used in EGL function prototype declarations.
|
||||
*
|
||||
* EGL functions should be prototyped as:
|
||||
*
|
||||
* EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
|
||||
* typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
|
||||
*
|
||||
* KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
|
||||
*/
|
||||
|
||||
#ifndef EGLAPI
|
||||
#define EGLAPI KHRONOS_APICALL
|
||||
#endif
|
||||
|
||||
#define EGLAPIENTRY KHRONOS_APIENTRY
|
||||
#define EGLAPIENTRYP KHRONOS_APIENTRY*
|
||||
|
||||
/* The types NativeDisplayType, NativeWindowType, and NativePixmapType
|
||||
* are aliases of window-system-dependent types, such as X Display * or
|
||||
* Windows Device Context. They must be defined in platform-specific
|
||||
* code below. The EGL-prefixed versions of Native*Type are the same
|
||||
* types, renamed in EGL 1.3 so all types in the API start with "EGL".
|
||||
*/
|
||||
|
||||
#if defined(_WIN32) && !defined(__WINSCW__) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#endif
|
||||
#include <windows.h>
|
||||
|
||||
typedef HDC EGLNativeDisplayType;
|
||||
typedef HBITMAP EGLNativePixmapType;
|
||||
typedef HWND EGLNativeWindowType;
|
||||
|
||||
#elif defined(SUPPORT_X11)
|
||||
|
||||
/* X11 (tentative) */
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
typedef Display *EGLNativeDisplayType;
|
||||
typedef Pixmap EGLNativePixmapType;
|
||||
typedef Window EGLNativeWindowType;
|
||||
|
||||
|
||||
#elif defined(ANDROID)
|
||||
|
||||
struct android_native_window_t;
|
||||
struct egl_native_pixmap_t;
|
||||
|
||||
typedef struct android_native_window_t* EGLNativeWindowType;
|
||||
typedef struct egl_native_pixmap_t* EGLNativePixmapType;
|
||||
typedef void* EGLNativeDisplayType;
|
||||
|
||||
#else
|
||||
|
||||
#if defined(_WIN64) || __WORDSIZE == 64
|
||||
typedef khronos_int64_t EGLNativeDisplayType;
|
||||
#else
|
||||
typedef int EGLNativeDisplayType;
|
||||
#endif
|
||||
|
||||
typedef void *EGLNativeWindowType;
|
||||
typedef void *EGLNativePixmapType;
|
||||
|
||||
#endif
|
||||
|
||||
/* EGL 1.2 types, renamed for consistency in EGL 1.3 */
|
||||
typedef EGLNativeDisplayType NativeDisplayType;
|
||||
typedef EGLNativePixmapType NativePixmapType;
|
||||
typedef EGLNativeWindowType NativeWindowType;
|
||||
|
||||
|
||||
/* Define EGLint. This must be a signed integral type large enough to contain
|
||||
* all legal attribute names and values passed into and out of EGL, whether
|
||||
* their type is boolean, bitmask, enumerant (symbolic constant), integer,
|
||||
* handle, or other. While in general a 32-bit integer will suffice, if
|
||||
* handles are 64 bit types, then EGLint should be defined as a signed 64-bit
|
||||
* integer type.
|
||||
*/
|
||||
#if defined(_WIN64) || __WORDSIZE == 64
|
||||
typedef khronos_int64_t EGLint;
|
||||
#else
|
||||
typedef khronos_int32_t EGLint;
|
||||
#endif
|
||||
|
||||
#endif /* __eglplatform_h */
|
618
Engine/ExtIncludes/OpenGLES2.0/PowerVR/include/GLES2/gl2.h
Normal file
|
@ -0,0 +1,618 @@
|
|||
#ifndef __gl2_h_
|
||||
#define __gl2_h_
|
||||
|
||||
#include <GLES2/gl2platform.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This document is licensed under the SGI Free Software B License Version
|
||||
* 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
|
||||
*/
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Data type definitions
|
||||
*-----------------------------------------------------------------------*/
|
||||
|
||||
typedef void GLvoid;
|
||||
typedef unsigned int GLenum;
|
||||
typedef unsigned char GLboolean;
|
||||
typedef unsigned int GLbitfield;
|
||||
typedef khronos_int8_t GLbyte;
|
||||
typedef short GLshort;
|
||||
typedef int GLint;
|
||||
typedef int GLsizei;
|
||||
typedef khronos_uint8_t GLubyte;
|
||||
typedef unsigned short GLushort;
|
||||
typedef unsigned int GLuint;
|
||||
typedef khronos_float_t GLfloat;
|
||||
typedef khronos_float_t GLclampf;
|
||||
typedef khronos_int32_t GLfixed;
|
||||
|
||||
/* GL types for handling large vertex buffer objects */
|
||||
typedef khronos_intptr_t GLintptr;
|
||||
typedef khronos_ssize_t GLsizeiptr;
|
||||
|
||||
/* OpenGL ES core versions */
|
||||
#define GL_ES_VERSION_2_0 1
|
||||
|
||||
/* ClearBufferMask */
|
||||
#define GL_DEPTH_BUFFER_BIT 0x00000100
|
||||
#define GL_STENCIL_BUFFER_BIT 0x00000400
|
||||
#define GL_COLOR_BUFFER_BIT 0x00004000
|
||||
|
||||
/* Boolean */
|
||||
#define GL_FALSE 0
|
||||
#define GL_TRUE 1
|
||||
|
||||
/* BeginMode */
|
||||
#define GL_POINTS 0x0000
|
||||
#define GL_LINES 0x0001
|
||||
#define GL_LINE_LOOP 0x0002
|
||||
#define GL_LINE_STRIP 0x0003
|
||||
#define GL_TRIANGLES 0x0004
|
||||
#define GL_TRIANGLE_STRIP 0x0005
|
||||
#define GL_TRIANGLE_FAN 0x0006
|
||||
|
||||
/* AlphaFunction (not supported in ES20) */
|
||||
/* GL_NEVER */
|
||||
/* GL_LESS */
|
||||
/* GL_EQUAL */
|
||||
/* GL_LEQUAL */
|
||||
/* GL_GREATER */
|
||||
/* GL_NOTEQUAL */
|
||||
/* GL_GEQUAL */
|
||||
/* GL_ALWAYS */
|
||||
|
||||
/* BlendingFactorDest */
|
||||
#define GL_ZERO 0
|
||||
#define GL_ONE 1
|
||||
#define GL_SRC_COLOR 0x0300
|
||||
#define GL_ONE_MINUS_SRC_COLOR 0x0301
|
||||
#define GL_SRC_ALPHA 0x0302
|
||||
#define GL_ONE_MINUS_SRC_ALPHA 0x0303
|
||||
#define GL_DST_ALPHA 0x0304
|
||||
#define GL_ONE_MINUS_DST_ALPHA 0x0305
|
||||
|
||||
/* BlendingFactorSrc */
|
||||
/* GL_ZERO */
|
||||
/* GL_ONE */
|
||||
#define GL_DST_COLOR 0x0306
|
||||
#define GL_ONE_MINUS_DST_COLOR 0x0307
|
||||
#define GL_SRC_ALPHA_SATURATE 0x0308
|
||||
/* GL_SRC_ALPHA */
|
||||
/* GL_ONE_MINUS_SRC_ALPHA */
|
||||
/* GL_DST_ALPHA */
|
||||
/* GL_ONE_MINUS_DST_ALPHA */
|
||||
|
||||
/* BlendEquationSeparate */
|
||||
#define GL_FUNC_ADD 0x8006
|
||||
#define GL_BLEND_EQUATION 0x8009
|
||||
#define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */
|
||||
#define GL_BLEND_EQUATION_ALPHA 0x883D
|
||||
|
||||
/* BlendSubtract */
|
||||
#define GL_FUNC_SUBTRACT 0x800A
|
||||
#define GL_FUNC_REVERSE_SUBTRACT 0x800B
|
||||
|
||||
/* Separate Blend Functions */
|
||||
#define GL_BLEND_DST_RGB 0x80C8
|
||||
#define GL_BLEND_SRC_RGB 0x80C9
|
||||
#define GL_BLEND_DST_ALPHA 0x80CA
|
||||
#define GL_BLEND_SRC_ALPHA 0x80CB
|
||||
#define GL_CONSTANT_COLOR 0x8001
|
||||
#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
|
||||
#define GL_CONSTANT_ALPHA 0x8003
|
||||
#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
|
||||
#define GL_BLEND_COLOR 0x8005
|
||||
|
||||
/* Buffer Objects */
|
||||
#define GL_ARRAY_BUFFER 0x8892
|
||||
#define GL_ELEMENT_ARRAY_BUFFER 0x8893
|
||||
#define GL_ARRAY_BUFFER_BINDING 0x8894
|
||||
#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
|
||||
|
||||
#define GL_STREAM_DRAW 0x88E0
|
||||
#define GL_STATIC_DRAW 0x88E4
|
||||
#define GL_DYNAMIC_DRAW 0x88E8
|
||||
|
||||
#define GL_BUFFER_SIZE 0x8764
|
||||
#define GL_BUFFER_USAGE 0x8765
|
||||
|
||||
#define GL_CURRENT_VERTEX_ATTRIB 0x8626
|
||||
|
||||
/* CullFaceMode */
|
||||
#define GL_FRONT 0x0404
|
||||
#define GL_BACK 0x0405
|
||||
#define GL_FRONT_AND_BACK 0x0408
|
||||
|
||||
/* DepthFunction */
|
||||
/* GL_NEVER */
|
||||
/* GL_LESS */
|
||||
/* GL_EQUAL */
|
||||
/* GL_LEQUAL */
|
||||
/* GL_GREATER */
|
||||
/* GL_NOTEQUAL */
|
||||
/* GL_GEQUAL */
|
||||
/* GL_ALWAYS */
|
||||
|
||||
/* EnableCap */
|
||||
#define GL_TEXTURE_2D 0x0DE1
|
||||
#define GL_CULL_FACE 0x0B44
|
||||
#define GL_BLEND 0x0BE2
|
||||
#define GL_DITHER 0x0BD0
|
||||
#define GL_STENCIL_TEST 0x0B90
|
||||
#define GL_DEPTH_TEST 0x0B71
|
||||
#define GL_SCISSOR_TEST 0x0C11
|
||||
#define GL_POLYGON_OFFSET_FILL 0x8037
|
||||
#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
|
||||
#define GL_SAMPLE_COVERAGE 0x80A0
|
||||
|
||||
/* ErrorCode */
|
||||
#define GL_NO_ERROR 0
|
||||
#define GL_INVALID_ENUM 0x0500
|
||||
#define GL_INVALID_VALUE 0x0501
|
||||
#define GL_INVALID_OPERATION 0x0502
|
||||
#define GL_OUT_OF_MEMORY 0x0505
|
||||
|
||||
/* FrontFaceDirection */
|
||||
#define GL_CW 0x0900
|
||||
#define GL_CCW 0x0901
|
||||
|
||||
/* GetPName */
|
||||
#define GL_LINE_WIDTH 0x0B21
|
||||
#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
|
||||
#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
|
||||
#define GL_CULL_FACE_MODE 0x0B45
|
||||
#define GL_FRONT_FACE 0x0B46
|
||||
#define GL_DEPTH_RANGE 0x0B70
|
||||
#define GL_DEPTH_WRITEMASK 0x0B72
|
||||
#define GL_DEPTH_CLEAR_VALUE 0x0B73
|
||||
#define GL_DEPTH_FUNC 0x0B74
|
||||
#define GL_STENCIL_CLEAR_VALUE 0x0B91
|
||||
#define GL_STENCIL_FUNC 0x0B92
|
||||
#define GL_STENCIL_FAIL 0x0B94
|
||||
#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
|
||||
#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
|
||||
#define GL_STENCIL_REF 0x0B97
|
||||
#define GL_STENCIL_VALUE_MASK 0x0B93
|
||||
#define GL_STENCIL_WRITEMASK 0x0B98
|
||||
#define GL_STENCIL_BACK_FUNC 0x8800
|
||||
#define GL_STENCIL_BACK_FAIL 0x8801
|
||||
#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
|
||||
#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
|
||||
#define GL_STENCIL_BACK_REF 0x8CA3
|
||||
#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
|
||||
#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
|
||||
#define GL_VIEWPORT 0x0BA2
|
||||
#define GL_SCISSOR_BOX 0x0C10
|
||||
/* GL_SCISSOR_TEST */
|
||||
#define GL_COLOR_CLEAR_VALUE 0x0C22
|
||||
#define GL_COLOR_WRITEMASK 0x0C23
|
||||
#define GL_UNPACK_ALIGNMENT 0x0CF5
|
||||
#define GL_PACK_ALIGNMENT 0x0D05
|
||||
#define GL_MAX_TEXTURE_SIZE 0x0D33
|
||||
#define GL_MAX_VIEWPORT_DIMS 0x0D3A
|
||||
#define GL_SUBPIXEL_BITS 0x0D50
|
||||
#define GL_RED_BITS 0x0D52
|
||||
#define GL_GREEN_BITS 0x0D53
|
||||
#define GL_BLUE_BITS 0x0D54
|
||||
#define GL_ALPHA_BITS 0x0D55
|
||||
#define GL_DEPTH_BITS 0x0D56
|
||||
#define GL_STENCIL_BITS 0x0D57
|
||||
#define GL_POLYGON_OFFSET_UNITS 0x2A00
|
||||
/* GL_POLYGON_OFFSET_FILL */
|
||||
#define GL_POLYGON_OFFSET_FACTOR 0x8038
|
||||
#define GL_TEXTURE_BINDING_2D 0x8069
|
||||
#define GL_SAMPLE_BUFFERS 0x80A8
|
||||
#define GL_SAMPLES 0x80A9
|
||||
#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
|
||||
#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
|
||||
|
||||
/* GetTextureParameter */
|
||||
/* GL_TEXTURE_MAG_FILTER */
|
||||
/* GL_TEXTURE_MIN_FILTER */
|
||||
/* GL_TEXTURE_WRAP_S */
|
||||
/* GL_TEXTURE_WRAP_T */
|
||||
|
||||
#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
|
||||
#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
|
||||
|
||||
/* HintMode */
|
||||
#define GL_DONT_CARE 0x1100
|
||||
#define GL_FASTEST 0x1101
|
||||
#define GL_NICEST 0x1102
|
||||
|
||||
/* HintTarget */
|
||||
#define GL_GENERATE_MIPMAP_HINT 0x8192
|
||||
|
||||
/* DataType */
|
||||
#define GL_BYTE 0x1400
|
||||
#define GL_UNSIGNED_BYTE 0x1401
|
||||
#define GL_SHORT 0x1402
|
||||
#define GL_UNSIGNED_SHORT 0x1403
|
||||
#define GL_INT 0x1404
|
||||
#define GL_UNSIGNED_INT 0x1405
|
||||
#define GL_FLOAT 0x1406
|
||||
#define GL_FIXED 0x140C
|
||||
|
||||
/* PixelFormat */
|
||||
#define GL_DEPTH_COMPONENT 0x1902
|
||||
#define GL_ALPHA 0x1906
|
||||
#define GL_RGB 0x1907
|
||||
#define GL_RGBA 0x1908
|
||||
#define GL_LUMINANCE 0x1909
|
||||
#define GL_LUMINANCE_ALPHA 0x190A
|
||||
|
||||
/* PixelType */
|
||||
/* GL_UNSIGNED_BYTE */
|
||||
#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
|
||||
#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
|
||||
#define GL_UNSIGNED_SHORT_5_6_5 0x8363
|
||||
|
||||
/* Shaders */
|
||||
#define GL_FRAGMENT_SHADER 0x8B30
|
||||
#define GL_VERTEX_SHADER 0x8B31
|
||||
#define GL_MAX_VERTEX_ATTRIBS 0x8869
|
||||
#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
|
||||
#define GL_MAX_VARYING_VECTORS 0x8DFC
|
||||
#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
|
||||
#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
|
||||
#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
|
||||
#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
|
||||
#define GL_SHADER_TYPE 0x8B4F
|
||||
#define GL_DELETE_STATUS 0x8B80
|
||||
#define GL_LINK_STATUS 0x8B82
|
||||
#define GL_VALIDATE_STATUS 0x8B83
|
||||
#define GL_ATTACHED_SHADERS 0x8B85
|
||||
#define GL_ACTIVE_UNIFORMS 0x8B86
|
||||
#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
|
||||
#define GL_ACTIVE_ATTRIBUTES 0x8B89
|
||||
#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
|
||||
#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
|
||||
#define GL_CURRENT_PROGRAM 0x8B8D
|
||||
|
||||
/* StencilFunction */
|
||||
#define GL_NEVER 0x0200
|
||||
#define GL_LESS 0x0201
|
||||
#define GL_EQUAL 0x0202
|
||||
#define GL_LEQUAL 0x0203
|
||||
#define GL_GREATER 0x0204
|
||||
#define GL_NOTEQUAL 0x0205
|
||||
#define GL_GEQUAL 0x0206
|
||||
#define GL_ALWAYS 0x0207
|
||||
|
||||
/* StencilOp */
|
||||
/* GL_ZERO */
|
||||
#define GL_KEEP 0x1E00
|
||||
#define GL_REPLACE 0x1E01
|
||||
#define GL_INCR 0x1E02
|
||||
#define GL_DECR 0x1E03
|
||||
#define GL_INVERT 0x150A
|
||||
#define GL_INCR_WRAP 0x8507
|
||||
#define GL_DECR_WRAP 0x8508
|
||||
|
||||
/* StringName */
|
||||
#define GL_VENDOR 0x1F00
|
||||
#define GL_RENDERER 0x1F01
|
||||
#define GL_VERSION 0x1F02
|
||||
#define GL_EXTENSIONS 0x1F03
|
||||
|
||||
/* TextureMagFilter */
|
||||
#define GL_NEAREST 0x2600
|
||||
#define GL_LINEAR 0x2601
|
||||
|
||||
/* TextureMinFilter */
|
||||
/* GL_NEAREST */
|
||||
/* GL_LINEAR */
|
||||
#define GL_NEAREST_MIPMAP_NEAREST 0x2700
|
||||
#define GL_LINEAR_MIPMAP_NEAREST 0x2701
|
||||
#define GL_NEAREST_MIPMAP_LINEAR 0x2702
|
||||
#define GL_LINEAR_MIPMAP_LINEAR 0x2703
|
||||
|
||||
/* TextureParameterName */
|
||||
#define GL_TEXTURE_MAG_FILTER 0x2800
|
||||
#define GL_TEXTURE_MIN_FILTER 0x2801
|
||||
#define GL_TEXTURE_WRAP_S 0x2802
|
||||
#define GL_TEXTURE_WRAP_T 0x2803
|
||||
|
||||
/* TextureTarget */
|
||||
/* GL_TEXTURE_2D */
|
||||
#define GL_TEXTURE 0x1702
|
||||
|
||||
#define GL_TEXTURE_CUBE_MAP 0x8513
|
||||
#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
|
||||
#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
|
||||
|
||||
/* TextureUnit */
|
||||
#define GL_TEXTURE0 0x84C0
|
||||
#define GL_TEXTURE1 0x84C1
|
||||
#define GL_TEXTURE2 0x84C2
|
||||
#define GL_TEXTURE3 0x84C3
|
||||
#define GL_TEXTURE4 0x84C4
|
||||
#define GL_TEXTURE5 0x84C5
|
||||
#define GL_TEXTURE6 0x84C6
|
||||
#define GL_TEXTURE7 0x84C7
|
||||
#define GL_TEXTURE8 0x84C8
|
||||
#define GL_TEXTURE9 0x84C9
|
||||
#define GL_TEXTURE10 0x84CA
|
||||
#define GL_TEXTURE11 0x84CB
|
||||
#define GL_TEXTURE12 0x84CC
|
||||
#define GL_TEXTURE13 0x84CD
|
||||
#define GL_TEXTURE14 0x84CE
|
||||
#define GL_TEXTURE15 0x84CF
|
||||
#define GL_TEXTURE16 0x84D0
|
||||
#define GL_TEXTURE17 0x84D1
|
||||
#define GL_TEXTURE18 0x84D2
|
||||
#define GL_TEXTURE19 0x84D3
|
||||
#define GL_TEXTURE20 0x84D4
|
||||
#define GL_TEXTURE21 0x84D5
|
||||
#define GL_TEXTURE22 0x84D6
|
||||
#define GL_TEXTURE23 0x84D7
|
||||
#define GL_TEXTURE24 0x84D8
|
||||
#define GL_TEXTURE25 0x84D9
|
||||
#define GL_TEXTURE26 0x84DA
|
||||
#define GL_TEXTURE27 0x84DB
|
||||
#define GL_TEXTURE28 0x84DC
|
||||
#define GL_TEXTURE29 0x84DD
|
||||
#define GL_TEXTURE30 0x84DE
|
||||
#define GL_TEXTURE31 0x84DF
|
||||
#define GL_ACTIVE_TEXTURE 0x84E0
|
||||
|
||||
/* TextureWrapMode */
|
||||
#define GL_REPEAT 0x2901
|
||||
#define GL_CLAMP_TO_EDGE 0x812F
|
||||
#define GL_MIRRORED_REPEAT 0x8370
|
||||
|
||||
/* Uniform Types */
|
||||
#define GL_FLOAT_VEC2 0x8B50
|
||||
#define GL_FLOAT_VEC3 0x8B51
|
||||
#define GL_FLOAT_VEC4 0x8B52
|
||||
#define GL_INT_VEC2 0x8B53
|
||||
#define GL_INT_VEC3 0x8B54
|
||||
#define GL_INT_VEC4 0x8B55
|
||||
#define GL_BOOL 0x8B56
|
||||
#define GL_BOOL_VEC2 0x8B57
|
||||
#define GL_BOOL_VEC3 0x8B58
|
||||
#define GL_BOOL_VEC4 0x8B59
|
||||
#define GL_FLOAT_MAT2 0x8B5A
|
||||
#define GL_FLOAT_MAT3 0x8B5B
|
||||
#define GL_FLOAT_MAT4 0x8B5C
|
||||
#define GL_SAMPLER_2D 0x8B5E
|
||||
#define GL_SAMPLER_CUBE 0x8B60
|
||||
|
||||
/* Vertex Arrays */
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
|
||||
|
||||
/* Read Format */
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
|
||||
|
||||
/* Shader Source */
|
||||
#define GL_COMPILE_STATUS 0x8B81
|
||||
#define GL_INFO_LOG_LENGTH 0x8B84
|
||||
#define GL_SHADER_SOURCE_LENGTH 0x8B88
|
||||
#define GL_SHADER_COMPILER 0x8DFA
|
||||
|
||||
/* Shader Binary */
|
||||
#define GL_SHADER_BINARY_FORMATS 0x8DF8
|
||||
#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
|
||||
|
||||
/* Shader Precision-Specified Types */
|
||||
#define GL_LOW_FLOAT 0x8DF0
|
||||
#define GL_MEDIUM_FLOAT 0x8DF1
|
||||
#define GL_HIGH_FLOAT 0x8DF2
|
||||
#define GL_LOW_INT 0x8DF3
|
||||
#define GL_MEDIUM_INT 0x8DF4
|
||||
#define GL_HIGH_INT 0x8DF5
|
||||
|
||||
/* Framebuffer Object. */
|
||||
#define GL_FRAMEBUFFER 0x8D40
|
||||
#define GL_RENDERBUFFER 0x8D41
|
||||
|
||||
#define GL_RGBA4 0x8056
|
||||
#define GL_RGB5_A1 0x8057
|
||||
#define GL_RGB565 0x8D62
|
||||
#define GL_DEPTH_COMPONENT16 0x81A5
|
||||
#define GL_STENCIL_INDEX 0x1901
|
||||
#define GL_STENCIL_INDEX8 0x8D48
|
||||
|
||||
#define GL_RENDERBUFFER_WIDTH 0x8D42
|
||||
#define GL_RENDERBUFFER_HEIGHT 0x8D43
|
||||
#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
|
||||
#define GL_RENDERBUFFER_RED_SIZE 0x8D50
|
||||
#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
|
||||
#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
|
||||
#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
|
||||
#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
|
||||
#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
|
||||
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
|
||||
|
||||
#define GL_COLOR_ATTACHMENT0 0x8CE0
|
||||
#define GL_DEPTH_ATTACHMENT 0x8D00
|
||||
#define GL_STENCIL_ATTACHMENT 0x8D20
|
||||
|
||||
#define GL_NONE 0
|
||||
|
||||
#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
|
||||
#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
|
||||
|
||||
#define GL_FRAMEBUFFER_BINDING 0x8CA6
|
||||
#define GL_RENDERBUFFER_BINDING 0x8CA7
|
||||
#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
|
||||
|
||||
#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* GL core functions.
|
||||
*-----------------------------------------------------------------------*/
|
||||
|
||||
GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
|
||||
GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const char* name);
|
||||
GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
|
||||
GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
|
||||
GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
|
||||
GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
|
||||
GL_APICALL void GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||
GL_APICALL void GL_APIENTRY glBlendEquation ( GLenum mode );
|
||||
GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
|
||||
GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
|
||||
GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
|
||||
GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void* data, GLenum usage);
|
||||
GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void* data);
|
||||
GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
|
||||
GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
|
||||
GL_APICALL void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||
GL_APICALL void GL_APIENTRY glClearDepthf (GLclampf depth);
|
||||
GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
|
||||
GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
||||
GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data);
|
||||
GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data);
|
||||
GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
|
||||
GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
|
||||
GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
|
||||
GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
|
||||
GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers);
|
||||
GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers);
|
||||
GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers);
|
||||
GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures);
|
||||
GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
|
||||
GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
|
||||
GL_APICALL void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
|
||||
GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
|
||||
GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
|
||||
GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
|
||||
GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void* indices);
|
||||
GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
|
||||
GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
|
||||
GL_APICALL void GL_APIENTRY glFinish (void);
|
||||
GL_APICALL void GL_APIENTRY glFlush (void);
|
||||
GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
|
||||
GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers);
|
||||
GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
|
||||
GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers);
|
||||
GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);
|
||||
GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures);
|
||||
GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
|
||||
GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
|
||||
GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
|
||||
GL_APICALL int GL_APIENTRY glGetAttribLocation (GLuint program, const char* name);
|
||||
GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params);
|
||||
GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
|
||||
GL_APICALL GLenum GL_APIENTRY glGetError (void);
|
||||
GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params);
|
||||
GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, char* infolog);
|
||||
GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, char* source);
|
||||
GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name);
|
||||
GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
|
||||
GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);
|
||||
GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);
|
||||
GL_APICALL int GL_APIENTRY glGetUniformLocation (GLuint program, const char* name);
|
||||
GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
|
||||
GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void** pointer);
|
||||
GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
|
||||
GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
|
||||
GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
|
||||
GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
|
||||
GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels);
|
||||
GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
|
||||
GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
GL_APICALL void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
|
||||
GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length);
|
||||
GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const char** string, const GLint* length);
|
||||
GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
|
||||
GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
|
||||
GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels);
|
||||
GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
|
||||
GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params);
|
||||
GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
|
||||
GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels);
|
||||
GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat x);
|
||||
GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint x);
|
||||
GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y);
|
||||
GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y);
|
||||
GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z);
|
||||
GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z);
|
||||
GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w);
|
||||
GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v);
|
||||
GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
|
||||
GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
|
||||
GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
|
||||
GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr);
|
||||
GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __gl2_h_ */
|
665
Engine/ExtIncludes/OpenGLES2.0/PowerVR/include/GLES2/gl2ext.h
Normal file
|
@ -0,0 +1,665 @@
|
|||
#ifndef __gl2ext_h_
|
||||
#define __gl2ext_h_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This document is licensed under the SGI Free Software B License Version
|
||||
* 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
|
||||
*/
|
||||
|
||||
#ifndef GL_APIENTRYP
|
||||
# define GL_APIENTRYP GL_APIENTRY*
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* OES extension tokens
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_OES_compressed_ETC1_RGB8_texture */
|
||||
#ifndef GL_OES_compressed_ETC1_RGB8_texture
|
||||
#define GL_ETC1_RGB8_OES 0x8D64
|
||||
#endif
|
||||
|
||||
/* GL_OES_compressed_paletted_texture */
|
||||
#ifndef GL_OES_compressed_paletted_texture
|
||||
#define GL_PALETTE4_RGB8_OES 0x8B90
|
||||
#define GL_PALETTE4_RGBA8_OES 0x8B91
|
||||
#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
|
||||
#define GL_PALETTE4_RGBA4_OES 0x8B93
|
||||
#define GL_PALETTE4_RGB5_A1_OES 0x8B94
|
||||
#define GL_PALETTE8_RGB8_OES 0x8B95
|
||||
#define GL_PALETTE8_RGBA8_OES 0x8B96
|
||||
#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
|
||||
#define GL_PALETTE8_RGBA4_OES 0x8B98
|
||||
#define GL_PALETTE8_RGB5_A1_OES 0x8B99
|
||||
#endif
|
||||
|
||||
/* GL_OES_depth24 */
|
||||
#ifndef GL_OES_depth24
|
||||
#define GL_DEPTH_COMPONENT24_OES 0x81A6
|
||||
#endif
|
||||
|
||||
/* GL_OES_depth32 */
|
||||
#ifndef GL_OES_depth32
|
||||
#define GL_DEPTH_COMPONENT32_OES 0x81A7
|
||||
#endif
|
||||
|
||||
/* GL_OES_depth_texture */
|
||||
/* No new tokens introduced by this extension. */
|
||||
|
||||
/* GL_OES_EGL_image */
|
||||
#ifndef GL_OES_EGL_image
|
||||
typedef void* GLeglImageOES;
|
||||
#endif
|
||||
|
||||
/* GL_OES_get_program_binary */
|
||||
#ifndef GL_OES_get_program_binary
|
||||
#define GL_PROGRAM_BINARY_LENGTH_OES 0x8741
|
||||
#define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE
|
||||
#define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF
|
||||
#endif
|
||||
|
||||
/* GL_OES_mapbuffer */
|
||||
#ifndef GL_OES_mapbuffer
|
||||
#define GL_WRITE_ONLY_OES 0x88B9
|
||||
#define GL_BUFFER_ACCESS_OES 0x88BB
|
||||
#define GL_BUFFER_MAPPED_OES 0x88BC
|
||||
#define GL_BUFFER_MAP_POINTER_OES 0x88BD
|
||||
#endif
|
||||
|
||||
/* GL_OES_packed_depth_stencil */
|
||||
#ifndef GL_OES_packed_depth_stencil
|
||||
#define GL_DEPTH_STENCIL_OES 0x84F9
|
||||
#define GL_UNSIGNED_INT_24_8_OES 0x84FA
|
||||
#define GL_DEPTH24_STENCIL8_OES 0x88F0
|
||||
#endif
|
||||
|
||||
/* GL_OES_rgb8_rgba8 */
|
||||
#ifndef GL_OES_rgb8_rgba8
|
||||
#define GL_RGB8_OES 0x8051
|
||||
#define GL_RGBA8_OES 0x8058
|
||||
#endif
|
||||
|
||||
/* GL_OES_standard_derivatives */
|
||||
#ifndef GL_OES_standard_derivatives
|
||||
#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B
|
||||
#endif
|
||||
|
||||
/* GL_OES_stencil1 */
|
||||
#ifndef GL_OES_stencil1
|
||||
#define GL_STENCIL_INDEX1_OES 0x8D46
|
||||
#endif
|
||||
|
||||
/* GL_OES_stencil4 */
|
||||
#ifndef GL_OES_stencil4
|
||||
#define GL_STENCIL_INDEX4_OES 0x8D47
|
||||
#endif
|
||||
|
||||
/* GL_OES_texture_3D */
|
||||
#ifndef GL_OES_texture_3D
|
||||
#define GL_TEXTURE_WRAP_R_OES 0x8072
|
||||
#define GL_TEXTURE_3D_OES 0x806F
|
||||
#define GL_TEXTURE_BINDING_3D_OES 0x806A
|
||||
#define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073
|
||||
#define GL_SAMPLER_3D_OES 0x8B5F
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4
|
||||
#endif
|
||||
|
||||
/* GL_OES_texture_float */
|
||||
/* No new tokens introduced by this extension. */
|
||||
|
||||
/* GL_OES_texture_float_linear */
|
||||
/* No new tokens introduced by this extension. */
|
||||
|
||||
/* GL_OES_texture_half_float */
|
||||
#ifndef GL_OES_texture_half_float
|
||||
#define GL_HALF_FLOAT_OES 0x8D61
|
||||
#endif
|
||||
|
||||
/* GL_OES_texture_half_float_linear */
|
||||
/* No new tokens introduced by this extension. */
|
||||
|
||||
/* GL_OES_texture_npot */
|
||||
/* No new tokens introduced by this extension. */
|
||||
|
||||
/* GL_OES_vertex_half_float */
|
||||
/* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */
|
||||
|
||||
/* GL_OES_vertex_type_10_10_10_2 */
|
||||
#ifndef GL_OES_vertex_type_10_10_10_2
|
||||
#define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6
|
||||
#define GL_INT_10_10_10_2_OES 0x8DF7
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* AMD extension tokens
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_AMD_compressed_3DC_texture */
|
||||
#ifndef GL_AMD_compressed_3DC_texture
|
||||
#define GL_3DC_X_AMD 0x87F9
|
||||
#define GL_3DC_XY_AMD 0x87FA
|
||||
#endif
|
||||
|
||||
/* GL_AMD_compressed_ATC_texture */
|
||||
#ifndef GL_AMD_compressed_ATC_texture
|
||||
#define GL_ATC_RGB_AMD 0x8C92
|
||||
#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
|
||||
#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
|
||||
#endif
|
||||
|
||||
/* GL_AMD_performance_monitor */
|
||||
#ifndef GL_AMD_performance_monitor
|
||||
#define GL_COUNTER_TYPE_AMD 0x8BC0
|
||||
#define GL_COUNTER_RANGE_AMD 0x8BC1
|
||||
#define GL_UNSIGNED_INT64_AMD 0x8BC2
|
||||
#define GL_PERCENTAGE_AMD 0x8BC3
|
||||
#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4
|
||||
#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5
|
||||
#define GL_PERFMON_RESULT_AMD 0x8BC6
|
||||
#endif
|
||||
|
||||
/* GL_AMD_program_binary_Z400 */
|
||||
#ifndef GL_AMD_program_binary_Z400
|
||||
#define GL_Z400_BINARY_AMD 0x8740
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* EXT extension tokens
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_EXT_blend_minmax */
|
||||
#ifndef GL_EXT_blend_minmax
|
||||
#define GL_MIN_EXT 0x8007
|
||||
#define GL_MAX_EXT 0x8008
|
||||
#endif
|
||||
|
||||
/* GL_EXT_discard_framebuffer */
|
||||
#ifndef GL_EXT_discard_framebuffer
|
||||
#define GL_COLOR_EXT 0x1800
|
||||
#define GL_DEPTH_EXT 0x1801
|
||||
#define GL_STENCIL_EXT 0x1802
|
||||
#endif
|
||||
|
||||
/* GL_EXT_multi_draw_arrays */
|
||||
/* No new tokens introduced by this extension. */
|
||||
|
||||
/* GL_EXT_read_format_bgra */
|
||||
#ifndef GL_EXT_read_format_bgra
|
||||
#define GL_BGRA_EXT 0x80E1
|
||||
#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365
|
||||
#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366
|
||||
#endif
|
||||
|
||||
/* GL_EXT_texture_filter_anisotropic */
|
||||
#ifndef GL_EXT_texture_filter_anisotropic
|
||||
#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
|
||||
#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
|
||||
#endif
|
||||
|
||||
/* GL_EXT_texture_format_BGRA8888 */
|
||||
#ifndef GL_EXT_texture_format_BGRA8888
|
||||
#define GL_BGRA_EXT 0x80E1
|
||||
#endif
|
||||
|
||||
/* GL_EXT_texture_type_2_10_10_10_REV */
|
||||
#ifndef GL_EXT_texture_type_2_10_10_10_REV
|
||||
#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* IMG extension tokens
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_IMG_program_binary */
|
||||
#ifndef GL_IMG_program_binary
|
||||
#define GL_SGX_PROGRAM_BINARY_IMG 0x9130
|
||||
#endif
|
||||
|
||||
/* GL_IMG_read_format */
|
||||
#ifndef GL_IMG_read_format
|
||||
#define GL_BGRA_IMG 0x80E1
|
||||
#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365
|
||||
#endif
|
||||
|
||||
/* GL_IMG_shader_binary */
|
||||
#ifndef GL_IMG_shader_binary
|
||||
#define GL_SGX_BINARY_IMG 0x8C0A
|
||||
#endif
|
||||
|
||||
/* GL_IMG_texture_compression_pvrtc */
|
||||
#ifndef GL_IMG_texture_compression_pvrtc
|
||||
#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
|
||||
#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
|
||||
#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
|
||||
#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* NV extension tokens
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_NV_fence */
|
||||
#ifndef GL_NV_fence
|
||||
#define GL_ALL_COMPLETED_NV 0x84F2
|
||||
#define GL_FENCE_STATUS_NV 0x84F3
|
||||
#define GL_FENCE_CONDITION_NV 0x84F4
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* QCOM extension tokens
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_QCOM_driver_control */
|
||||
/* No new tokens introduced by this extension. */
|
||||
|
||||
/* GL_QCOM_extended_get */
|
||||
#ifndef GL_QCOM_extended_get
|
||||
#define GL_TEXTURE_WIDTH_QCOM 0x8BD2
|
||||
#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3
|
||||
#define GL_TEXTURE_DEPTH_QCOM 0x8BD4
|
||||
#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5
|
||||
#define GL_TEXTURE_FORMAT_QCOM 0x8BD6
|
||||
#define GL_TEXTURE_TYPE_QCOM 0x8BD7
|
||||
#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8
|
||||
#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9
|
||||
#define GL_TEXTURE_TARGET_QCOM 0x8BDA
|
||||
#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB
|
||||
#define GL_STATE_RESTORE 0x8BDC
|
||||
#endif
|
||||
|
||||
/* GL_QCOM_extended_get2 */
|
||||
/* No new tokens introduced by this extension. */
|
||||
|
||||
/* GL_QCOM_perfmon_global_mode */
|
||||
#ifndef GL_QCOM_perfmon_global_mode
|
||||
#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0
|
||||
#endif
|
||||
|
||||
/* GL_QCOM_writeonly_rendering */
|
||||
#ifndef GL_QCOM_writeonly_rendering
|
||||
#define GL_WRITEONLY_RENDERING_QCOM 0x8823
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* End of extension tokens, start of corresponding extension functions
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* OES extension functions
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_OES_compressed_ETC1_RGB8_texture */
|
||||
#ifndef GL_OES_compressed_ETC1_RGB8_texture
|
||||
#define GL_OES_compressed_ETC1_RGB8_texture 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_compressed_paletted_texture */
|
||||
#ifndef GL_OES_compressed_paletted_texture
|
||||
#define GL_OES_compressed_paletted_texture 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_depth24 */
|
||||
#ifndef GL_OES_depth24
|
||||
#define GL_OES_depth24 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_depth32 */
|
||||
#ifndef GL_OES_depth32
|
||||
#define GL_OES_depth32 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_depth_texture */
|
||||
#ifndef GL_OES_depth_texture
|
||||
#define GL_OES_depth_texture 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_EGL_image */
|
||||
#ifndef GL_OES_EGL_image
|
||||
#define GL_OES_EGL_image 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
|
||||
GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
|
||||
#endif
|
||||
typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
|
||||
typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
|
||||
#endif
|
||||
|
||||
/* GL_OES_element_index_uint */
|
||||
#ifndef GL_OES_element_index_uint
|
||||
#define GL_OES_element_index_uint 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_fbo_render_mipmap */
|
||||
#ifndef GL_OES_fbo_render_mipmap
|
||||
#define GL_OES_fbo_render_mipmap 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_fragment_precision_high */
|
||||
#ifndef GL_OES_fragment_precision_high
|
||||
#define GL_OES_fragment_precision_high 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_get_program_binary */
|
||||
#ifndef GL_OES_get_program_binary
|
||||
#define GL_OES_get_program_binary 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
|
||||
GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const void *binary, GLint length);
|
||||
#endif
|
||||
typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
|
||||
typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLint length);
|
||||
#endif
|
||||
|
||||
/* GL_OES_mapbuffer */
|
||||
#ifndef GL_OES_mapbuffer
|
||||
#define GL_OES_mapbuffer 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
|
||||
GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
|
||||
GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, void** params);
|
||||
#endif
|
||||
typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
|
||||
typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void** params);
|
||||
#endif
|
||||
|
||||
/* GL_OES_packed_depth_stencil */
|
||||
#ifndef GL_OES_packed_depth_stencil
|
||||
#define GL_OES_packed_depth_stencil 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_rgb8_rgba8 */
|
||||
#ifndef GL_OES_rgb8_rgba8
|
||||
#define GL_OES_rgb8_rgba8 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_standard_derivatives */
|
||||
#ifndef GL_OES_standard_derivatives
|
||||
#define GL_OES_standard_derivatives 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_stencil1 */
|
||||
#ifndef GL_OES_stencil1
|
||||
#define GL_OES_stencil1 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_stencil4 */
|
||||
#ifndef GL_OES_stencil4
|
||||
#define GL_OES_stencil4 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_texture_3D */
|
||||
#ifndef GL_OES_texture_3D
|
||||
#define GL_OES_texture_3D 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels);
|
||||
GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels);
|
||||
GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data);
|
||||
GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data);
|
||||
GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
|
||||
#endif
|
||||
typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels);
|
||||
typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data);
|
||||
typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data);
|
||||
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
|
||||
#endif
|
||||
|
||||
/* GL_OES_texture_float */
|
||||
#ifndef GL_OES_texture_float
|
||||
#define GL_OES_texture_float 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_texture_float_linear */
|
||||
#ifndef GL_OES_texture_float_linear
|
||||
#define GL_OES_texture_float_linear 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_texture_half_float */
|
||||
#ifndef GL_OES_texture_half_float
|
||||
#define GL_OES_texture_half_float 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_texture_half_float_linear */
|
||||
#ifndef GL_OES_texture_half_float_linear
|
||||
#define GL_OES_texture_half_float_linear 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_texture_npot */
|
||||
#ifndef GL_OES_texture_npot
|
||||
#define GL_OES_texture_npot 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_vertex_half_float */
|
||||
#ifndef GL_OES_vertex_half_float
|
||||
#define GL_OES_vertex_half_float 1
|
||||
#endif
|
||||
|
||||
/* GL_OES_vertex_type_10_10_10_2 */
|
||||
#ifndef GL_OES_vertex_type_10_10_10_2
|
||||
#define GL_OES_vertex_type_10_10_10_2 1
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* AMD extension functions
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_AMD_compressed_3DC_texture */
|
||||
#ifndef GL_AMD_compressed_3DC_texture
|
||||
#define GL_AMD_compressed_3DC_texture 1
|
||||
#endif
|
||||
|
||||
/* GL_AMD_compressed_ATC_texture */
|
||||
#ifndef GL_AMD_compressed_ATC_texture
|
||||
#define GL_AMD_compressed_ATC_texture 1
|
||||
#endif
|
||||
|
||||
/* AMD_performance_monitor */
|
||||
#ifndef GL_AMD_performance_monitor
|
||||
#define GL_AMD_performance_monitor 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
|
||||
GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
|
||||
GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, char *groupString);
|
||||
GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, char *counterString);
|
||||
GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data);
|
||||
GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
|
||||
GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
|
||||
GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
|
||||
GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor);
|
||||
GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor);
|
||||
GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
|
||||
#endif
|
||||
typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
|
||||
typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
|
||||
typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, char *groupString);
|
||||
typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, char *counterString);
|
||||
typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data);
|
||||
typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
|
||||
typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
|
||||
typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
|
||||
typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
|
||||
typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
|
||||
typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
|
||||
#endif
|
||||
|
||||
/* GL_AMD_program_binary_Z400 */
|
||||
#ifndef GL_AMD_program_binary_Z400
|
||||
#define GL_AMD_program_binary_Z400 1
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* EXT extension functions
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_EXT_blend_minmax */
|
||||
#ifndef GL_EXT_blend_minmax
|
||||
#define GL_EXT_blend_minmax 1
|
||||
#endif
|
||||
|
||||
/* GL_EXT_discard_framebuffer */
|
||||
#ifndef GL_EXT_discard_framebuffer
|
||||
#define GL_EXT_discard_framebuffer 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
|
||||
#endif
|
||||
typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_multi_draw_arrays
|
||||
#define GL_EXT_multi_draw_arrays 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei);
|
||||
GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
|
||||
typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
|
||||
#endif
|
||||
|
||||
/* GL_EXT_read_format_bgra */
|
||||
#ifndef GL_EXT_read_format_bgra
|
||||
#define GL_EXT_read_format_bgra 1
|
||||
#endif
|
||||
|
||||
/* GL_EXT_texture_filter_anisotropic */
|
||||
#ifndef GL_EXT_texture_filter_anisotropic
|
||||
#define GL_EXT_texture_filter_anisotropic 1
|
||||
#endif
|
||||
|
||||
/* GL_EXT_texture_format_BGRA8888 */
|
||||
#ifndef GL_EXT_texture_format_BGRA8888
|
||||
#define GL_EXT_texture_format_BGRA8888 1
|
||||
#endif
|
||||
|
||||
/* GL_EXT_texture_type_2_10_10_10_REV */
|
||||
#ifndef GL_EXT_texture_type_2_10_10_10_REV
|
||||
#define GL_EXT_texture_type_2_10_10_10_REV 1
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* IMG extension functions
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_IMG_program_binary */
|
||||
#ifndef GL_IMG_program_binary
|
||||
#define GL_IMG_program_binary 1
|
||||
#endif
|
||||
|
||||
/* GL_IMG_read_format */
|
||||
#ifndef GL_IMG_read_format
|
||||
#define GL_IMG_read_format 1
|
||||
#endif
|
||||
|
||||
/* GL_IMG_shader_binary */
|
||||
#ifndef GL_IMG_shader_binary
|
||||
#define GL_IMG_shader_binary 1
|
||||
#endif
|
||||
|
||||
/* GL_IMG_texture_compression_pvrtc */
|
||||
#ifndef GL_IMG_texture_compression_pvrtc
|
||||
#define GL_IMG_texture_compression_pvrtc 1
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* NV extension functions
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_NV_fence */
|
||||
#ifndef GL_NV_fence
|
||||
#define GL_NV_fence 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei, const GLuint *);
|
||||
GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei, GLuint *);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint);
|
||||
GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint);
|
||||
GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *);
|
||||
GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint);
|
||||
GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint, GLenum);
|
||||
#endif
|
||||
typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
|
||||
typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
|
||||
typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
|
||||
typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* QCOM extension functions
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_QCOM_driver_control */
|
||||
#ifndef GL_QCOM_driver_control
|
||||
#define GL_QCOM_driver_control 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
|
||||
GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, char *driverControlString);
|
||||
GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
|
||||
GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
|
||||
#endif
|
||||
typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
|
||||
typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, char *driverControlString);
|
||||
typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
|
||||
typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
|
||||
#endif
|
||||
|
||||
/* GL_QCOM_extended_get */
|
||||
#ifndef GL_QCOM_extended_get
|
||||
#define GL_QCOM_extended_get 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);
|
||||
GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
|
||||
GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
|
||||
GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
|
||||
GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);
|
||||
GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels);
|
||||
GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, void **params);
|
||||
#endif
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels);
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, void **params);
|
||||
#endif
|
||||
|
||||
/* GL_QCOM_extended_get2 */
|
||||
#ifndef GL_QCOM_extended_get2
|
||||
#define GL_QCOM_extended_get2 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);
|
||||
GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
|
||||
GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, char *source, GLint *length);
|
||||
#endif
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, char *source, GLint *length);
|
||||
#endif
|
||||
|
||||
/* GL_QCOM_perfmon_global_mode */
|
||||
#ifndef GL_QCOM_perfmon_global_mode
|
||||
#define GL_QCOM_perfmon_global_mode 1
|
||||
#endif
|
||||
|
||||
/* GL_QCOM_writeonly_rendering */
|
||||
#ifndef GL_QCOM_writeonly_rendering
|
||||
#define GL_QCOM_writeonly_rendering 1
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __gl2ext_h_ */
|
|
@ -0,0 +1,48 @@
|
|||
#ifndef __gl2extimg_h_
|
||||
#define __gl2extimg_h_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* IMG extension tokens
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_IMG_binary_shader */
|
||||
#ifndef GL_IMG_binary_shader
|
||||
#define GL_SGX_BINARY_IMG 0x8C0A
|
||||
#endif
|
||||
|
||||
/* GL_IMG_texture_compression_pvrtc */
|
||||
#ifndef GL_IMG_texture_compression_pvrtc
|
||||
#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
|
||||
#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
|
||||
#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
|
||||
#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
|
||||
#endif
|
||||
|
||||
|
||||
/* GL_IMG_texture_format_BGRA8888 */
|
||||
#define GL_BGRA 0x80E1
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
* IMG extension functions
|
||||
*------------------------------------------------------------------------*/
|
||||
|
||||
/* GL_IMG_binary_shader */
|
||||
#ifndef GL_IMG_binary_shader
|
||||
#define GL_IMG_binary_shader 1
|
||||
#endif
|
||||
|
||||
/* GL_IMG_texture_compression_pvrtc */
|
||||
#ifndef GL_IMG_texture_compression_pvrtc
|
||||
#define GL_IMG_texture_compression_pvrtc 1
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __gl2extimg_h_ */
|
|
@ -0,0 +1,27 @@
|
|||
#ifndef __gl2platform_h_
|
||||
#define __gl2platform_h_
|
||||
|
||||
/*
|
||||
* This document is licensed under the SGI Free Software B License Version
|
||||
* 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
|
||||
*/
|
||||
|
||||
/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h
|
||||
* Last modified on 2008/12/19
|
||||
*
|
||||
* Adopters may modify khrplatform.h and this file to suit their platform.
|
||||
* You are encouraged to submit all modifications to the Khronos group so that
|
||||
* they can be included in future versions of this file. Please submit changes
|
||||
* by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
|
||||
* by filing a bug against product "OpenGL-ES" component "Registry".
|
||||
*/
|
||||
|
||||
#include <KHR/khrplatform.h>
|
||||
|
||||
#ifndef GL_APICALL
|
||||
#define GL_APICALL KHRONOS_APICALL
|
||||
#endif
|
||||
|
||||
#define GL_APIENTRY KHRONOS_APIENTRY
|
||||
|
||||
#endif /* __gl2platform_h_ */
|
302
Engine/ExtIncludes/OpenGLES2.0/PowerVR/include/KHR/khrplatform.h
Normal file
|
@ -0,0 +1,302 @@
|
|||
#ifndef __khrplatform_h_
|
||||
#define __khrplatform_h_
|
||||
|
||||
/*
|
||||
** Copyright (c) 2008-2009 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
/* Khronos platform-specific types and definitions.
|
||||
*
|
||||
* $Revision: 1.4 $ on $Date: 2009/05/06 13:30:53 $
|
||||
*
|
||||
* Adopters may modify this file to suit their platform. Adopters are
|
||||
* encouraged to submit platform specific modifications to the Khronos
|
||||
* group so that they can be included in future versions of this file.
|
||||
* Please submit changes by sending them to the public Khronos Bugzilla
|
||||
* (http://khronos.org/bugzilla) by filing a bug against product
|
||||
* "Khronos (general)" component "Registry".
|
||||
*
|
||||
* A predefined template which fills in some of the bug fields can be
|
||||
* reached using http://tinyurl.com/khrplatform-h-bugreport, but you
|
||||
* must create a Bugzilla login first.
|
||||
*
|
||||
*
|
||||
* See the Implementer's Guidelines for information about where this file
|
||||
* should be located on your system and for more details of its use:
|
||||
* http://www.khronos.org/registry/implementers_guide.pdf
|
||||
*
|
||||
* This file should be included as
|
||||
* #include <KHR/khrplatform.h>
|
||||
* by Khronos client API header files that use its types and defines.
|
||||
*
|
||||
* The types in khrplatform.h should only be used to define API-specific types.
|
||||
*
|
||||
* Types defined in khrplatform.h:
|
||||
* khronos_int8_t signed 8 bit
|
||||
* khronos_uint8_t unsigned 8 bit
|
||||
* khronos_int16_t signed 16 bit
|
||||
* khronos_uint16_t unsigned 16 bit
|
||||
* khronos_int32_t signed 32 bit
|
||||
* khronos_uint32_t unsigned 32 bit
|
||||
* khronos_int64_t signed 64 bit
|
||||
* khronos_uint64_t unsigned 64 bit
|
||||
* khronos_intptr_t signed same number of bits as a pointer
|
||||
* khronos_uintptr_t unsigned same number of bits as a pointer
|
||||
* khronos_ssize_t signed size
|
||||
* khronos_usize_t unsigned size
|
||||
* khronos_float_t signed 32 bit floating point
|
||||
* khronos_time_ns_t unsigned 64 bit time in nanoseconds
|
||||
* khronos_utime_nanoseconds_t unsigned time interval or absolute time in
|
||||
* nanoseconds
|
||||
* khronos_stime_nanoseconds_t signed time interval in nanoseconds
|
||||
* khronos_boolean_enum_t enumerated boolean type. This should
|
||||
* only be used as a base type when a client API's boolean type is
|
||||
* an enum. Client APIs which use an integer or other type for
|
||||
* booleans cannot use this as the base type for their boolean.
|
||||
*
|
||||
* Tokens defined in khrplatform.h:
|
||||
*
|
||||
* KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
|
||||
*
|
||||
* KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
|
||||
* KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
|
||||
*
|
||||
* Calling convention macros defined in this file:
|
||||
* KHRONOS_APICALL
|
||||
* KHRONOS_APIENTRY
|
||||
* KHRONOS_APIATTRIBUTES
|
||||
*
|
||||
* These may be used in function prototypes as:
|
||||
*
|
||||
* KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
|
||||
* int arg1,
|
||||
* int arg2) KHRONOS_APIATTRIBUTES;
|
||||
*/
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Definition of KHRONOS_APICALL
|
||||
*-------------------------------------------------------------------------
|
||||
* This precedes the return type of the function in the function prototype.
|
||||
*/
|
||||
|
||||
#if (defined(_WIN32) || defined(__VC32__)) && !defined(__SCITECH_SNAP__)
|
||||
# if defined (_DLL_EXPORTS)
|
||||
# define KHRONOS_APICALL __declspec(dllexport)
|
||||
# else
|
||||
# define KHRONOS_APICALL __declspec(dllimport)
|
||||
# endif
|
||||
#elif defined (__SYMBIAN32__)
|
||||
# if defined (__GCC32__)
|
||||
# define KHRONOS_APICALL __declspec(dllexport)
|
||||
# else
|
||||
# define KHRONOS_APICALL IMPORT_C
|
||||
# endif
|
||||
#else
|
||||
# define KHRONOS_APICALL
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Definition of KHRONOS_APIENTRY
|
||||
*-------------------------------------------------------------------------
|
||||
* This follows the return type of the function and precedes the function
|
||||
* name in the function prototype.
|
||||
*/
|
||||
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
|
||||
/* Win32 but not WinCE */
|
||||
# define KHRONOS_APIENTRY __stdcall
|
||||
#else
|
||||
# define KHRONOS_APIENTRY
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Definition of KHRONOS_APIATTRIBUTES
|
||||
*-------------------------------------------------------------------------
|
||||
* This follows the closing parenthesis of the function prototype arguments.
|
||||
*/
|
||||
#if defined (__ARMCC_2__)
|
||||
#define KHRONOS_APIATTRIBUTES __softfp
|
||||
#else
|
||||
#define KHRONOS_APIATTRIBUTES
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* basic type definitions
|
||||
*-----------------------------------------------------------------------*/
|
||||
#if defined(__SYMBIAN32__)
|
||||
|
||||
#include <e32def.h>
|
||||
|
||||
typedef TInt32 khronos_int32_t;
|
||||
typedef TUint32 khronos_uint32_t;
|
||||
typedef TInt64 khronos_int64_t;
|
||||
typedef TUint64 khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
|
||||
|
||||
|
||||
/*
|
||||
* Using <stdint.h>
|
||||
*/
|
||||
#include <stdint.h>
|
||||
typedef int32_t khronos_int32_t;
|
||||
typedef uint32_t khronos_uint32_t;
|
||||
typedef int64_t khronos_int64_t;
|
||||
typedef uint64_t khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif defined(__VMS ) || defined(__sgi)
|
||||
|
||||
/*
|
||||
* Using <inttypes.h>
|
||||
*/
|
||||
#include <inttypes.h>
|
||||
typedef int32_t khronos_int32_t;
|
||||
typedef uint32_t khronos_uint32_t;
|
||||
typedef int64_t khronos_int64_t;
|
||||
typedef uint64_t khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
|
||||
|
||||
/*
|
||||
* Win32
|
||||
*/
|
||||
typedef __int32 khronos_int32_t;
|
||||
typedef unsigned __int32 khronos_uint32_t;
|
||||
typedef __int64 khronos_int64_t;
|
||||
typedef unsigned __int64 khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif defined(__sun__) || defined(__digital__)
|
||||
|
||||
/*
|
||||
* Sun or Digital
|
||||
*/
|
||||
typedef int khronos_int32_t;
|
||||
typedef unsigned int khronos_uint32_t;
|
||||
#if defined(__arch64__) || defined(_LP64)
|
||||
typedef long int khronos_int64_t;
|
||||
typedef unsigned long int khronos_uint64_t;
|
||||
#else
|
||||
typedef long long int khronos_int64_t;
|
||||
typedef unsigned long long int khronos_uint64_t;
|
||||
#endif /* __arch64__ */
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif defined(_UITRON_)
|
||||
|
||||
/*
|
||||
* uITRON
|
||||
*/
|
||||
typedef signed int khronos_int32_t;
|
||||
typedef unsigned int khronos_uint32_t;
|
||||
typedef long long khronos_int64_t;
|
||||
typedef unsigned long long khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
|
||||
#elif 0
|
||||
|
||||
/*
|
||||
* Hypothetical platform with no float or int64 support
|
||||
*/
|
||||
typedef int khronos_int32_t;
|
||||
typedef unsigned int khronos_uint32_t;
|
||||
#define KHRONOS_SUPPORT_INT64 0
|
||||
#define KHRONOS_SUPPORT_FLOAT 0
|
||||
|
||||
#else
|
||||
|
||||
/*
|
||||
* Generic fallback
|
||||
*/
|
||||
#include <stdint.h>
|
||||
typedef int32_t khronos_int32_t;
|
||||
typedef uint32_t khronos_uint32_t;
|
||||
typedef int64_t khronos_int64_t;
|
||||
typedef uint64_t khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Types that are (so far) the same on all platforms
|
||||
*/
|
||||
typedef signed char khronos_int8_t;
|
||||
typedef unsigned char khronos_uint8_t;
|
||||
typedef signed short int khronos_int16_t;
|
||||
typedef unsigned short int khronos_uint16_t;
|
||||
typedef signed long int khronos_intptr_t;
|
||||
typedef unsigned long int khronos_uintptr_t;
|
||||
typedef signed long int khronos_ssize_t;
|
||||
typedef unsigned long int khronos_usize_t;
|
||||
|
||||
#if KHRONOS_SUPPORT_FLOAT
|
||||
/*
|
||||
* Float type
|
||||
*/
|
||||
typedef float khronos_float_t;
|
||||
#endif
|
||||
|
||||
#if KHRONOS_SUPPORT_INT64
|
||||
/* Time types
|
||||
*
|
||||
* These types can be used to represent a time interval in nanoseconds or
|
||||
* an absolute Unadjusted System Time. Unadjusted System Time is the number
|
||||
* of nanoseconds since some arbitrary system event (e.g. since the last
|
||||
* time the system booted). The Unadjusted System Time is an unsigned
|
||||
* 64 bit value that wraps back to 0 every 584 years. Time intervals
|
||||
* may be either signed or unsigned.
|
||||
*/
|
||||
typedef khronos_uint64_t khronos_utime_nanoseconds_t;
|
||||
typedef khronos_int64_t khronos_stime_nanoseconds_t;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Dummy value used to pad enum types to 32 bits.
|
||||
*/
|
||||
#ifndef KHRONOS_MAX_ENUM
|
||||
#define KHRONOS_MAX_ENUM 0x7FFFFFFF
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Enumerated boolean type
|
||||
*
|
||||
* Values other than zero should be considered to be true. Therefore
|
||||
* comparisons should not be made against KHRONOS_TRUE.
|
||||
*/
|
||||
typedef enum {
|
||||
KHRONOS_FALSE = 0,
|
||||
KHRONOS_TRUE = 1,
|
||||
KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
|
||||
} khronos_boolean_enum_t;
|
||||
|
||||
#endif /* __khrplatform_h_ */
|
758
Engine/ExtIncludes/ShaderUtil/Cg/cg.h
Normal file
|
@ -0,0 +1,758 @@
|
|||
/*
|
||||
*
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _cg_h
|
||||
#define _cg_h
|
||||
|
||||
/*************************************************************************/
|
||||
/*** CG Run-Time Library API ***/
|
||||
/*************************************************************************/
|
||||
|
||||
#define CG_VERSION_NUM 2200
|
||||
|
||||
#ifdef _WIN32
|
||||
# ifndef APIENTRY /* From Win32's <windef.h> */
|
||||
# define CG_APIENTRY_DEFINED
|
||||
# if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) || defined(__LCC__)
|
||||
# define APIENTRY __stdcall
|
||||
# else
|
||||
# define APIENTRY
|
||||
# endif
|
||||
# endif
|
||||
# ifndef WINGDIAPI /* From Win32's <wingdi.h> and <winnt.h> */
|
||||
# define CG_WINGDIAPI_DEFINED
|
||||
# define WINGDIAPI __declspec(dllimport)
|
||||
# endif
|
||||
#endif /* _WIN32 */
|
||||
|
||||
/* Set up CG_API for Win32 dllexport or gcc visibility */
|
||||
|
||||
#ifndef CG_API
|
||||
# ifdef CG_EXPORTS
|
||||
# ifdef _WIN32
|
||||
# define CG_API __declspec(dllexport)
|
||||
# elif defined(__GNUC__) && __GNUC__>=4
|
||||
# define CG_API __attribute__ ((visibility("default")))
|
||||
# elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
||||
# define CG_API __global
|
||||
# else
|
||||
# define CG_API
|
||||
# endif
|
||||
# else
|
||||
# define CG_API
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef CGENTRY
|
||||
# ifdef _WIN32
|
||||
# define CGENTRY __cdecl
|
||||
# else
|
||||
# define CGENTRY
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*************************************************************************/
|
||||
/*** Data types and enumerants ***/
|
||||
/*************************************************************************/
|
||||
|
||||
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 _CGobj *CGobj;
|
||||
typedef struct _CGbuffer *CGbuffer;
|
||||
typedef struct _CGeffect *CGeffect;
|
||||
typedef struct _CGtechnique *CGtechnique;
|
||||
typedef struct _CGpass *CGpass;
|
||||
typedef struct _CGstate *CGstate;
|
||||
typedef struct _CGstateassignment *CGstateassignment;
|
||||
typedef struct _CGannotation *CGannotation;
|
||||
typedef void *CGhandle;
|
||||
|
||||
|
||||
/*!!! PREPROCESS BEGIN */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CG_UNKNOWN_TYPE,
|
||||
CG_STRUCT,
|
||||
CG_ARRAY,
|
||||
CG_TYPELESS_STRUCT,
|
||||
|
||||
CG_TYPE_START_ENUM = 1024,
|
||||
#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
|
||||
|
||||
CG_TYPE_MAX
|
||||
} CGtype;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
# define CG_BINDLOCATION_MACRO(name,enum_name,compiler_name,\
|
||||
enum_int,addressable,param_type) \
|
||||
enum_name = enum_int,
|
||||
|
||||
#include <Cg/cg_bindlocations.h>
|
||||
|
||||
CG_UNDEFINED = 3256
|
||||
} CGresource;
|
||||
|
||||
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_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
|
||||
} CGprofile;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
#define CG_ERROR_MACRO(code, enum_name, message) \
|
||||
enum_name = code,
|
||||
#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>
|
||||
|
||||
CG_ENUM_MAX
|
||||
} CGenum;
|
||||
|
||||
/*!!! PREPROCESS END */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CG_PARAMETERCLASS_UNKNOWN = 0,
|
||||
CG_PARAMETERCLASS_SCALAR,
|
||||
CG_PARAMETERCLASS_VECTOR,
|
||||
CG_PARAMETERCLASS_MATRIX,
|
||||
CG_PARAMETERCLASS_STRUCT,
|
||||
CG_PARAMETERCLASS_ARRAY,
|
||||
CG_PARAMETERCLASS_SAMPLER,
|
||||
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_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_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_MAX
|
||||
} CGbufferusage;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
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 ***/
|
||||
/*************************************************************************/
|
||||
|
||||
#ifndef CG_EXPLICIT
|
||||
|
||||
/*** Library policy functions ***/
|
||||
|
||||
CG_API CGenum CGENTRY cgSetLockingPolicy(CGenum lockingPolicy);
|
||||
CG_API CGenum CGENTRY cgGetLockingPolicy(void);
|
||||
CG_API CGenum CGENTRY cgSetSemanticCasePolicy(CGenum casePolicy);
|
||||
CG_API CGenum CGENTRY cgGetSemanticCasePolicy(void);
|
||||
|
||||
/*** Context functions ***/
|
||||
|
||||
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);
|
||||
CG_API void CGENTRY cgSetAutoCompile(CGcontext ctx, CGenum flag);
|
||||
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,
|
||||
CGenum program_type,
|
||||
const char *program,
|
||||
CGprofile profile,
|
||||
const char *entry,
|
||||
const char **args);
|
||||
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 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 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,
|
||||
int length);
|
||||
CG_API CGparameter CGENTRY cgCreateParameterMultiDimArray(CGcontext ctx,
|
||||
CGtype type,
|
||||
int dim,
|
||||
const int *lengths);
|
||||
CG_API void CGENTRY cgDestroyParameter(CGparameter param);
|
||||
CG_API void CGENTRY cgConnectParameter(CGparameter from, CGparameter to);
|
||||
CG_API void CGENTRY cgDisconnectParameter(CGparameter param);
|
||||
CG_API CGparameter CGENTRY cgGetConnectedParameter(CGparameter param);
|
||||
|
||||
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,
|
||||
const char *name);
|
||||
|
||||
CG_API CGparameter CGENTRY cgGetFirstParameter(CGprogram prog, CGenum name_space);
|
||||
CG_API CGparameter CGENTRY cgGetNextParameter(CGparameter current);
|
||||
CG_API CGparameter CGENTRY cgGetFirstLeafParameter(CGprogram prog, CGenum name_space);
|
||||
CG_API CGparameter CGENTRY cgGetNextLeafParameter(CGparameter current);
|
||||
|
||||
CG_API CGparameter CGENTRY cgGetFirstStructParameter(CGparameter param);
|
||||
CG_API CGparameter CGENTRY cgGetNamedStructParameter(CGparameter param,
|
||||
const char *name);
|
||||
|
||||
CG_API CGparameter CGENTRY cgGetFirstDependentParameter(CGparameter param);
|
||||
|
||||
CG_API CGparameter CGENTRY cgGetArrayParameter(CGparameter aparam, int index);
|
||||
CG_API int CGENTRY cgGetArrayDimension(CGparameter param);
|
||||
CG_API CGtype CGENTRY cgGetArrayType(CGparameter param);
|
||||
CG_API int CGENTRY cgGetArraySize(CGparameter param, int dimension);
|
||||
CG_API int CGENTRY cgGetArrayTotalSize(CGparameter param);
|
||||
CG_API void CGENTRY cgSetArraySize(CGparameter param, int size);
|
||||
CG_API void CGENTRY cgSetMultiDimArraySize(CGparameter param, const int *sizes);
|
||||
|
||||
CG_API CGprogram CGENTRY cgGetParameterProgram(CGparameter param);
|
||||
CG_API CGcontext CGENTRY cgGetParameterContext(CGparameter param);
|
||||
CG_API CGbool CGENTRY cgIsParameter(CGparameter param);
|
||||
CG_API const char * CGENTRY cgGetParameterName(CGparameter param);
|
||||
CG_API CGtype CGENTRY cgGetParameterType(CGparameter param);
|
||||
CG_API CGtype CGENTRY cgGetParameterBaseType(CGparameter param);
|
||||
CG_API CGparameterclass CGENTRY cgGetParameterClass(CGparameter param);
|
||||
CG_API int CGENTRY cgGetParameterRows(CGparameter param);
|
||||
CG_API int CGENTRY cgGetParameterColumns(CGparameter param);
|
||||
CG_API CGtype CGENTRY cgGetParameterNamedType(CGparameter param);
|
||||
CG_API const char * CGENTRY cgGetParameterSemantic(CGparameter param);
|
||||
CG_API CGresource CGENTRY cgGetParameterResource(CGparameter param);
|
||||
CG_API CGresource CGENTRY cgGetParameterBaseResource(CGparameter param);
|
||||
CG_API unsigned long CGENTRY cgGetParameterResourceIndex(CGparameter param);
|
||||
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,
|
||||
CGenum value_type,
|
||||
int *nvalues);
|
||||
CG_API void CGENTRY cgSetParameterValuedr(CGparameter param, int n, const double *vals);
|
||||
CG_API void CGENTRY cgSetParameterValuedc(CGparameter param, int n, const double *vals);
|
||||
CG_API void CGENTRY cgSetParameterValuefr(CGparameter param, int n, const float *vals);
|
||||
CG_API void CGENTRY cgSetParameterValuefc(CGparameter param, int n, const float *vals);
|
||||
CG_API void CGENTRY cgSetParameterValueir(CGparameter param, int n, const int *vals);
|
||||
CG_API void CGENTRY cgSetParameterValueic(CGparameter param, int n, const int *vals);
|
||||
CG_API int CGENTRY cgGetParameterValuedr(CGparameter param, int n, double *vals);
|
||||
CG_API int CGENTRY cgGetParameterValuedc(CGparameter param, int n, double *vals);
|
||||
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);
|
||||
|
||||
CG_API int CGENTRY cgGetParameterOrdinalNumber(CGparameter param);
|
||||
CG_API CGbool CGENTRY cgIsParameterGlobal(CGparameter param);
|
||||
CG_API int CGENTRY cgGetParameterIndex(CGparameter param);
|
||||
|
||||
CG_API void CGENTRY cgSetParameterVariability(CGparameter param, CGenum vary);
|
||||
CG_API void CGENTRY cgSetParameterSemantic(CGparameter param, const char *semantic);
|
||||
|
||||
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,
|
||||
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,
|
||||
double z);
|
||||
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,
|
||||
int z,
|
||||
int w);
|
||||
|
||||
CG_API void CGENTRY cgSetParameter1iv(CGparameter param, const int *v);
|
||||
CG_API void CGENTRY cgSetParameter2iv(CGparameter param, const int *v);
|
||||
CG_API void CGENTRY cgSetParameter3iv(CGparameter param, const int *v);
|
||||
CG_API void CGENTRY cgSetParameter4iv(CGparameter param, const int *v);
|
||||
CG_API void CGENTRY cgSetParameter1fv(CGparameter param, const float *v);
|
||||
CG_API void CGENTRY cgSetParameter2fv(CGparameter param, const float *v);
|
||||
CG_API void CGENTRY cgSetParameter3fv(CGparameter param, const float *v);
|
||||
CG_API void CGENTRY cgSetParameter4fv(CGparameter param, const float *v);
|
||||
CG_API void CGENTRY cgSetParameter1dv(CGparameter param, const double *v);
|
||||
CG_API void CGENTRY cgSetParameter2dv(CGparameter param, const double *v);
|
||||
CG_API void CGENTRY cgSetParameter3dv(CGparameter param, const double *v);
|
||||
CG_API void CGENTRY cgSetParameter4dv(CGparameter param, const double *v);
|
||||
|
||||
CG_API void CGENTRY cgSetMatrixParameterir(CGparameter param, const int *matrix);
|
||||
CG_API void CGENTRY cgSetMatrixParameterdr(CGparameter param, const double *matrix);
|
||||
CG_API void CGENTRY cgSetMatrixParameterfr(CGparameter param, const float *matrix);
|
||||
CG_API void CGENTRY cgSetMatrixParameteric(CGparameter param, const int *matrix);
|
||||
CG_API void CGENTRY cgSetMatrixParameterdc(CGparameter param, const double *matrix);
|
||||
CG_API void CGENTRY cgSetMatrixParameterfc(CGparameter param, const float *matrix);
|
||||
|
||||
CG_API void CGENTRY cgGetMatrixParameterir(CGparameter param, int *matrix);
|
||||
CG_API void CGENTRY cgGetMatrixParameterdr(CGparameter param, double *matrix);
|
||||
CG_API void CGENTRY cgGetMatrixParameterfr(CGparameter param, float *matrix);
|
||||
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 ***/
|
||||
|
||||
CG_API const char * CGENTRY cgGetTypeString(CGtype type);
|
||||
CG_API CGtype CGENTRY cgGetType(const char *type_string);
|
||||
|
||||
CG_API CGtype CGENTRY cgGetNamedUserType(CGhandle handle, const char *name);
|
||||
|
||||
CG_API int CGENTRY cgGetNumUserTypes(CGhandle handle);
|
||||
CG_API CGtype CGENTRY cgGetUserType(CGhandle handle, int index);
|
||||
|
||||
CG_API int CGENTRY cgGetNumParentTypes(CGtype type);
|
||||
CG_API CGtype CGENTRY cgGetParentType(CGtype type, int index);
|
||||
|
||||
CG_API CGbool CGENTRY cgIsParentType(CGtype parent, CGtype child);
|
||||
CG_API CGbool CGENTRY cgIsInterfaceType(CGtype type);
|
||||
|
||||
/*** Resource Functions ***/
|
||||
|
||||
CG_API const char * CGENTRY cgGetResourceString(CGresource resource);
|
||||
CG_API CGresource CGENTRY cgGetResource(const char *resource_string);
|
||||
|
||||
/*** Enum Functions ***/
|
||||
|
||||
CG_API const char * CGENTRY cgGetEnumString(CGenum en);
|
||||
CG_API CGenum CGENTRY cgGetEnum(const char *enum_string);
|
||||
|
||||
/*** Profile Functions ***/
|
||||
|
||||
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 ***/
|
||||
|
||||
CG_API CGerror CGENTRY cgGetError(void);
|
||||
CG_API CGerror CGENTRY cgGetFirstError(void);
|
||||
CG_API const char * CGENTRY cgGetErrorString(CGerror error);
|
||||
CG_API const char * CGENTRY cgGetLastErrorString(CGerror *error);
|
||||
CG_API void CGENTRY cgSetErrorCallback(CGerrorCallbackFunc func);
|
||||
CG_API CGerrorCallbackFunc CGENTRY cgGetErrorCallback(void);
|
||||
CG_API void CGENTRY cgSetErrorHandler(CGerrorHandlerFunc func, void *data);
|
||||
CG_API CGerrorHandlerFunc CGENTRY cgGetErrorHandler(void **data);
|
||||
|
||||
/*** Misc Functions ***/
|
||||
|
||||
CG_API const char * CGENTRY cgGetString(CGenum sname);
|
||||
|
||||
|
||||
/*** CgFX Functions ***/
|
||||
|
||||
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 void CGENTRY cgDestroyEffect(CGeffect);
|
||||
CG_API CGcontext CGENTRY cgGetEffectContext(CGeffect);
|
||||
CG_API CGbool CGENTRY cgIsEffect(CGeffect effect);
|
||||
|
||||
CG_API CGeffect CGENTRY cgGetFirstEffect(CGcontext);
|
||||
CG_API CGeffect CGENTRY cgGetNextEffect(CGeffect);
|
||||
|
||||
CG_API CGprogram CGENTRY cgCreateProgramFromEffect(CGeffect effect,
|
||||
CGprofile profile,
|
||||
const char *entry,
|
||||
const char **args);
|
||||
|
||||
CG_API CGtechnique CGENTRY cgGetFirstTechnique(CGeffect);
|
||||
CG_API CGtechnique CGENTRY cgGetNextTechnique(CGtechnique);
|
||||
CG_API CGtechnique CGENTRY cgGetNamedTechnique(CGeffect, const char *name);
|
||||
CG_API const char * CGENTRY cgGetTechniqueName(CGtechnique);
|
||||
CG_API CGbool CGENTRY cgIsTechnique(CGtechnique);
|
||||
CG_API CGbool CGENTRY cgValidateTechnique(CGtechnique);
|
||||
CG_API CGbool CGENTRY cgIsTechniqueValidated(CGtechnique);
|
||||
CG_API CGeffect CGENTRY cgGetTechniqueEffect(CGtechnique);
|
||||
|
||||
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 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);
|
||||
|
||||
CG_API CGstateassignment CGENTRY cgGetFirstStateAssignment(CGpass);
|
||||
CG_API CGstateassignment CGENTRY cgGetNamedStateAssignment(CGpass, const char *name);
|
||||
CG_API CGstateassignment CGENTRY cgGetNextStateAssignment(CGstateassignment);
|
||||
CG_API CGbool CGENTRY cgIsStateAssignment(CGstateassignment);
|
||||
CG_API CGbool CGENTRY cgCallStateSetCallback(CGstateassignment);
|
||||
CG_API CGbool CGENTRY cgCallStateValidateCallback(CGstateassignment);
|
||||
CG_API CGbool CGENTRY cgCallStateResetCallback(CGstateassignment);
|
||||
CG_API CGpass CGENTRY cgGetStateAssignmentPass(CGstateassignment);
|
||||
CG_API CGparameter CGENTRY cgGetSamplerStateAssignmentParameter(CGstateassignment);
|
||||
|
||||
CG_API const float * CGENTRY cgGetFloatStateAssignmentValues(CGstateassignment, int *nVals);
|
||||
CG_API const int * CGENTRY cgGetIntStateAssignmentValues(CGstateassignment, int *nVals);
|
||||
CG_API const CGbool * CGENTRY cgGetBoolStateAssignmentValues(CGstateassignment, int *nVals);
|
||||
CG_API const char * CGENTRY cgGetStringStateAssignmentValue(CGstateassignment);
|
||||
CG_API CGprogram CGENTRY cgGetProgramStateAssignmentValue(CGstateassignment);
|
||||
CG_API CGparameter CGENTRY cgGetTextureStateAssignmentValue(CGstateassignment);
|
||||
CG_API CGparameter CGENTRY cgGetSamplerStateAssignmentValue(CGstateassignment);
|
||||
CG_API int CGENTRY cgGetStateAssignmentIndex(CGstateassignment);
|
||||
|
||||
CG_API int CGENTRY cgGetNumDependentStateAssignmentParameters(CGstateassignment);
|
||||
CG_API CGparameter CGENTRY cgGetDependentStateAssignmentParameter(CGstateassignment, int index);
|
||||
|
||||
CG_API CGparameter CGENTRY cgGetConnectedStateAssignmentParameter(CGstateassignment);
|
||||
|
||||
CG_API CGstate CGENTRY cgGetStateAssignmentState(CGstateassignment);
|
||||
CG_API CGstate CGENTRY cgGetSamplerStateAssignmentState(CGstateassignment);
|
||||
|
||||
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);
|
||||
CG_API CGstate CGENTRY cgGetNamedState(CGcontext, const char *name);
|
||||
CG_API CGstate CGENTRY cgGetFirstState(CGcontext);
|
||||
CG_API CGstate CGENTRY cgGetNextState(CGstate);
|
||||
CG_API CGbool CGENTRY cgIsState(CGstate);
|
||||
CG_API void CGENTRY cgAddStateEnumerant(CGstate, const char *name, int value);
|
||||
|
||||
CG_API CGstate CGENTRY cgCreateSamplerState(CGcontext, const char *name, CGtype);
|
||||
CG_API CGstate CGENTRY cgCreateArraySamplerState(CGcontext, const char *name, CGtype, int nelems);
|
||||
CG_API CGstate CGENTRY cgGetNamedSamplerState(CGcontext, const char *name);
|
||||
CG_API CGstate CGENTRY cgGetFirstSamplerState(CGcontext);
|
||||
|
||||
CG_API CGstateassignment CGENTRY cgGetFirstSamplerStateAssignment(CGparameter);
|
||||
CG_API CGstateassignment CGENTRY cgGetNamedSamplerStateAssignment(CGparameter, const char *);
|
||||
CG_API void CGENTRY cgSetSamplerState(CGparameter);
|
||||
|
||||
CG_API CGparameter CGENTRY cgGetNamedEffectParameter(CGeffect, const char *);
|
||||
CG_API CGparameter CGENTRY cgGetFirstLeafEffectParameter(CGeffect);
|
||||
CG_API CGparameter CGENTRY cgGetFirstEffectParameter(CGeffect);
|
||||
CG_API CGparameter CGENTRY cgGetEffectParameterBySemantic(CGeffect, const char *);
|
||||
|
||||
CG_API CGannotation CGENTRY cgGetFirstTechniqueAnnotation(CGtechnique);
|
||||
CG_API CGannotation CGENTRY cgGetFirstPassAnnotation(CGpass);
|
||||
CG_API CGannotation CGENTRY cgGetFirstParameterAnnotation(CGparameter);
|
||||
CG_API CGannotation CGENTRY cgGetFirstProgramAnnotation(CGprogram);
|
||||
CG_API CGannotation CGENTRY cgGetFirstEffectAnnotation(CGeffect);
|
||||
CG_API CGannotation CGENTRY cgGetNextAnnotation(CGannotation);
|
||||
|
||||
CG_API CGannotation CGENTRY cgGetNamedTechniqueAnnotation(CGtechnique, const char *);
|
||||
CG_API CGannotation CGENTRY cgGetNamedPassAnnotation(CGpass, const char *);
|
||||
CG_API CGannotation CGENTRY cgGetNamedParameterAnnotation(CGparameter, const char *);
|
||||
CG_API CGannotation CGENTRY cgGetNamedProgramAnnotation(CGprogram, const char *);
|
||||
CG_API CGannotation CGENTRY cgGetNamedEffectAnnotation(CGeffect, const char *);
|
||||
|
||||
CG_API CGbool CGENTRY cgIsAnnotation(CGannotation);
|
||||
|
||||
CG_API const char * CGENTRY cgGetAnnotationName(CGannotation);
|
||||
CG_API CGtype CGENTRY cgGetAnnotationType(CGannotation);
|
||||
|
||||
CG_API const float * CGENTRY cgGetFloatAnnotationValues(CGannotation, int *nvalues);
|
||||
CG_API const int * CGENTRY cgGetIntAnnotationValues(CGannotation, int *nvalues);
|
||||
CG_API const char * CGENTRY cgGetStringAnnotationValue(CGannotation);
|
||||
CG_API const char * const * CGENTRY cgGetStringAnnotationValues(CGannotation, int *nvalues);
|
||||
CG_API const CGbool * CGENTRY cgGetBoolAnnotationValues(CGannotation, int *nvalues);
|
||||
CG_API const int * CGENTRY cgGetBooleanAnnotationValues(CGannotation, int *nvalues);
|
||||
|
||||
CG_API int CGENTRY cgGetNumDependentAnnotationParameters(CGannotation);
|
||||
CG_API CGparameter CGENTRY cgGetDependentAnnotationParameter(CGannotation, int index);
|
||||
|
||||
CG_API void CGENTRY cgEvaluateProgram(CGprogram, float *, int ncomps, int nx, int ny, int nz);
|
||||
|
||||
/*** Cg 1.5 Additions ***/
|
||||
|
||||
CG_API CGbool CGENTRY cgSetEffectName(CGeffect, const char *name);
|
||||
CG_API const char * CGENTRY cgGetEffectName(CGeffect);
|
||||
CG_API CGeffect CGENTRY cgGetNamedEffect(CGcontext, const char *name);
|
||||
CG_API CGparameter CGENTRY cgCreateEffectParameter(CGeffect, const char *name, CGtype);
|
||||
|
||||
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 CGpass CGENTRY cgCreatePass(CGtechnique, const char *name);
|
||||
|
||||
CG_API CGstateassignment CGENTRY cgCreateStateAssignment(CGpass, CGstate);
|
||||
CG_API CGstateassignment CGENTRY cgCreateStateAssignmentIndex(CGpass, CGstate, int index);
|
||||
CG_API CGstateassignment CGENTRY cgCreateSamplerStateAssignment(CGparameter, CGstate);
|
||||
|
||||
CG_API CGbool CGENTRY cgSetFloatStateAssignment(CGstateassignment, float);
|
||||
CG_API CGbool CGENTRY cgSetIntStateAssignment(CGstateassignment, int);
|
||||
CG_API CGbool CGENTRY cgSetBoolStateAssignment(CGstateassignment, CGbool);
|
||||
CG_API CGbool CGENTRY cgSetStringStateAssignment(CGstateassignment, const char *);
|
||||
CG_API CGbool CGENTRY cgSetProgramStateAssignment(CGstateassignment, CGprogram);
|
||||
CG_API CGbool CGENTRY cgSetSamplerStateAssignment(CGstateassignment, CGparameter);
|
||||
CG_API CGbool CGENTRY cgSetTextureStateAssignment(CGstateassignment, CGparameter);
|
||||
|
||||
CG_API CGbool CGENTRY cgSetFloatArrayStateAssignment(CGstateassignment, const float *vals);
|
||||
CG_API CGbool CGENTRY cgSetIntArrayStateAssignment(CGstateassignment, const int *vals);
|
||||
CG_API CGbool CGENTRY cgSetBoolArrayStateAssignment(CGstateassignment, const CGbool *vals);
|
||||
|
||||
CG_API CGannotation CGENTRY cgCreateTechniqueAnnotation(CGtechnique, const char *name, CGtype);
|
||||
CG_API CGannotation CGENTRY cgCreatePassAnnotation(CGpass, const char *name, CGtype);
|
||||
CG_API CGannotation CGENTRY cgCreateParameterAnnotation(CGparameter, const char *name, CGtype);
|
||||
CG_API CGannotation CGENTRY cgCreateProgramAnnotation(CGprogram, const char *name, CGtype);
|
||||
CG_API CGannotation CGENTRY cgCreateEffectAnnotation(CGeffect, const char *name, CGtype);
|
||||
|
||||
CG_API CGbool CGENTRY cgSetIntAnnotation(CGannotation, int value);
|
||||
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);
|
||||
|
||||
CG_API CGeffect CGENTRY cgGetParameterEffect(CGparameter param);
|
||||
|
||||
CG_API CGparameterclass CGENTRY cgGetTypeClass(CGtype type);
|
||||
CG_API CGtype CGENTRY cgGetTypeBase(CGtype type);
|
||||
CG_API CGbool CGENTRY cgGetTypeSizes(CGtype type, int *nrows, int *ncols);
|
||||
CG_API void CGENTRY cgGetMatrixSize(CGtype type, int *nrows, int *ncols);
|
||||
|
||||
CG_API int CGENTRY cgGetNumProgramDomains( CGprogram program );
|
||||
CG_API CGdomain CGENTRY cgGetProfileDomain( CGprofile profile );
|
||||
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 );
|
||||
CG_API CGobj CGENTRY cgCreateObjFromFile( CGcontext context, CGenum program_type, const char *source_file, CGprofile profile, const char **args );
|
||||
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);
|
||||
|
||||
CG_API CGbuffer CGENTRY cgCreateBuffer(CGcontext, int size, const void *data, CGbufferusage bufferUsage);
|
||||
CG_API void CGENTRY cgSetBufferData(CGbuffer, int size, const void *data);
|
||||
CG_API void CGENTRY cgSetBufferSubData(CGbuffer, int offset, int size, const void *data);
|
||||
CG_API void CGENTRY cgSetProgramBuffer(CGprogram program, int bufferIndex, CGbuffer buffer);
|
||||
|
||||
CG_API void * CGENTRY cgMapBuffer(CGbuffer buffer, CGbufferaccess access);
|
||||
CG_API void CGENTRY cgUnmapBuffer(CGbuffer buffer);
|
||||
CG_API void CGENTRY cgDestroyBuffer(CGbuffer buffer);
|
||||
CG_API CGbuffer CGENTRY cgGetProgramBuffer(CGprogram, int bufferIndex);
|
||||
CG_API int CGENTRY cgGetBufferSize(CGbuffer);
|
||||
CG_API int CGENTRY cgGetProgramBufferMaxSize(CGprofile profile);
|
||||
CG_API int CGENTRY cgGetProgramBufferMaxIndex(CGprofile profile);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CG_APIENTRY_DEFINED
|
||||
# undef CG_APIENTRY_DEFINED
|
||||
# undef APIENTRY
|
||||
#endif
|
||||
|
||||
#ifdef CG_WINGDIAPI_DEFINED
|
||||
# undef CG_WINGDIAPI_DEFINED
|
||||
# undef WINGDIAPI
|
||||
#endif
|
||||
|
||||
#endif
|
75
Engine/ExtIncludes/ShaderUtil/Cg/cgGL_profiles.h
Normal file
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
*
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
CG_PROFILE_MACRO(Vertex,vp20,VP20,"vp20",6146,1)
|
||||
CG_PROFILE_MACRO(Fragment20,fp20,FP20,"fp20",6147,0)
|
||||
CG_PROFILE_MACRO(Vertex30,vp30,VP30,"vp30",6148,1)
|
||||
CG_PROFILE_MACRO(Fragment,fp30,FP30,"fp30",6149,0)
|
||||
CG_PROFILE_MACRO(ARBVertex,arbvp1,ARBVP1,"arbvp1",6150,1)
|
||||
CG_PROFILE_MACRO(Fragment40,fp40,FP40,"fp40",6151,0)
|
||||
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
|
382
Engine/ExtIncludes/ShaderUtil/Cg/cg_bindlocations.h
Normal file
|
@ -0,0 +1,382 @@
|
|||
|
||||
|
||||
/*
|
||||
*
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* The following macro invocations define the supported CG basic hardware
|
||||
* bind locations.
|
||||
*
|
||||
* The macros have the form :
|
||||
*
|
||||
* CG_BINDLOCATION_MACRO(name, compiler_name, enum_int)
|
||||
*
|
||||
* name : The name of the location.
|
||||
* enum_name : The C enumerant.
|
||||
* compiler_name : The name of the location within the compiler syntax.
|
||||
* int_id : Integer enumerant associated with this bind location.
|
||||
* (3256 is reservered for CG_UNDEFINED)
|
||||
* addressable : The bind location must have an integer address
|
||||
* associated with it.
|
||||
* ParamType : the cgParamType of this register.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
CG_BINDLOCATION_MACRO(TexUnit0,CG_TEXUNIT0,"texunit 0",2048,0,CG_TEXOBJ_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexUnit1,CG_TEXUNIT1,"texunit 1",2049,0,CG_TEXOBJ_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexUnit2,CG_TEXUNIT2,"texunit 2",2050,0,CG_TEXOBJ_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexUnit3,CG_TEXUNIT3,"texunit 3",2051,0,CG_TEXOBJ_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexUnit4,CG_TEXUNIT4,"texunit 4",2052,0,CG_TEXOBJ_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexUnit5,CG_TEXUNIT5,"texunit 5",2053,0,CG_TEXOBJ_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexUnit6,CG_TEXUNIT6,"texunit 6",2054,0,CG_TEXOBJ_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexUnit7,CG_TEXUNIT7,"texunit 7",2055,0,CG_TEXOBJ_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexUnit8,CG_TEXUNIT8,"texunit 8",2056,0,CG_TEXOBJ_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexUnit9,CG_TEXUNIT9,"texunit 9",2057,0,CG_TEXOBJ_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexUnit10,CG_TEXUNIT10,"texunit 10",2058,0,CG_TEXOBJ_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexUnit11,CG_TEXUNIT11,"texunit 11",2059,0,CG_TEXOBJ_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexUnit12,CG_TEXUNIT12,"texunit 12",2060,0,CG_TEXOBJ_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexUnit13,CG_TEXUNIT13,"texunit 13",2061,0,CG_TEXOBJ_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexUnit14,CG_TEXUNIT14,"texunit 14",2062,0,CG_TEXOBJ_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexUnit15,CG_TEXUNIT15,"texunit 15",2063,0,CG_TEXOBJ_PARAM)
|
||||
|
||||
CG_BINDLOCATION_MACRO(Buffer0, CG_BUFFER0, "buffer[0]", 2064, 1, CGI_UNIFORM_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Buffer1, CG_BUFFER1, "buffer[1]", 2065, 1, CGI_UNIFORM_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Buffer2, CG_BUFFER2, "buffer[2]", 2066, 1, CGI_UNIFORM_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Buffer3, CG_BUFFER3, "buffer[3]", 2067, 1, CGI_UNIFORM_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Buffer4, CG_BUFFER4, "buffer[4]", 2068, 1, CGI_UNIFORM_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Buffer5, CG_BUFFER5, "buffer[5]", 2069, 1, CGI_UNIFORM_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Buffer6, CG_BUFFER6, "buffer[6]", 2070, 1, CGI_UNIFORM_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Buffer7, CG_BUFFER7, "buffer[7]", 2071, 1, CGI_UNIFORM_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Buffer8, CG_BUFFER8, "buffer[8]", 2072, 1, CGI_UNIFORM_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Buffer9, CG_BUFFER9, "buffer[9]", 2073, 1, CGI_UNIFORM_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Buffer10, CG_BUFFER10, "buffer[10]", 2074, 1, CGI_UNIFORM_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Buffer11, CG_BUFFER11, "buffer[11]", 2075, 1, CGI_UNIFORM_PARAM)
|
||||
|
||||
CG_BINDLOCATION_MACRO(Attr0,CG_ATTR0,"ATTR0",2113,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Attr1,CG_ATTR1,"ATTR1",2114,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Attr2,CG_ATTR2,"ATTR2",2115,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Attr3,CG_ATTR3,"ATTR3",2116,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Attr4,CG_ATTR4,"ATTR4",2117,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Attr5,CG_ATTR5,"ATTR5",2118,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Attr6,CG_ATTR6,"ATTR6",2119,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Attr7,CG_ATTR7,"ATTR7",2120,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Attr8,CG_ATTR8,"ATTR8",2121,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Attr9,CG_ATTR9,"ATTR9",2122,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Attr10,CG_ATTR10,"ATTR10",2123,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Attr11,CG_ATTR11,"ATTR11",2124,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Attr12,CG_ATTR12,"ATTR12",2125,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Attr13,CG_ATTR13,"ATTR13",2126,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Attr14,CG_ATTR14,"ATTR14",2127,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Attr15,CG_ATTR15,"ATTR15",2128,0,CG_VARYING_PARAM)
|
||||
|
||||
CG_BINDLOCATION_MACRO(VertUniform,CG_C,"c",2178,1,CGI_UNIFORM_PARAM)
|
||||
|
||||
CG_BINDLOCATION_MACRO(Tex0,CG_TEX0,"TEX0",2179,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Tex1,CG_TEX1,"TEX1",2180,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Tex2,CG_TEX2,"TEX2",2181,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Tex3,CG_TEX3,"TEX3",2192,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Tex4,CG_TEX4,"TEX4",2193,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Tex5,CG_TEX5,"TEX5",2194,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Tex6,CG_TEX6,"TEX6",2195,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Tex7,CG_TEX7,"TEX7",2196,0,CG_VARYING_PARAM)
|
||||
|
||||
CG_BINDLOCATION_MACRO(HPos,CG_HPOS,"HPOS",2243,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Col0,CG_COL0,"COL0",2245,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Col1,CG_COL1,"COL1",2246,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Col2,CG_COL2,"COL2",2247,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Col3,CG_COL3,"COL3",2248,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(PSiz,CG_PSIZ,"PSIZ",2309,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Clp0,CG_CLP0,"CLP0",2310,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Clp1,CG_CLP1,"CLP1",2311,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Clp2,CG_CLP2,"CLP2",2312,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Clp3,CG_CLP3,"CLP3",2313,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Clp4,CG_CLP4,"CLP4",2314,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Clp5,CG_CLP5,"CLP5",2315,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(WPos,CG_WPOS,"WPOS",2373,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(PointCoord,CG_POINTCOORD,"POINTCOORD",2374,0,CG_VARYING_PARAM)
|
||||
|
||||
CG_BINDLOCATION_MACRO(Position0,CG_POSITION0,"POSITION0",2437,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Position1,CG_POSITION1,"POSITION1",2438,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Position2,CG_POSITION2,"POSITION2",2439,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Position3,CG_POSITION3,"POSITION3",2440,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Position4,CG_POSITION4,"POSITION4",2441,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Position5,CG_POSITION5,"POSITION5",2442,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Position6,CG_POSITION6,"POSITION6",2443,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Position7,CG_POSITION7,"POSITION7",2444,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Position8,CG_POSITION8,"POSITION8",2445,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Position9,CG_POSITION9,"POSITION9",2446,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Position10,CG_POSITION10,"POSITION10",2447,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Position11,CG_POSITION11,"POSITION11",2448,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Position12,CG_POSITION12,"POSITION12",2449,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Position13,CG_POSITION13,"POSITION13",2450,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Position14,CG_POSITION14,"POSITION14",2451,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Position15,CG_POSITION15,"POSITION15",2452,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Diffuse0,CG_DIFFUSE0,"DIFFUSE0",2501,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Tangent0,CG_TANGENT0,"TANGENT0",2565,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Tangent1,CG_TANGENT1,"TANGENT1",2566,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Tangent2,CG_TANGENT2,"TANGENT2",2567,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Tangent3,CG_TANGENT3,"TANGENT3",2568,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Tangent4,CG_TANGENT4,"TANGENT4",2569,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Tangent5,CG_TANGENT5,"TANGENT5",2570,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Tangent6,CG_TANGENT6,"TANGENT6",2571,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Tangent7,CG_TANGENT7,"TANGENT7",2572,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Tangent8,CG_TANGENT8,"TANGENT8",2573,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Tangent9,CG_TANGENT9,"TANGENT9",2574,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Tangent10,CG_TANGENT10,"TANGENT10",2575,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Tangent11,CG_TANGENT11,"TANGENT11",2576,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Tangent12,CG_TANGENT12,"TANGENT12",2577,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Tangent13,CG_TANGENT13,"TANGENT13",2578,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Tangent14,CG_TANGENT14,"TANGENT14",2579,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Tangent15,CG_TANGENT15,"TANGENT15",2580,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Specular0,CG_SPECULAR0,"SPECULAR0",2629,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendIndices0,CG_BLENDINDICES0,"BLENDINDICES0",2693,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendIndices1,CG_BLENDINDICES1,"BLENDINDICES1",2694,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendIndices2,CG_BLENDINDICES2,"BLENDINDICES2",2695,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendIndices3,CG_BLENDINDICES3,"BLENDINDICES3",2696,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendIndices4,CG_BLENDINDICES4,"BLENDINDICES4",2697,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendIndices5,CG_BLENDINDICES5,"BLENDINDICES5",2698,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendIndices6,CG_BLENDINDICES6,"BLENDINDICES6",2699,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendIndices7,CG_BLENDINDICES7,"BLENDINDICES7",2700,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendIndices8,CG_BLENDINDICES8,"BLENDINDICES8",2701,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendIndices9,CG_BLENDINDICES9,"BLENDINDICES9",2702,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendIndices10,CG_BLENDINDICES10,"BLENDINDICES10",2703,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendIndices11,CG_BLENDINDICES11,"BLENDINDICES11",2704,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendIndices12,CG_BLENDINDICES12,"BLENDINDICES12",2705,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendIndices13,CG_BLENDINDICES13,"BLENDINDICES13",2706,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendIndices14,CG_BLENDINDICES14,"BLENDINDICES14",2707,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendIndices15,CG_BLENDINDICES15,"BLENDINDICES15",2708,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Color0,CG_COLOR0,"COLOR0",2757,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Color1,CG_COLOR1,"COLOR1",2758,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Color2,CG_COLOR2,"COLOR2",2759,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Color3,CG_COLOR3,"COLOR3",2760,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Color4,CG_COLOR4,"COLOR4",2761,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Color5,CG_COLOR5,"COLOR5",2762,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Color6,CG_COLOR6,"COLOR6",2763,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Color7,CG_COLOR7,"COLOR7",2764,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Color8,CG_COLOR8,"COLOR8",2765,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Color9,CG_COLOR9,"COLOR9",2766,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Color10,CG_COLOR10,"COLOR10",2767,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Color11,CG_COLOR11,"COLOR11",2768,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Color12,CG_COLOR12,"COLOR12",2769,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Color13,CG_COLOR13,"COLOR13",2770,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Color14,CG_COLOR14,"COLOR14",2771,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Color15,CG_COLOR15,"COLOR15",2772,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(PSize0,CG_PSIZE0,"PSIZE0",2821,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(PSize1,CG_PSIZE1,"PSIZE1",2822,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(PSize2,CG_PSIZE2,"PSIZE2",2823,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(PSize3,CG_PSIZE3,"PSIZE3",2824,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(PSize4,CG_PSIZE4,"PSIZE4",2825,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(PSize5,CG_PSIZE5,"PSIZE5",2826,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(PSize6,CG_PSIZE6,"PSIZE6",2827,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(PSize7,CG_PSIZE7,"PSIZE7",2828,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(PSize8,CG_PSIZE8,"PSIZE8",2829,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(PSize9,CG_PSIZE9,"PSIZE9",2830,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(PSize10,CG_PSIZE10,"PSIZE10",2831,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(PSize11,CG_PSIZE11,"PSIZE11",2832,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(PSize12,CG_PSIZE12,"PSIZE12",2833,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(PSize13,CG_PSIZE13,"PSIZE13",2834,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(PSize14,CG_PSIZE14,"PSIZE14",2835,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(PSize15,CG_PSIZE15,"PSIZE15",2836,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BiNormal0,CG_BINORMAL0,"BINORMAL0",2885,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BiNormal1,CG_BINORMAL1,"BINORMAL1",2886,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BiNormal2,CG_BINORMAL2,"BINORMAL2",2887,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BiNormal3,CG_BINORMAL3,"BINORMAL3",2888,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BiNormal4,CG_BINORMAL4,"BINORMAL4",2889,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BiNormal5,CG_BINORMAL5,"BINORMAL5",2890,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BiNormal6,CG_BINORMAL6,"BINORMAL6",2891,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BiNormal7,CG_BINORMAL7,"BINORMAL7",2892,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BiNormal8,CG_BINORMAL8,"BINORMAL8",2893,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BiNormal9,CG_BINORMAL9,"BINORMAL9",2894,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BiNormal10,CG_BINORMAL10,"BINORMAL10",2895,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BiNormal11,CG_BINORMAL11,"BINORMAL11",2896,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BiNormal12,CG_BINORMAL12,"BINORMAL12",2897,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BiNormal13,CG_BINORMAL13,"BINORMAL13",2898,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BiNormal14,CG_BINORMAL14,"BINORMAL14",2899,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BiNormal15,CG_BINORMAL15,"BINORMAL15",2900,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(FOG0,CG_FOG0,"FOG0",2917,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(FOG1,CG_FOG1,"FOG1",2918,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(FOG2,CG_FOG2,"FOG2",2919,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(FOG3,CG_FOG3,"FOG3",2920,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(FOG4,CG_FOG4,"FOG4",2921,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(FOG5,CG_FOG5,"FOG5",2922,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(FOG6,CG_FOG6,"FOG6",2923,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(FOG7,CG_FOG7,"FOG7",2924,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(FOG8,CG_FOG8,"FOG8",2925,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(FOG9,CG_FOG9,"FOG9",2926,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(FOG10,CG_FOG10,"FOG10",2927,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(FOG11,CG_FOG11,"FOG11",2928,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(FOG12,CG_FOG12,"FOG12",2929,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(FOG13,CG_FOG13,"FOG13",2930,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(FOG14,CG_FOG14,"FOG14",2931,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(FOG15,CG_FOG15,"FOG15",2932,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(DEPTH0,CG_DEPTH0,"DEPTH0",2933,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(DEPTH1,CG_DEPTH1,"DEPTH1",2934,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(DEPTH2,CG_DEPTH2,"DEPTH2",2935,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(DEPTH3,CG_DEPTH3,"DEPTH3",2936,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(DEPTH4,CG_DEPTH4,"DEPTH4",2937,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(DEPTH5,CG_DEPTH5,"DEPTH5",2938,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(DEPTH6,CG_DEPTH6,"DEPTH6",2939,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(DEPTH7,CG_DEPTH7,"DEPTH7",2940,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(DEPTH8,CG_DEPTH8,"DEPTH8",2941,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(DEPTH9,CG_DEPTH9,"DEPTH9",2942,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(DEPTH10,CG_DEPTH10,"DEPTH10",2943,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(DEPTH11,CG_DEPTH11,"DEPTH11",2944,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(DEPTH12,CG_DEPTH12,"DEPTH12",2945,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(DEPTH13,CG_DEPTH13,"DEPTH13",2946,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(DEPTH14,CG_DEPTH14,"DEPTH14",2947,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(DEPTH15,CG_DEPTH15,"DEPTH15",2948,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(SAMPLE0,CG_SAMPLE0,"SAMPLE0",2949,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(SAMPLE1,CG_SAMPLE1,"SAMPLE1",2950,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(SAMPLE2,CG_SAMPLE2,"SAMPLE2",2951,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(SAMPLE3,CG_SAMPLE3,"SAMPLE3",2952,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(SAMPLE4,CG_SAMPLE4,"SAMPLE4",2953,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(SAMPLE5,CG_SAMPLE5,"SAMPLE5",2954,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(SAMPLE6,CG_SAMPLE6,"SAMPLE6",2955,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(SAMPLE7,CG_SAMPLE7,"SAMPLE7",2956,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(SAMPLE8,CG_SAMPLE8,"SAMPLE8",2957,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(SAMPLE9,CG_SAMPLE9,"SAMPLE9",2958,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(SAMPLE10,CG_SAMPLE10,"SAMPLE10",2959,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(SAMPLE11,CG_SAMPLE11,"SAMPLE11",2960,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(SAMPLE12,CG_SAMPLE12,"SAMPLE12",2961,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(SAMPLE13,CG_SAMPLE13,"SAMPLE13",2962,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(SAMPLE14,CG_SAMPLE14,"SAMPLE14",2963,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(SAMPLE15,CG_SAMPLE15,"SAMPLE15",2964,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendWeight0,CG_BLENDWEIGHT0,"BLENDWEIGHT0",3028,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendWeight1,CG_BLENDWEIGHT1,"BLENDWEIGHT1",3029,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendWeight2,CG_BLENDWEIGHT2,"BLENDWEIGHT2",3030,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendWeight3,CG_BLENDWEIGHT3,"BLENDWEIGHT3",3031,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendWeight4,CG_BLENDWEIGHT4,"BLENDWEIGHT4",3032,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendWeight5,CG_BLENDWEIGHT5,"BLENDWEIGHT5",3033,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendWeight6,CG_BLENDWEIGHT6,"BLENDWEIGHT6",3034,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendWeight7,CG_BLENDWEIGHT7,"BLENDWEIGHT7",3035,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendWeight8,CG_BLENDWEIGHT8,"BLENDWEIGHT8",3036,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendWeight9,CG_BLENDWEIGHT9,"BLENDWEIGHT9",3037,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendWeight10,CG_BLENDWEIGHT10,"BLENDWEIGHT10",3038,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendWeight11,CG_BLENDWEIGHT11,"BLENDWEIGHT11",3039,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendWeight12,CG_BLENDWEIGHT12,"BLENDWEIGHT12",3040,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendWeight13,CG_BLENDWEIGHT13,"BLENDWEIGHT13",3041,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendWeight14,CG_BLENDWEIGHT14,"BLENDWEIGHT14",3042,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(BlendWeight15,CG_BLENDWEIGHT15,"BLENDWEIGHT15",3043,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Normal0,CG_NORMAL0,"NORMAL0",3092,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Normal1,CG_NORMAL1,"NORMAL1",3093,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Normal2,CG_NORMAL2,"NORMAL2",3094,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Normal3,CG_NORMAL3,"NORMAL3",3095,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Normal4,CG_NORMAL4,"NORMAL4",3096,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Normal5,CG_NORMAL5,"NORMAL5",3097,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Normal6,CG_NORMAL6,"NORMAL6",3098,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Normal7,CG_NORMAL7,"NORMAL7",3099,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Normal8,CG_NORMAL8,"NORMAL8",3100,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Normal9,CG_NORMAL9,"NORMAL9",3101,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Normal10,CG_NORMAL10,"NORMAL10",3102,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Normal11,CG_NORMAL11,"NORMAL11",3103,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Normal12,CG_NORMAL12,"NORMAL12",3104,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Normal13,CG_NORMAL13,"NORMAL13",3105,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Normal14,CG_NORMAL14,"NORMAL14",3106,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Normal15,CG_NORMAL15,"NORMAL15",3107,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(FogCoord,CG_FOGCOORD,"FOGCOORD",3156,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexCoord0,CG_TEXCOORD0,"TEXCOORD0",3220,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexCoord1,CG_TEXCOORD1,"TEXCOORD1",3221,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexCoord2,CG_TEXCOORD2,"TEXCOORD2",3222,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexCoord3,CG_TEXCOORD3,"TEXCOORD3",3223,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexCoord4,CG_TEXCOORD4,"TEXCOORD4",3224,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexCoord5,CG_TEXCOORD5,"TEXCOORD5",3225,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexCoord6,CG_TEXCOORD6,"TEXCOORD6",3226,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexCoord7,CG_TEXCOORD7,"TEXCOORD7",3227,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexCoord8,CG_TEXCOORD8,"TEXCOORD8",3228,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexCoord9,CG_TEXCOORD9,"TEXCOORD9",3229,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexCoord10,CG_TEXCOORD10,"TEXCOORD10",3230,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexCoord11,CG_TEXCOORD11,"TEXCOORD11",3231,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexCoord12,CG_TEXCOORD12,"TEXCOORD12",3232,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexCoord13,CG_TEXCOORD13,"TEXCOORD13",3233,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexCoord14,CG_TEXCOORD14,"TEXCOORD14",3234,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(TexCoord15,CG_TEXCOORD15,"TEXCOORD15",3235,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(CombinerConst0,CG_COMBINER_CONST0,"COMBINER_CONST0",3284,0,CGI_UNIFORM_PARAM)
|
||||
CG_BINDLOCATION_MACRO(CombinerConst1,CG_COMBINER_CONST1,"COMBINER_CONST1",3285,0,CGI_UNIFORM_PARAM)
|
||||
CG_BINDLOCATION_MACRO(CombinerStageConst0,CG_COMBINER_STAGE_CONST0,"COMBINER_STAGE_CONST0",3286,1,CGI_UNIFORM_PARAM)
|
||||
CG_BINDLOCATION_MACRO(CombinerStageConst1,CG_COMBINER_STAGE_CONST1,"COMBINER_STAGE_CONST1",3287,1,CGI_UNIFORM_PARAM)
|
||||
CG_BINDLOCATION_MACRO(OffsetTextureMatrix,CG_OFFSET_TEXTURE_MATRIX,"OFFSET_TEXTURE_MATRIX",3288,0,CGI_UNIFORM_PARAM)
|
||||
CG_BINDLOCATION_MACRO(OffsetTextureScale,CG_OFFSET_TEXTURE_SCALE,"OFFSET_TEXTURE_SCALE",3289,0,CGI_UNIFORM_PARAM)
|
||||
CG_BINDLOCATION_MACRO(OffsetTextureBias,CG_OFFSET_TEXTURE_BIAS,"OFFSET_TEXTURE_BIAS",3290,0,CGI_UNIFORM_PARAM)
|
||||
CG_BINDLOCATION_MACRO(ConstEye,CG_CONST_EYE,"CONST_EYE",3291,0,CGI_UNIFORM_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Coverage, CG_COVERAGE, "COVERAGE", 3292, 0, CG_VARYING_PARAM)
|
||||
|
||||
CG_BINDLOCATION_MACRO(TessFactor,CG_TESSFACTOR,"TESSFACTOR",3255,0,CG_VARYING_PARAM)
|
||||
|
||||
CG_BINDLOCATION_MACRO(GLSLUniform,CG_GLSL_UNIFORM,"glsl_uniform",3300,1,CGI_UNIFORM_PARAM)
|
||||
CG_BINDLOCATION_MACRO(GLSLAttrib,CG_GLSL_ATTRIB,"glsl_attrib",3301,1,CG_VARYING_PARAM)
|
||||
|
||||
CG_BINDLOCATION_MACRO(Env,CG_ENV,"ENV",3302,1,CG_VARYING_PARAM)
|
||||
|
||||
CG_BINDLOCATION_MACRO(HLSLUniform,CG_HLSL_UNIFORM,"hlsl_uniform",3559,1,CGI_UNIFORM_PARAM)
|
||||
CG_BINDLOCATION_MACRO(HLSLAttrib,CG_HLSL_VARYING,"hlsl_attrib",3560,1,CG_VARYING_PARAM)
|
||||
|
||||
CG_BINDLOCATION_MACRO(SamplerResource,CG_SAMPLER_RES, "SAMPLER_RES", 3561, 1, CGI_UNIFORM_PARAM)
|
||||
|
||||
CG_BINDLOCATION_MACRO(LastColor0, CG_LASTCOL0, "LASTCOL0", 4400, 0, CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(LastColor1, CG_LASTCOL1, "LASTCOL1", 4401, 0, CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(LastColor2, CG_LASTCOL2, "LASTCOL2", 4402, 0, CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(LastColor3, CG_LASTCOL3, "LASTCOL3", 4403, 0, CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(LastColor4, CG_LASTCOL4, "LASTCOL4", 4404, 0, CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(LastColor5, CG_LASTCOL5, "LASTCOL5", 4405, 0, CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(LastColor6, CG_LASTCOL6, "LASTCOL6", 4406, 0, CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(LastColor7, CG_LASTCOL7, "LASTCOL7", 4407, 0, CG_VARYING_PARAM)
|
||||
|
||||
CG_BINDLOCATION_MACRO(Face,CG_FACE,"FACE",4410,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(PrimitiveId,CG_PRIMITIVEID,"PRIMITIVEID",4411,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(InstanceId,CG_INSTANCEID,"INSTANCEID",4412,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(SampleId,CG_SAMPLEID,"SAMPLEID",4413,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(VertexId,CG_VERTEXID,"VERTEXID",4414,0,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(Layer,CG_LAYER,"LAYER",4415,1,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(SampleMask,CG_SAMPLEMASK,"SAMPLEMASK",4416,0,CG_VARYING_PARAM)
|
||||
|
||||
#undef CG_BINDLOCATION_MACRO
|
196
Engine/ExtIncludes/ShaderUtil/Cg/cg_datatypes.h
Normal file
|
@ -0,0 +1,196 @@
|
|||
/*
|
||||
*
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* The following macro invocations define the supported CG basic data types.
|
||||
*
|
||||
* The macros have the form :
|
||||
*
|
||||
* CG_DATATYPE_MACRO(name, compiler_name, enum_name, base_name, nrows, ncols, pc_name)
|
||||
*
|
||||
* name : The name of the data type.
|
||||
* compiler_name : The name of the data type within the compiler syntax.
|
||||
* enum_name : The C enumerant.
|
||||
* base_name : The C enumerant of the base type.
|
||||
* nrows : Number of rows for matrix types. Should be 0 other-wise.
|
||||
* ncols : Number of columns for scalar, vector, and matrix types.
|
||||
* pc_name : The C enumerant of the parameter class.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* ADD NEW DATA TYPES TO THE END OF THIS MACRO LIST!
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
CG_DATATYPE_MACRO(Half,half,CG_HALF,CG_HALF,0,1,CG_PARAMETERCLASS_SCALAR)
|
||||
CG_DATATYPE_MACRO(Half2,half2,CG_HALF2,CG_HALF,0,2,CG_PARAMETERCLASS_VECTOR)
|
||||
CG_DATATYPE_MACRO(Half3,half3,CG_HALF3,CG_HALF,0,3,CG_PARAMETERCLASS_VECTOR)
|
||||
CG_DATATYPE_MACRO(Half4,half4,CG_HALF4,CG_HALF,0,4,CG_PARAMETERCLASS_VECTOR)
|
||||
CG_DATATYPE_MACRO(Half1x1,half1x1,CG_HALF1x1,CG_HALF,1,1,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Half1x2,half1x2,CG_HALF1x2,CG_HALF,1,2,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Half1x3,half1x3,CG_HALF1x3,CG_HALF,1,3,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Half1x4,half1x4,CG_HALF1x4,CG_HALF,1,4,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Half2x1,half2x1,CG_HALF2x1,CG_HALF,2,1,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Half2x2,half2x2,CG_HALF2x2,CG_HALF,2,2,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Half2x3,half2x3,CG_HALF2x3,CG_HALF,2,3,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Half2x4,half2x4,CG_HALF2x4,CG_HALF,2,4,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Half3x1,half3x1,CG_HALF3x1,CG_HALF,3,1,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Half3x2,half3x2,CG_HALF3x2,CG_HALF,3,2,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Half3x3,half3x3,CG_HALF3x3,CG_HALF,3,3,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Half3x4,half3x4,CG_HALF3x4,CG_HALF,3,4,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Half4x1,half4x1,CG_HALF4x1,CG_HALF,4,1,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Half4x2,half4x2,CG_HALF4x2,CG_HALF,4,2,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Half4x3,half4x3,CG_HALF4x3,CG_HALF,4,3,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Half4x4,half4x4,CG_HALF4x4,CG_HALF,4,4,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Float,float,CG_FLOAT,CG_FLOAT,0,1,CG_PARAMETERCLASS_SCALAR)
|
||||
CG_DATATYPE_MACRO(Float2,float2,CG_FLOAT2,CG_FLOAT,0,2,CG_PARAMETERCLASS_VECTOR)
|
||||
CG_DATATYPE_MACRO(Float3,float3,CG_FLOAT3,CG_FLOAT,0,3,CG_PARAMETERCLASS_VECTOR)
|
||||
CG_DATATYPE_MACRO(Float4,float4,CG_FLOAT4,CG_FLOAT,0,4,CG_PARAMETERCLASS_VECTOR)
|
||||
CG_DATATYPE_MACRO(Float1x1,float1x1,CG_FLOAT1x1,CG_FLOAT,1,1,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Float1x2,float1x2,CG_FLOAT1x2,CG_FLOAT,1,2,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Float1x3,float1x3,CG_FLOAT1x3,CG_FLOAT,1,3,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Float1x4,float1x4,CG_FLOAT1x4,CG_FLOAT,1,4,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Float2x1,float2x1,CG_FLOAT2x1,CG_FLOAT,2,1,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Float2x2,float2x2,CG_FLOAT2x2,CG_FLOAT,2,2,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Float2x3,float2x3,CG_FLOAT2x3,CG_FLOAT,2,3,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Float2x4,float2x4,CG_FLOAT2x4,CG_FLOAT,2,4,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Float3x1,float3x1,CG_FLOAT3x1,CG_FLOAT,3,1,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Float3x2,float3x2,CG_FLOAT3x2,CG_FLOAT,3,2,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Float3x3,float3x3,CG_FLOAT3x3,CG_FLOAT,3,3,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Float3x4,float3x4,CG_FLOAT3x4,CG_FLOAT,3,4,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Float4x1,float4x1,CG_FLOAT4x1,CG_FLOAT,4,1,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Float4x2,float4x2,CG_FLOAT4x2,CG_FLOAT,4,2,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Float4x3,float4x3,CG_FLOAT4x3,CG_FLOAT,4,3,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Float4x4,float4x4,CG_FLOAT4x4,CG_FLOAT,4,4,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Sampler1D,sampler1D,CG_SAMPLER1D,CG_SAMPLER1D,0,0,CG_PARAMETERCLASS_SAMPLER)
|
||||
CG_DATATYPE_MACRO(Sampler2D,sampler2D,CG_SAMPLER2D,CG_SAMPLER2D,0,0,CG_PARAMETERCLASS_SAMPLER)
|
||||
CG_DATATYPE_MACRO(Sampler3D,sampler3D,CG_SAMPLER3D,CG_SAMPLER3D,0,0,CG_PARAMETERCLASS_SAMPLER)
|
||||
CG_DATATYPE_MACRO(SamplerRECT,samplerRECT,CG_SAMPLERRECT,CG_SAMPLERRECT,0,0,CG_PARAMETERCLASS_SAMPLER)
|
||||
CG_DATATYPE_MACRO(SamplerCUBE,samplerCUBE,CG_SAMPLERCUBE,CG_SAMPLERCUBE,0,0,CG_PARAMETERCLASS_SAMPLER)
|
||||
CG_DATATYPE_MACRO(Fixed,fixed,CG_FIXED,CG_FIXED,0,1,CG_PARAMETERCLASS_SCALAR)
|
||||
CG_DATATYPE_MACRO(Fixed2,fixed2,CG_FIXED2,CG_FIXED,0,2,CG_PARAMETERCLASS_VECTOR)
|
||||
CG_DATATYPE_MACRO(Fixed3,fixed3,CG_FIXED3,CG_FIXED,0,3,CG_PARAMETERCLASS_VECTOR)
|
||||
CG_DATATYPE_MACRO(Fixed4,fixed4,CG_FIXED4,CG_FIXED,0,4,CG_PARAMETERCLASS_VECTOR)
|
||||
CG_DATATYPE_MACRO(Fixed1x1,fixed1x1,CG_FIXED1x1,CG_FIXED,1,1,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Fixed1x2,fixed1x2,CG_FIXED1x2,CG_FIXED,1,2,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Fixed1x3,fixed1x3,CG_FIXED1x3,CG_FIXED,1,3,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Fixed1x4,fixed1x4,CG_FIXED1x4,CG_FIXED,1,4,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Fixed2x1,fixed2x1,CG_FIXED2x1,CG_FIXED,2,1,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Fixed2x2,fixed2x2,CG_FIXED2x2,CG_FIXED,2,2,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Fixed2x3,fixed2x3,CG_FIXED2x3,CG_FIXED,2,3,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Fixed2x4,fixed2x4,CG_FIXED2x4,CG_FIXED,2,4,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Fixed3x1,fixed3x1,CG_FIXED3x1,CG_FIXED,3,1,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Fixed3x2,fixed3x2,CG_FIXED3x2,CG_FIXED,3,2,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Fixed3x3,fixed3x3,CG_FIXED3x3,CG_FIXED,3,3,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Fixed3x4,fixed3x4,CG_FIXED3x4,CG_FIXED,3,4,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Fixed4x1,fixed4x1,CG_FIXED4x1,CG_FIXED,4,1,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Fixed4x2,fixed4x2,CG_FIXED4x2,CG_FIXED,4,2,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Fixed4x3,fixed4x3,CG_FIXED4x3,CG_FIXED,4,3,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Fixed4x4,fixed4x4,CG_FIXED4x4,CG_FIXED,4,4,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Half1,half1,CG_HALF1,CG_HALF,0,1,CG_PARAMETERCLASS_VECTOR)
|
||||
CG_DATATYPE_MACRO(Float1,float1,CG_FLOAT1,CG_FLOAT,0,1,CG_PARAMETERCLASS_VECTOR)
|
||||
CG_DATATYPE_MACRO(Fixed1,fixed1,CG_FIXED1,CG_FIXED,0,1,CG_PARAMETERCLASS_VECTOR)
|
||||
CG_DATATYPE_MACRO(Int,int,CG_INT,CG_INT,0,1,CG_PARAMETERCLASS_SCALAR)
|
||||
CG_DATATYPE_MACRO(Int1,int1,CG_INT1,CG_INT,0,1,CG_PARAMETERCLASS_VECTOR)
|
||||
CG_DATATYPE_MACRO(Int2,int2,CG_INT2,CG_INT,0,2,CG_PARAMETERCLASS_VECTOR)
|
||||
CG_DATATYPE_MACRO(Int3,int3,CG_INT3,CG_INT,0,3,CG_PARAMETERCLASS_VECTOR)
|
||||
CG_DATATYPE_MACRO(Int4,int4,CG_INT4,CG_INT,0,4,CG_PARAMETERCLASS_VECTOR)
|
||||
CG_DATATYPE_MACRO(Int1x1,int1x1,CG_INT1x1,CG_INT,1,1,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Int1x2,int1x2,CG_INT1x2,CG_INT,1,2,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Int1x3,int1x3,CG_INT1x3,CG_INT,1,3,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Int1x4,int1x4,CG_INT1x4,CG_INT,1,4,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Int2x1,int2x1,CG_INT2x1,CG_INT,2,1,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Int2x2,int2x2,CG_INT2x2,CG_INT,2,2,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Int2x3,int2x3,CG_INT2x3,CG_INT,2,3,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Int2x4,int2x4,CG_INT2x4,CG_INT,2,4,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Int3x1,int3x1,CG_INT3x1,CG_INT,3,1,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Int3x2,int3x2,CG_INT3x2,CG_INT,3,2,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Int3x3,int3x3,CG_INT3x3,CG_INT,3,3,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Int3x4,int3x4,CG_INT3x4,CG_INT,3,4,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Int4x1,int4x1,CG_INT4x1,CG_INT,4,1,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Int4x2,int4x2,CG_INT4x2,CG_INT,4,2,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Int4x3,int4x3,CG_INT4x3,CG_INT,4,3,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Int4x4,int4x4,CG_INT4x4,CG_INT,4,4,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Bool,bool,CG_BOOL,CG_BOOL,0,1,CG_PARAMETERCLASS_SCALAR)
|
||||
CG_DATATYPE_MACRO(Bool1,bool1,CG_BOOL1,CG_BOOL,0,1,CG_PARAMETERCLASS_VECTOR)
|
||||
CG_DATATYPE_MACRO(Bool2,bool2,CG_BOOL2,CG_BOOL,0,2,CG_PARAMETERCLASS_VECTOR)
|
||||
CG_DATATYPE_MACRO(Bool3,bool3,CG_BOOL3,CG_BOOL,0,3,CG_PARAMETERCLASS_VECTOR)
|
||||
CG_DATATYPE_MACRO(Bool4,bool4,CG_BOOL4,CG_BOOL,0,4,CG_PARAMETERCLASS_VECTOR)
|
||||
CG_DATATYPE_MACRO(Bool1x1,bool1x1,CG_BOOL1x1,CG_BOOL,1,1,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Bool1x2,bool1x2,CG_BOOL1x2,CG_BOOL,1,2,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Bool1x3,bool1x3,CG_BOOL1x3,CG_BOOL,1,3,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Bool1x4,bool1x4,CG_BOOL1x4,CG_BOOL,1,4,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Bool2x1,bool2x1,CG_BOOL2x1,CG_BOOL,2,1,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Bool2x2,bool2x2,CG_BOOL2x2,CG_BOOL,2,2,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Bool2x3,bool2x3,CG_BOOL2x3,CG_BOOL,2,3,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Bool2x4,bool2x4,CG_BOOL2x4,CG_BOOL,2,4,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Bool3x1,bool3x1,CG_BOOL3x1,CG_BOOL,3,1,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Bool3x2,bool3x2,CG_BOOL3x2,CG_BOOL,3,2,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Bool3x3,bool3x3,CG_BOOL3x3,CG_BOOL,3,3,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Bool3x4,bool3x4,CG_BOOL3x4,CG_BOOL,3,4,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Bool4x1,bool4x1,CG_BOOL4x1,CG_BOOL,4,1,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Bool4x2,bool4x2,CG_BOOL4x2,CG_BOOL,4,2,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Bool4x3,bool4x3,CG_BOOL4x3,CG_BOOL,4,3,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(Bool4x4,bool4x4,CG_BOOL4x4,CG_BOOL,4,4,CG_PARAMETERCLASS_MATRIX)
|
||||
CG_DATATYPE_MACRO(String,string,CG_STRING,CG_STRING,0,1,CG_PARAMETERCLASS_OBJECT)
|
||||
CG_DATATYPE_MACRO(Program,program,CG_PROGRAM_TYPE,CG_PROGRAM_TYPE,0,0,CG_PARAMETERCLASS_OBJECT)
|
||||
CG_DATATYPE_MACRO(Texture,texture,CG_TEXTURE,CG_TEXTURE,0,0,CG_PARAMETERCLASS_OBJECT)
|
||||
CG_DATATYPE_MACRO(Sampler1DARRAY,sampler1DARRAY,CG_SAMPLER1DARRAY,CG_SAMPLER1DARRAY,0,0,CG_PARAMETERCLASS_SAMPLER)
|
||||
CG_DATATYPE_MACRO(Sampler2DARRAY,sampler2DARRAY,CG_SAMPLER2DARRAY,CG_SAMPLER2DARRAY,0,0,CG_PARAMETERCLASS_SAMPLER)
|
||||
CG_DATATYPE_MACRO(SamplerCUBEARRAY,samplerCUBEARRAY,CG_SAMPLERCUBEARRAY,CG_SAMPLERCUBEARRAY,0,0,CG_PARAMETERCLASS_SAMPLER)
|
||||
CG_DATATYPE_MACRO(VertexShader, vertexshader, CG_VERTEXSHADER_TYPE, CG_VERTEXSHADER_TYPE, 0, 0, CG_PARAMETERCLASS_OBJECT)
|
||||
CG_DATATYPE_MACRO(PixelShader, pixelshader, CG_PIXELSHADER_TYPE, CG_PIXELSHADER_TYPE, 0, 0, CG_PARAMETERCLASS_OBJECT)
|
||||
CG_DATATYPE_MACRO(Sampler, sampler, CG_SAMPLER, CG_SAMPLER, 0, 0, CG_PARAMETERCLASS_SAMPLER)
|
||||
CG_DATATYPE_MACRO(SamplerBUF,samplerBUF,CG_SAMPLERBUF,CG_SAMPLERBUF,0,0,CG_PARAMETERCLASS_SAMPLER)
|
||||
#undef CG_DATATYPE_MACRO
|
128
Engine/ExtIncludes/ShaderUtil/Cg/cg_enums.h
Normal file
|
@ -0,0 +1,128 @@
|
|||
|
||||
/*
|
||||
*
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* The following macro invocations define the supported CG basic data types.
|
||||
*
|
||||
* The macros have the form :
|
||||
*
|
||||
* CG_ENUM_MACRO(enum_name, enum_val)
|
||||
*
|
||||
* enum_name : The C enumerant name.
|
||||
* enum_val : The enumerant value.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
CG_ENUM_MACRO(CG_UNKNOWN, 4096)
|
||||
CG_ENUM_MACRO(CG_IN, 4097)
|
||||
CG_ENUM_MACRO(CG_OUT, 4098)
|
||||
CG_ENUM_MACRO(CG_INOUT, 4099)
|
||||
CG_ENUM_MACRO(CG_MIXED, 4100)
|
||||
CG_ENUM_MACRO(CG_VARYING, 4101)
|
||||
CG_ENUM_MACRO(CG_UNIFORM, 4102)
|
||||
CG_ENUM_MACRO(CG_CONSTANT, 4103)
|
||||
CG_ENUM_MACRO(CG_PROGRAM_SOURCE, 4104)
|
||||
CG_ENUM_MACRO(CG_PROGRAM_ENTRY, 4105)
|
||||
CG_ENUM_MACRO(CG_COMPILED_PROGRAM, 4106)
|
||||
CG_ENUM_MACRO(CG_PROGRAM_PROFILE, 4107)
|
||||
CG_ENUM_MACRO(CG_GLOBAL, 4108)
|
||||
CG_ENUM_MACRO(CG_PROGRAM, 4109)
|
||||
CG_ENUM_MACRO(CG_DEFAULT, 4110)
|
||||
CG_ENUM_MACRO(CG_ERROR, 4111)
|
||||
CG_ENUM_MACRO(CG_SOURCE, 4112)
|
||||
CG_ENUM_MACRO(CG_OBJECT, 4113)
|
||||
CG_ENUM_MACRO(CG_COMPILE_MANUAL, 4114)
|
||||
CG_ENUM_MACRO(CG_COMPILE_IMMEDIATE, 4115)
|
||||
CG_ENUM_MACRO(CG_COMPILE_LAZY, 4116)
|
||||
CG_ENUM_MACRO(CG_CURRENT, 4117)
|
||||
CG_ENUM_MACRO(CG_LITERAL, 4118)
|
||||
CG_ENUM_MACRO(CG_VERSION, 4119)
|
||||
CG_ENUM_MACRO(CG_ROW_MAJOR, 4120)
|
||||
CG_ENUM_MACRO(CG_COLUMN_MAJOR, 4121)
|
||||
CG_ENUM_MACRO(CG_FRAGMENT, 4122)
|
||||
CG_ENUM_MACRO(CG_VERTEX, 4123)
|
||||
CG_ENUM_MACRO(CG_POINT, 4124)
|
||||
CG_ENUM_MACRO(CG_LINE, 4125)
|
||||
CG_ENUM_MACRO(CG_LINE_ADJ, 4126)
|
||||
CG_ENUM_MACRO(CG_TRIANGLE, 4127)
|
||||
CG_ENUM_MACRO(CG_TRIANGLE_ADJ, 4128)
|
||||
CG_ENUM_MACRO(CG_POINT_OUT, 4129)
|
||||
CG_ENUM_MACRO(CG_LINE_OUT, 4130)
|
||||
CG_ENUM_MACRO(CG_TRIANGLE_OUT, 4131)
|
||||
CG_ENUM_MACRO(CG_IMMEDIATE_PARAMETER_SETTING, 4132)
|
||||
CG_ENUM_MACRO(CG_DEFERRED_PARAMETER_SETTING, 4133)
|
||||
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
|
325
Engine/ExtIncludes/ShaderUtil/Cg/cg_errors.h
Normal file
|
@ -0,0 +1,325 @@
|
|||
/*
|
||||
*
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* The following macro invocations define error codes returned by various cg
|
||||
* API functions.
|
||||
*
|
||||
* The macros have the form :
|
||||
*
|
||||
* 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.
|
||||
* message : A description string associated with the error.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
CG_ERROR_MACRO(0,
|
||||
CG_NO_ERROR,
|
||||
"No error has occurred.")
|
||||
|
||||
CG_ERROR_MACRO(1,
|
||||
CG_COMPILER_ERROR,
|
||||
"The compile returned an error.")
|
||||
|
||||
CG_ERROR_MACRO(2,
|
||||
CG_INVALID_PARAMETER_ERROR,
|
||||
"The parameter used is invalid.")
|
||||
|
||||
CG_ERROR_MACRO(3,
|
||||
CG_INVALID_PROFILE_ERROR,
|
||||
"The profile is not supported.")
|
||||
|
||||
CG_ERROR_MACRO(4,
|
||||
CG_PROGRAM_LOAD_ERROR,
|
||||
"The program could not load.")
|
||||
|
||||
CG_ERROR_MACRO(5,
|
||||
CG_PROGRAM_BIND_ERROR,
|
||||
"The program could not bind.")
|
||||
|
||||
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,
|
||||
"An unsupported GL extension was required to perform this operation.")
|
||||
|
||||
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,
|
||||
"The parameter is not of matrix type.")
|
||||
|
||||
CG_ERROR_MACRO(10,
|
||||
CG_INVALID_ENUMERANT_ERROR,
|
||||
"The enumerant parameter has an invalid value.")
|
||||
|
||||
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,
|
||||
"The file could not be read.")
|
||||
|
||||
CG_ERROR_MACRO(13,
|
||||
CG_FILE_WRITE_ERROR,
|
||||
"The file could not be written.")
|
||||
|
||||
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,
|
||||
"Memory allocation failed.")
|
||||
|
||||
CG_ERROR_MACRO(16,
|
||||
CG_INVALID_CONTEXT_HANDLE_ERROR,
|
||||
"Invalid context handle.")
|
||||
|
||||
CG_ERROR_MACRO(17,
|
||||
CG_INVALID_PROGRAM_HANDLE_ERROR,
|
||||
"Invalid program handle.")
|
||||
|
||||
CG_ERROR_MACRO(18,
|
||||
CG_INVALID_PARAM_HANDLE_ERROR,
|
||||
"Invalid parameter handle.")
|
||||
|
||||
CG_ERROR_MACRO(19,
|
||||
CG_UNKNOWN_PROFILE_ERROR,
|
||||
"The specified profile is unknown.")
|
||||
|
||||
CG_ERROR_MACRO(20,
|
||||
CG_VAR_ARG_ERROR,
|
||||
"The variable arguments were specified incorrectly.")
|
||||
|
||||
CG_ERROR_MACRO(21,
|
||||
CG_INVALID_DIMENSION_ERROR,
|
||||
"The dimension value is invalid.")
|
||||
|
||||
CG_ERROR_MACRO(22,
|
||||
CG_ARRAY_PARAM_ERROR,
|
||||
"The parameter must be an array.")
|
||||
|
||||
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,
|
||||
"A type being added to the context conflicts with an "
|
||||
"existing type.")
|
||||
|
||||
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,
|
||||
"The parameter must be global.")
|
||||
|
||||
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,
|
||||
"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,
|
||||
"The parameter is not a root parameter.")
|
||||
|
||||
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,
|
||||
"The parameter is not a program parameter.")
|
||||
|
||||
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,
|
||||
"The parameter must be a resizable array.")
|
||||
|
||||
CG_ERROR_MACRO(34,
|
||||
CG_INVALID_SIZE_ERROR,
|
||||
"The size value is invalid.")
|
||||
|
||||
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,
|
||||
"Cannot bind the given parameters. Array types do not match.")
|
||||
|
||||
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,
|
||||
"The array has the wrong dimension.")
|
||||
|
||||
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.")
|
||||
|
||||
CG_ERROR_MACRO(40,
|
||||
CG_INVALID_EFFECT_HANDLE_ERROR,
|
||||
"Invalid effect handle.")
|
||||
|
||||
CG_ERROR_MACRO(41,
|
||||
CG_INVALID_STATE_HANDLE_ERROR,
|
||||
"Invalid state handle.")
|
||||
|
||||
CG_ERROR_MACRO(42,
|
||||
CG_INVALID_STATE_ASSIGNMENT_HANDLE_ERROR,
|
||||
"Invalid stateassignment handle.")
|
||||
|
||||
CG_ERROR_MACRO(43,
|
||||
CG_INVALID_PASS_HANDLE_ERROR,
|
||||
"Invalid pass handle.")
|
||||
|
||||
CG_ERROR_MACRO(44,
|
||||
CG_INVALID_ANNOTATION_HANDLE_ERROR,
|
||||
"Invalid annotation handle.")
|
||||
|
||||
CG_ERROR_MACRO(45,
|
||||
CG_INVALID_TECHNIQUE_HANDLE_ERROR,
|
||||
"Invalid technique handle.")
|
||||
|
||||
/* Do not use this! Use CG_INVALID_PARAM_HANDLE_ERROR instead. */
|
||||
|
||||
CG_ERROR_MACRO(46,
|
||||
CG_INVALID_PARAMETER_HANDLE_ERROR,
|
||||
"Invalid parameter handle.")
|
||||
|
||||
CG_ERROR_MACRO(47,
|
||||
CG_STATE_ASSIGNMENT_TYPE_MISMATCH_ERROR,
|
||||
"Operation is not valid for this type of stateassignment.")
|
||||
|
||||
CG_ERROR_MACRO(48,
|
||||
CG_INVALID_FUNCTION_HANDLE_ERROR,
|
||||
"Invalid function handle.")
|
||||
|
||||
CG_ERROR_MACRO(49,
|
||||
CG_INVALID_TECHNIQUE_ERROR,
|
||||
"Technique did not pass validation.")
|
||||
|
||||
CG_ERROR_MACRO(50,
|
||||
CG_INVALID_POINTER_ERROR,
|
||||
"The supplied pointer is NULL.")
|
||||
|
||||
CG_ERROR_MACRO(51,
|
||||
CG_NOT_ENOUGH_DATA_ERROR,
|
||||
"Not enough data was provided.")
|
||||
|
||||
CG_ERROR_MACRO(52,
|
||||
CG_NON_NUMERIC_PARAMETER_ERROR,
|
||||
"The parameter is not of a numeric type.")
|
||||
|
||||
CG_ERROR_MACRO(53,
|
||||
CG_ARRAY_SIZE_MISMATCH_ERROR,
|
||||
"The specified array sizes are not compatible with the given array.")
|
||||
|
||||
CG_ERROR_MACRO(54,
|
||||
CG_CANNOT_SET_NON_UNIFORM_PARAMETER_ERROR,
|
||||
"Cannot set the value of a non-uniform parameter.")
|
||||
|
||||
CG_ERROR_MACRO(55,
|
||||
CG_DUPLICATE_NAME_ERROR,
|
||||
"This name is already in use.")
|
||||
|
||||
CG_ERROR_MACRO(56,
|
||||
CG_INVALID_OBJ_HANDLE_ERROR,
|
||||
"Invalid object handle.")
|
||||
|
||||
CG_ERROR_MACRO(57,
|
||||
CG_INVALID_BUFFER_HANDLE_ERROR,
|
||||
"Invalid buffer handle.")
|
||||
|
||||
CG_ERROR_MACRO(58,
|
||||
CG_BUFFER_INDEX_OUT_OF_RANGE_ERROR,
|
||||
"Buffer index is out of bounds.")
|
||||
|
||||
CG_ERROR_MACRO(59,
|
||||
CG_BUFFER_ALREADY_MAPPED_ERROR,
|
||||
"The buffer is already mapped.")
|
||||
|
||||
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
|
||||
|
105
Engine/ExtIncludes/ShaderUtil/Cg/cg_profiles.h
Normal file
|
@ -0,0 +1,105 @@
|
|||
/*
|
||||
*
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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_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.
|
||||
* compiler_id_caps : compiler_id in caps.
|
||||
* compiler_opt : The command-line switch used to force compilation into
|
||||
* 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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#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>
|
||||
|
||||
|
||||
CG_PROFILE_MACRO(DX9Vertex11,vs_1_1,VS_1_1,"vs_1_1",6153,1)
|
||||
CG_PROFILE_MACRO(DX9Vertex20,vs_2_0,VS_2_0,"vs_2_0",6154,1)
|
||||
CG_PROFILE_MACRO(DX9Vertex2x,vs_2_x,VS_2_X,"vs_2_x",6155,1)
|
||||
CG_PROFILE_MACRO(DX9Vertex2sw,vs_2_sw,VS_2_SW,"vs_2_sw",6156,1)
|
||||
CG_PROFILE_MACRO(DX9Vertex30,vs_3_0,VS_3_0,"vs_3_0",6157,1)
|
||||
CG_PROFILE_MACRO(DX9VertexHLSL,hlslv, HLSLV,"hlslv",6158,1)
|
||||
|
||||
CG_PROFILE_MACRO(DX9Pixel11,ps_1_1,PS_1_1,"ps_1_1",6159,0)
|
||||
CG_PROFILE_MACRO(DX9Pixel12,ps_1_2,PS_1_2,"ps_1_2",6160,0)
|
||||
CG_PROFILE_MACRO(DX9Pixel13,ps_1_3,PS_1_3,"ps_1_3",6161,0)
|
||||
CG_PROFILE_MACRO(DX9Pixel20,ps_2_0,PS_2_0,"ps_2_0",6162,0)
|
||||
CG_PROFILE_MACRO(DX9Pixel2x,ps_2_x,PS_2_X,"ps_2_x",6163,0)
|
||||
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
|
49
Engine/ExtIncludes/ShaderUtil/GlslOptimizer/glsl_optimizer.h
Normal file
|
@ -0,0 +1,49 @@
|
|||
#pragma once
|
||||
#ifndef GLSL_OPTIMIZER_H
|
||||
#define GLSL_OPTIMIZER_H
|
||||
|
||||
/*
|
||||
Main GLSL optimizer interface.
|
||||
See ../../README.md for more instructions.
|
||||
|
||||
General usage:
|
||||
|
||||
ctx = glslopt_initialize();
|
||||
for (lots of shaders) {
|
||||
shader = glslopt_optimize (ctx, shaderType, shaderSource, options);
|
||||
if (glslopt_get_status (shader)) {
|
||||
newSource = glslopt_get_output (shader);
|
||||
} else {
|
||||
errorLog = glslopt_get_log (shader);
|
||||
}
|
||||
glslopt_shader_delete (shader);
|
||||
}
|
||||
glslopt_cleanup (ctx);
|
||||
*/
|
||||
|
||||
struct glslopt_shader;
|
||||
struct glslopt_ctx;
|
||||
|
||||
enum glslopt_shader_type {
|
||||
kGlslOptShaderVertex = 0,
|
||||
kGlslOptShaderFragment,
|
||||
};
|
||||
|
||||
// Options flags for glsl_optimize
|
||||
enum glslopt_options {
|
||||
kGlslOptionSkipPreprocessor = (1<<0), // Skip preprocessing shader source. Saves some time if you know you don't need it.
|
||||
kGlslOptionNotFullShader = (1<<1), // Passed shader is not the full shader source. This makes some optimizations weaker.
|
||||
};
|
||||
|
||||
glslopt_ctx* glslopt_initialize (bool openglES);
|
||||
void glslopt_cleanup (glslopt_ctx* ctx);
|
||||
|
||||
glslopt_shader* glslopt_optimize (glslopt_ctx* ctx, glslopt_shader_type type, const char* shaderSource, unsigned options);
|
||||
bool glslopt_get_status (glslopt_shader* shader);
|
||||
const char* glslopt_get_output (glslopt_shader* shader);
|
||||
const char* glslopt_get_raw_output (glslopt_shader* shader);
|
||||
const char* glslopt_get_log (glslopt_shader* shader);
|
||||
void glslopt_shader_delete (glslopt_shader* shader);
|
||||
|
||||
|
||||
#endif /* GLSL_OPTIMIZER_H */
|
222
Engine/ExtIncludes/ShaderUtil/hlsl2glslfork/hlsl2glsl.h
Normal file
|
@ -0,0 +1,222 @@
|
|||
// Copyright (c) The HLSL2GLSLFork Project Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE.txt file.
|
||||
|
||||
#ifndef _HLSL2GLSL_INTERFACE_INCLUDED_
|
||||
#define _HLSL2GLSL_INTERFACE_INCLUDED_
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#define C_DECL __cdecl
|
||||
#define SH_IMPORT_EXPORT
|
||||
#else
|
||||
#define SH_IMPORT_EXPORT
|
||||
#define __fastcall
|
||||
#define C_DECL
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/// Types of languages the HLSL2GLSL translator can consume.
|
||||
typedef enum
|
||||
{
|
||||
EShLangVertex,
|
||||
EShLangFragment,
|
||||
EShLangCount,
|
||||
} EShLanguage;
|
||||
|
||||
/// Binding table. This can be used for locating attributes, uniforms, globals, etc., as needed.
|
||||
typedef struct
|
||||
{
|
||||
char* name;
|
||||
int binding;
|
||||
} ShBinding;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int numBindings;
|
||||
ShBinding* bindings; // array of bindings
|
||||
} ShBindingTable;
|
||||
|
||||
|
||||
/// GLSL shader variable types
|
||||
/// NOTE: these are ordered to exactly match the internal enums
|
||||
typedef enum
|
||||
{
|
||||
EShTypeVoid,
|
||||
EShTypeBool,
|
||||
EShTypeBVec2,
|
||||
EShTypeBVec3,
|
||||
EShTypeBVec4,
|
||||
EShTypeInt,
|
||||
EShTypeIVec2,
|
||||
EShTypeIVec3,
|
||||
EShTypeIVec4,
|
||||
EShTypeFloat,
|
||||
EShTypeVec2,
|
||||
EShTypeVec3,
|
||||
EShTypeVec4,
|
||||
EShTypeMat2,
|
||||
EShTypeMat3,
|
||||
EShTypeMat4,
|
||||
EShTypeSampler,
|
||||
EShTypeSampler1D,
|
||||
EShTypeSampler2D,
|
||||
EShTypeSampler3D,
|
||||
EShTypeSamplerCube,
|
||||
EShTypeStruct
|
||||
} EShType;
|
||||
|
||||
|
||||
/// HLSL attribute semantics
|
||||
/// NOTE: these are ordered to exactly match the internal tables
|
||||
enum EAttribSemantic
|
||||
{
|
||||
EAttrSemNone,
|
||||
EAttrSemPosition,
|
||||
EAttrSemVPos,
|
||||
EAttrSemVFace,
|
||||
EAttrSemNormal,
|
||||
EAttrSemColor0,
|
||||
EAttrSemColor1,
|
||||
EAttrSemColor2,
|
||||
EAttrSemColor3,
|
||||
EAttrSemTex0,
|
||||
EAttrSemTex1,
|
||||
EAttrSemTex2,
|
||||
EAttrSemTex3,
|
||||
EAttrSemTex4,
|
||||
EAttrSemTex5,
|
||||
EAttrSemTex6,
|
||||
EAttrSemTex7,
|
||||
EAttrSemTex8,
|
||||
EAttrSemTex9,
|
||||
EAttrSemTangent,
|
||||
EAttrSemBinormal,
|
||||
EAttrSemBlendWeight,
|
||||
EAttrSemBlendIndices,
|
||||
EAttrSemDepth,
|
||||
EAttrSemSize,
|
||||
EAttrSemUnknown,
|
||||
EAttrSemCount
|
||||
};
|
||||
|
||||
|
||||
/// Uniform info struct
|
||||
typedef struct
|
||||
{
|
||||
char *name;
|
||||
char *semantic;
|
||||
EShType type;
|
||||
int arraySize;
|
||||
float *init;
|
||||
void *annt;
|
||||
} ShUniformInfo;
|
||||
|
||||
|
||||
/// Translation options
|
||||
enum TTranslateOptions
|
||||
{
|
||||
ETranslateOpNone = 0,
|
||||
ETranslateOpIntermediate = (1<<0),
|
||||
ETranslateOpUsePrecision = (1<<1),
|
||||
};
|
||||
|
||||
|
||||
|
||||
/// Generic opaque handle. This type is used for handles to the parser/translator.
|
||||
/// If handle creation fails, 0 will be returned.
|
||||
class HlslCrossCompiler;
|
||||
typedef HlslCrossCompiler* ShHandle;
|
||||
|
||||
|
||||
/// Initialize the HLSL2GLSL translator. This function must be called once prior to calling any other
|
||||
/// HLSL2GLSL translator functions
|
||||
/// \return
|
||||
/// 1 on success, 0 on failure
|
||||
SH_IMPORT_EXPORT int C_DECL Hlsl2Glsl_Initialize();
|
||||
|
||||
|
||||
/// Finalize the HLSL2GLSL translator. This function should be called to de-initialize the HLSL2GLSL
|
||||
/// translator and should only be called once on shutdown.
|
||||
/// \return
|
||||
/// 1 on success, 0 on failure
|
||||
SH_IMPORT_EXPORT int C_DECL Hlsl2Glsl_Finalize();
|
||||
|
||||
|
||||
/// Construct a compiler for the given language (one per shader)
|
||||
SH_IMPORT_EXPORT ShHandle C_DECL Hlsl2Glsl_ConstructCompiler( const EShLanguage language );
|
||||
|
||||
|
||||
SH_IMPORT_EXPORT void C_DECL Hlsl2Glsl_DestructCompiler( ShHandle handle );
|
||||
|
||||
|
||||
|
||||
/// Parse HLSL shader to prepare it for final translation.
|
||||
SH_IMPORT_EXPORT int C_DECL Hlsl2Glsl_Parse( const ShHandle handle,
|
||||
const char* shaderString,
|
||||
int option );
|
||||
|
||||
|
||||
|
||||
/// After parsing a HLSL shader, do the final translation to GLSL.
|
||||
SH_IMPORT_EXPORT int C_DECL Hlsl2Glsl_Translate( const ShHandle handle, const char* entry, int options );
|
||||
|
||||
|
||||
/// After translating HLSL shader(s), retrieve the translated GLSL source.
|
||||
SH_IMPORT_EXPORT const char* C_DECL Hlsl2Glsl_GetShader( const ShHandle handle );
|
||||
|
||||
|
||||
SH_IMPORT_EXPORT const char* C_DECL Hlsl2Glsl_GetInfoLog( const ShHandle handle );
|
||||
|
||||
|
||||
/// After translating, retrieve the number of uniforms
|
||||
SH_IMPORT_EXPORT int C_DECL Hlsl2Glsl_GetUniformCount( const ShHandle handle );
|
||||
|
||||
|
||||
/// After translating, retrieve the uniform info table
|
||||
SH_IMPORT_EXPORT const ShUniformInfo* C_DECL Hlsl2Glsl_GetUniformInfo( const ShHandle handle );
|
||||
|
||||
|
||||
/// Instead of mapping HLSL attributes to GLSL fixed-function attributes, this function can be used to
|
||||
/// override the attribute mapping. This tells the code generator to use user-defined attributes for
|
||||
/// the semantics that are specified.
|
||||
///
|
||||
/// \param handle
|
||||
/// Handle to the compiler. This should be called BEFORE calling Hlsl2Glsl_Translate
|
||||
/// \param pSemanticEnums
|
||||
/// Array of semantic enums to set
|
||||
/// \param pSemanticNames
|
||||
/// Array of user attribute names to use
|
||||
/// \param nNumSemantics
|
||||
/// Number of semantics to set in the arrays
|
||||
/// \return
|
||||
/// 1 on success, 0 on failure
|
||||
SH_IMPORT_EXPORT int C_DECL Hlsl2Glsl_SetUserAttributeNames ( ShHandle handle,
|
||||
const EAttribSemantic *pSemanticEnums,
|
||||
const char *pSemanticNames[],
|
||||
int nNumSemantics );
|
||||
|
||||
|
||||
/// Instead of using OpenGL fixed-function varyings (such as gl_TexCoord[x]), use user named varyings
|
||||
/// instead.
|
||||
///
|
||||
/// \param handle
|
||||
/// Handle to the compiler. This should be called BEFORE calling Hlsl2Glsl_Translate
|
||||
/// \param bUseUserVarying
|
||||
/// If true, all user varyings will be used. If false, the translator will attempt to use
|
||||
/// GL fixed-function varyings
|
||||
/// \return
|
||||
/// 1 on success, 0 on failure
|
||||
SH_IMPORT_EXPORT int C_DECL Hlsl2Glsl_UseUserVaryings ( ShHandle handle,
|
||||
bool bUseUserVaryings );
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _HLSL2GLSL_INTERFACE_INCLUDED_
|
3147
Engine/ExtIncludes/ShaderUtil/mojoshader/mojoshader.h
Normal file
4272
Engine/ExtIncludes/ShaderUtil/mojoshader/mojoshader_parser_hlsl.h
Normal file
|
@ -0,0 +1,7 @@
|
|||
/* This file was autogenerated. Do not edit! */
|
||||
#ifndef _INCL_MOJOSHADER_VERSION_H_
|
||||
#define _INCL_MOJOSHADER_VERSION_H_
|
||||
#define MOJOSHADER_VERSION -1
|
||||
#define MOJOSHADER_CHANGESET "???"
|
||||
#endif
|
||||
|
718
Engine/ExtIncludes/extlibAndroid/OpenAL/al.h
Normal file
|
@ -0,0 +1,718 @@
|
|||
#ifndef AL_AL_H
|
||||
#define AL_AL_H
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef AL_API
|
||||
#if defined(AL_LIBTYPE_STATIC)
|
||||
#define AL_API
|
||||
#elif defined(_WIN32)
|
||||
#define AL_API __declspec(dllimport)
|
||||
#else
|
||||
#define AL_API extern
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
#define AL_APIENTRY __cdecl
|
||||
#else
|
||||
#define AL_APIENTRY
|
||||
#endif
|
||||
|
||||
#if defined(TARGET_OS_MAC) && TARGET_OS_MAC
|
||||
#pragma export on
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The OPENAL, ALAPI, ALAPIENTRY, AL_INVALID, AL_ILLEGAL_ENUM, and
|
||||
* AL_ILLEGAL_COMMAND macros are deprecated, but are included for
|
||||
* applications porting code from AL 1.0
|
||||
*/
|
||||
#define OPENAL
|
||||
#define ALAPI AL_API
|
||||
#define ALAPIENTRY AL_APIENTRY
|
||||
#define AL_INVALID (-1)
|
||||
#define AL_ILLEGAL_ENUM AL_INVALID_ENUM
|
||||
#define AL_ILLEGAL_COMMAND AL_INVALID_OPERATION
|
||||
|
||||
#define AL_VERSION_1_0
|
||||
#define AL_VERSION_1_1
|
||||
|
||||
|
||||
/** 8-bit boolean */
|
||||
typedef char ALboolean;
|
||||
|
||||
/** character */
|
||||
typedef char ALchar;
|
||||
|
||||
/** signed 8-bit 2's complement integer */
|
||||
typedef signed char ALbyte;
|
||||
|
||||
/** unsigned 8-bit integer */
|
||||
typedef unsigned char ALubyte;
|
||||
|
||||
/** signed 16-bit 2's complement integer */
|
||||
typedef short ALshort;
|
||||
|
||||
/** unsigned 16-bit integer */
|
||||
typedef unsigned short ALushort;
|
||||
|
||||
/** signed 32-bit 2's complement integer */
|
||||
typedef int ALint;
|
||||
|
||||
/** unsigned 32-bit integer */
|
||||
typedef unsigned int ALuint;
|
||||
|
||||
/** non-negative 32-bit binary integer size */
|
||||
typedef int ALsizei;
|
||||
|
||||
/** enumerated 32-bit value */
|
||||
typedef int ALenum;
|
||||
|
||||
/** 32-bit IEEE754 floating-point */
|
||||
typedef float ALfloat;
|
||||
|
||||
/** 64-bit IEEE754 floating-point */
|
||||
typedef double ALdouble;
|
||||
|
||||
/** void type (for opaque pointers only) */
|
||||
typedef void ALvoid;
|
||||
|
||||
|
||||
/* Enumerant values begin at column 50. No tabs. */
|
||||
|
||||
/* "no distance model" or "no buffer" */
|
||||
#define AL_NONE 0
|
||||
|
||||
/* Boolean False. */
|
||||
#define AL_FALSE 0
|
||||
|
||||
/** Boolean True. */
|
||||
#define AL_TRUE 1
|
||||
|
||||
/** Indicate Source has relative coordinates. */
|
||||
#define AL_SOURCE_RELATIVE 0x202
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Directional source, inner cone angle, in degrees.
|
||||
* Range: [0-360]
|
||||
* Default: 360
|
||||
*/
|
||||
#define AL_CONE_INNER_ANGLE 0x1001
|
||||
|
||||
/**
|
||||
* Directional source, outer cone angle, in degrees.
|
||||
* Range: [0-360]
|
||||
* Default: 360
|
||||
*/
|
||||
#define AL_CONE_OUTER_ANGLE 0x1002
|
||||
|
||||
/**
|
||||
* Specify the pitch to be applied at source.
|
||||
* Range: [0.5-2.0]
|
||||
* Default: 1.0
|
||||
*/
|
||||
#define AL_PITCH 0x1003
|
||||
|
||||
/**
|
||||
* Specify the current location in three dimensional space.
|
||||
* OpenAL, like OpenGL, uses a right handed coordinate system,
|
||||
* where in a frontal default view X (thumb) points right,
|
||||
* Y points up (index finger), and Z points towards the
|
||||
* viewer/camera (middle finger).
|
||||
* To switch from a left handed coordinate system, flip the
|
||||
* sign on the Z coordinate.
|
||||
* Listener position is always in the world coordinate system.
|
||||
*/
|
||||
#define AL_POSITION 0x1004
|
||||
|
||||
/** Specify the current direction. */
|
||||
#define AL_DIRECTION 0x1005
|
||||
|
||||
/** Specify the current velocity in three dimensional space. */
|
||||
#define AL_VELOCITY 0x1006
|
||||
|
||||
/**
|
||||
* Indicate whether source is looping.
|
||||
* Type: ALboolean?
|
||||
* Range: [AL_TRUE, AL_FALSE]
|
||||
* Default: FALSE.
|
||||
*/
|
||||
#define AL_LOOPING 0x1007
|
||||
|
||||
/**
|
||||
* Indicate the buffer to provide sound samples.
|
||||
* Type: ALuint.
|
||||
* Range: any valid Buffer id.
|
||||
*/
|
||||
#define AL_BUFFER 0x1009
|
||||
|
||||
/**
|
||||
* Indicate the gain (volume amplification) applied.
|
||||
* Type: ALfloat.
|
||||
* Range: ]0.0- ]
|
||||
* A value of 1.0 means un-attenuated/unchanged.
|
||||
* Each division by 2 equals an attenuation of -6dB.
|
||||
* Each multiplicaton with 2 equals an amplification of +6dB.
|
||||
* A value of 0.0 is meaningless with respect to a logarithmic
|
||||
* scale; it is interpreted as zero volume - the channel
|
||||
* is effectively disabled.
|
||||
*/
|
||||
#define AL_GAIN 0x100A
|
||||
|
||||
/*
|
||||
* Indicate minimum source attenuation
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - 1.0]
|
||||
*
|
||||
* Logarthmic
|
||||
*/
|
||||
#define AL_MIN_GAIN 0x100D
|
||||
|
||||
/**
|
||||
* Indicate maximum source attenuation
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - 1.0]
|
||||
*
|
||||
* Logarthmic
|
||||
*/
|
||||
#define AL_MAX_GAIN 0x100E
|
||||
|
||||
/**
|
||||
* Indicate listener orientation.
|
||||
*
|
||||
* at/up
|
||||
*/
|
||||
#define AL_ORIENTATION 0x100F
|
||||
|
||||
/**
|
||||
* Source state information.
|
||||
*/
|
||||
#define AL_SOURCE_STATE 0x1010
|
||||
#define AL_INITIAL 0x1011
|
||||
#define AL_PLAYING 0x1012
|
||||
#define AL_PAUSED 0x1013
|
||||
#define AL_STOPPED 0x1014
|
||||
|
||||
/**
|
||||
* Buffer Queue params
|
||||
*/
|
||||
#define AL_BUFFERS_QUEUED 0x1015
|
||||
#define AL_BUFFERS_PROCESSED 0x1016
|
||||
|
||||
/**
|
||||
* Source buffer position information
|
||||
*/
|
||||
#define AL_SEC_OFFSET 0x1024
|
||||
#define AL_SAMPLE_OFFSET 0x1025
|
||||
#define AL_BYTE_OFFSET 0x1026
|
||||
|
||||
/*
|
||||
* Source type (Static, Streaming or undetermined)
|
||||
* Source is Static if a Buffer has been attached using AL_BUFFER
|
||||
* Source is Streaming if one or more Buffers have been attached using alSourceQueueBuffers
|
||||
* Source is undetermined when it has the NULL buffer attached
|
||||
*/
|
||||
#define AL_SOURCE_TYPE 0x1027
|
||||
#define AL_STATIC 0x1028
|
||||
#define AL_STREAMING 0x1029
|
||||
#define AL_UNDETERMINED 0x1030
|
||||
|
||||
/** Sound samples: format specifier. */
|
||||
#define AL_FORMAT_MONO8 0x1100
|
||||
#define AL_FORMAT_MONO16 0x1101
|
||||
#define AL_FORMAT_STEREO8 0x1102
|
||||
#define AL_FORMAT_STEREO16 0x1103
|
||||
|
||||
/**
|
||||
* source specific reference distance
|
||||
* Type: ALfloat
|
||||
* Range: 0.0 - +inf
|
||||
*
|
||||
* At 0.0, no distance attenuation occurs. Default is
|
||||
* 1.0.
|
||||
*/
|
||||
#define AL_REFERENCE_DISTANCE 0x1020
|
||||
|
||||
/**
|
||||
* source specific rolloff factor
|
||||
* Type: ALfloat
|
||||
* Range: 0.0 - +inf
|
||||
*
|
||||
*/
|
||||
#define AL_ROLLOFF_FACTOR 0x1021
|
||||
|
||||
/**
|
||||
* Directional source, outer cone gain.
|
||||
*
|
||||
* Default: 0.0
|
||||
* Range: [0.0 - 1.0]
|
||||
* Logarithmic
|
||||
*/
|
||||
#define AL_CONE_OUTER_GAIN 0x1022
|
||||
|
||||
/**
|
||||
* Indicate distance above which sources are not
|
||||
* attenuated using the inverse clamped distance model.
|
||||
*
|
||||
* Default: +inf
|
||||
* Type: ALfloat
|
||||
* Range: 0.0 - +inf
|
||||
*/
|
||||
#define AL_MAX_DISTANCE 0x1023
|
||||
|
||||
/**
|
||||
* Sound samples: frequency, in units of Hertz [Hz].
|
||||
* This is the number of samples per second. Half of the
|
||||
* sample frequency marks the maximum significant
|
||||
* frequency component.
|
||||
*/
|
||||
#define AL_FREQUENCY 0x2001
|
||||
#define AL_BITS 0x2002
|
||||
#define AL_CHANNELS 0x2003
|
||||
#define AL_SIZE 0x2004
|
||||
|
||||
/**
|
||||
* Buffer state.
|
||||
*
|
||||
* Not supported for public use (yet).
|
||||
*/
|
||||
#define AL_UNUSED 0x2010
|
||||
#define AL_PENDING 0x2011
|
||||
#define AL_PROCESSED 0x2012
|
||||
|
||||
|
||||
/** Errors: No Error. */
|
||||
#define AL_NO_ERROR 0
|
||||
|
||||
/**
|
||||
* Invalid Name paramater passed to AL call.
|
||||
*/
|
||||
#define AL_INVALID_NAME 0xA001
|
||||
|
||||
/**
|
||||
* Invalid parameter passed to AL call.
|
||||
*/
|
||||
#define AL_INVALID_ENUM 0xA002
|
||||
|
||||
/**
|
||||
* Invalid enum parameter value.
|
||||
*/
|
||||
#define AL_INVALID_VALUE 0xA003
|
||||
|
||||
/**
|
||||
* Illegal call.
|
||||
*/
|
||||
#define AL_INVALID_OPERATION 0xA004
|
||||
|
||||
|
||||
/**
|
||||
* No mojo.
|
||||
*/
|
||||
#define AL_OUT_OF_MEMORY 0xA005
|
||||
|
||||
|
||||
/** Context strings: Vendor Name. */
|
||||
#define AL_VENDOR 0xB001
|
||||
#define AL_VERSION 0xB002
|
||||
#define AL_RENDERER 0xB003
|
||||
#define AL_EXTENSIONS 0xB004
|
||||
|
||||
/** Global tweakage. */
|
||||
|
||||
/**
|
||||
* Doppler scale. Default 1.0
|
||||
*/
|
||||
#define AL_DOPPLER_FACTOR 0xC000
|
||||
|
||||
/**
|
||||
* Tweaks speed of propagation.
|
||||
*/
|
||||
#define AL_DOPPLER_VELOCITY 0xC001
|
||||
|
||||
/**
|
||||
* Speed of Sound in units per second
|
||||
*/
|
||||
#define AL_SPEED_OF_SOUND 0xC003
|
||||
|
||||
/**
|
||||
* Distance models
|
||||
*
|
||||
* used in conjunction with DistanceModel
|
||||
*
|
||||
* implicit: NONE, which disances distance attenuation.
|
||||
*/
|
||||
#define AL_DISTANCE_MODEL 0xD000
|
||||
#define AL_INVERSE_DISTANCE 0xD001
|
||||
#define AL_INVERSE_DISTANCE_CLAMPED 0xD002
|
||||
#define AL_LINEAR_DISTANCE 0xD003
|
||||
#define AL_LINEAR_DISTANCE_CLAMPED 0xD004
|
||||
#define AL_EXPONENT_DISTANCE 0xD005
|
||||
#define AL_EXPONENT_DISTANCE_CLAMPED 0xD006
|
||||
|
||||
/*
|
||||
* Renderer State management
|
||||
*/
|
||||
AL_API void AL_APIENTRY alEnable( ALenum capability );
|
||||
|
||||
AL_API void AL_APIENTRY alDisable( ALenum capability );
|
||||
|
||||
AL_API ALboolean AL_APIENTRY alIsEnabled( ALenum capability );
|
||||
|
||||
|
||||
/*
|
||||
* State retrieval
|
||||
*/
|
||||
AL_API const ALchar* AL_APIENTRY alGetString( ALenum param );
|
||||
|
||||
AL_API void AL_APIENTRY alGetBooleanv( ALenum param, ALboolean* data );
|
||||
|
||||
AL_API void AL_APIENTRY alGetIntegerv( ALenum param, ALint* data );
|
||||
|
||||
AL_API void AL_APIENTRY alGetFloatv( ALenum param, ALfloat* data );
|
||||
|
||||
AL_API void AL_APIENTRY alGetDoublev( ALenum param, ALdouble* data );
|
||||
|
||||
AL_API ALboolean AL_APIENTRY alGetBoolean( ALenum param );
|
||||
|
||||
AL_API ALint AL_APIENTRY alGetInteger( ALenum param );
|
||||
|
||||
AL_API ALfloat AL_APIENTRY alGetFloat( ALenum param );
|
||||
|
||||
AL_API ALdouble AL_APIENTRY alGetDouble( ALenum param );
|
||||
|
||||
|
||||
/*
|
||||
* Error support.
|
||||
* Obtain the most recent error generated in the AL state machine.
|
||||
*/
|
||||
AL_API ALenum AL_APIENTRY alGetError( void );
|
||||
|
||||
|
||||
/*
|
||||
* Extension support.
|
||||
* Query for the presence of an extension, and obtain any appropriate
|
||||
* function pointers and enum values.
|
||||
*/
|
||||
AL_API ALboolean AL_APIENTRY alIsExtensionPresent( const ALchar* extname );
|
||||
|
||||
AL_API void* AL_APIENTRY alGetProcAddress( const ALchar* fname );
|
||||
|
||||
AL_API ALenum AL_APIENTRY alGetEnumValue( const ALchar* ename );
|
||||
|
||||
|
||||
/*
|
||||
* LISTENER
|
||||
* Listener represents the location and orientation of the
|
||||
* 'user' in 3D-space.
|
||||
*
|
||||
* Properties include: -
|
||||
*
|
||||
* Gain AL_GAIN ALfloat
|
||||
* Position AL_POSITION ALfloat[3]
|
||||
* Velocity AL_VELOCITY ALfloat[3]
|
||||
* Orientation AL_ORIENTATION ALfloat[6] (Forward then Up vectors)
|
||||
*/
|
||||
|
||||
/*
|
||||
* Set Listener parameters
|
||||
*/
|
||||
AL_API void AL_APIENTRY alListenerf( ALenum param, ALfloat value );
|
||||
|
||||
AL_API void AL_APIENTRY alListener3f( ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
|
||||
|
||||
AL_API void AL_APIENTRY alListenerfv( ALenum param, const ALfloat* values );
|
||||
|
||||
AL_API void AL_APIENTRY alListeneri( ALenum param, ALint value );
|
||||
|
||||
AL_API void AL_APIENTRY alListener3i( ALenum param, ALint value1, ALint value2, ALint value3 );
|
||||
|
||||
AL_API void AL_APIENTRY alListeneriv( ALenum param, const ALint* values );
|
||||
|
||||
/*
|
||||
* Get Listener parameters
|
||||
*/
|
||||
AL_API void AL_APIENTRY alGetListenerf( ALenum param, ALfloat* value );
|
||||
|
||||
AL_API void AL_APIENTRY alGetListener3f( ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3 );
|
||||
|
||||
AL_API void AL_APIENTRY alGetListenerfv( ALenum param, ALfloat* values );
|
||||
|
||||
AL_API void AL_APIENTRY alGetListeneri( ALenum param, ALint* value );
|
||||
|
||||
AL_API void AL_APIENTRY alGetListener3i( ALenum param, ALint *value1, ALint *value2, ALint *value3 );
|
||||
|
||||
AL_API void AL_APIENTRY alGetListeneriv( ALenum param, ALint* values );
|
||||
|
||||
|
||||
/**
|
||||
* SOURCE
|
||||
* Sources represent individual sound objects in 3D-space.
|
||||
* Sources take the PCM data provided in the specified Buffer,
|
||||
* apply Source-specific modifications, and then
|
||||
* submit them to be mixed according to spatial arrangement etc.
|
||||
*
|
||||
* Properties include: -
|
||||
*
|
||||
* Gain AL_GAIN ALfloat
|
||||
* Min Gain AL_MIN_GAIN ALfloat
|
||||
* Max Gain AL_MAX_GAIN ALfloat
|
||||
* Position AL_POSITION ALfloat[3]
|
||||
* Velocity AL_VELOCITY ALfloat[3]
|
||||
* Direction AL_DIRECTION ALfloat[3]
|
||||
* Head Relative Mode AL_SOURCE_RELATIVE ALint (AL_TRUE or AL_FALSE)
|
||||
* Reference Distance AL_REFERENCE_DISTANCE ALfloat
|
||||
* Max Distance AL_MAX_DISTANCE ALfloat
|
||||
* RollOff Factor AL_ROLLOFF_FACTOR ALfloat
|
||||
* Inner Angle AL_CONE_INNER_ANGLE ALint or ALfloat
|
||||
* Outer Angle AL_CONE_OUTER_ANGLE ALint or ALfloat
|
||||
* Cone Outer Gain AL_CONE_OUTER_GAIN ALint or ALfloat
|
||||
* Pitch AL_PITCH ALfloat
|
||||
* Looping AL_LOOPING ALint (AL_TRUE or AL_FALSE)
|
||||
* MS Offset AL_MSEC_OFFSET ALint or ALfloat
|
||||
* Byte Offset AL_BYTE_OFFSET ALint or ALfloat
|
||||
* Sample Offset AL_SAMPLE_OFFSET ALint or ALfloat
|
||||
* Attached Buffer AL_BUFFER ALint
|
||||
* State (Query only) AL_SOURCE_STATE ALint
|
||||
* Buffers Queued (Query only) AL_BUFFERS_QUEUED ALint
|
||||
* Buffers Processed (Query only) AL_BUFFERS_PROCESSED ALint
|
||||
*/
|
||||
|
||||
/* Create Source objects */
|
||||
AL_API void AL_APIENTRY alGenSources( ALsizei n, ALuint* sources );
|
||||
|
||||
/* Delete Source objects */
|
||||
AL_API void AL_APIENTRY alDeleteSources( ALsizei n, const ALuint* sources );
|
||||
|
||||
/* Verify a handle is a valid Source */
|
||||
AL_API ALboolean AL_APIENTRY alIsSource( ALuint sid );
|
||||
|
||||
/*
|
||||
* Set Source parameters
|
||||
*/
|
||||
AL_API void AL_APIENTRY alSourcef( ALuint sid, ALenum param, ALfloat value );
|
||||
|
||||
AL_API void AL_APIENTRY alSource3f( ALuint sid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
|
||||
|
||||
AL_API void AL_APIENTRY alSourcefv( ALuint sid, ALenum param, const ALfloat* values );
|
||||
|
||||
AL_API void AL_APIENTRY alSourcei( ALuint sid, ALenum param, ALint value );
|
||||
|
||||
AL_API void AL_APIENTRY alSource3i( ALuint sid, ALenum param, ALint value1, ALint value2, ALint value3 );
|
||||
|
||||
AL_API void AL_APIENTRY alSourceiv( ALuint sid, ALenum param, const ALint* values );
|
||||
|
||||
/*
|
||||
* Get Source parameters
|
||||
*/
|
||||
AL_API void AL_APIENTRY alGetSourcef( ALuint sid, ALenum param, ALfloat* value );
|
||||
|
||||
AL_API void AL_APIENTRY alGetSource3f( ALuint sid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3);
|
||||
|
||||
AL_API void AL_APIENTRY alGetSourcefv( ALuint sid, ALenum param, ALfloat* values );
|
||||
|
||||
AL_API void AL_APIENTRY alGetSourcei( ALuint sid, ALenum param, ALint* value );
|
||||
|
||||
AL_API void AL_APIENTRY alGetSource3i( ALuint sid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
|
||||
|
||||
AL_API void AL_APIENTRY alGetSourceiv( ALuint sid, ALenum param, ALint* values );
|
||||
|
||||
|
||||
/*
|
||||
* Source vector based playback calls
|
||||
*/
|
||||
|
||||
/* Play, replay, or resume (if paused) a list of Sources */
|
||||
AL_API void AL_APIENTRY alSourcePlayv( ALsizei ns, const ALuint *sids );
|
||||
|
||||
/* Stop a list of Sources */
|
||||
AL_API void AL_APIENTRY alSourceStopv( ALsizei ns, const ALuint *sids );
|
||||
|
||||
/* Rewind a list of Sources */
|
||||
AL_API void AL_APIENTRY alSourceRewindv( ALsizei ns, const ALuint *sids );
|
||||
|
||||
/* Pause a list of Sources */
|
||||
AL_API void AL_APIENTRY alSourcePausev( ALsizei ns, const ALuint *sids );
|
||||
|
||||
/*
|
||||
* Source based playback calls
|
||||
*/
|
||||
|
||||
/* Play, replay, or resume a Source */
|
||||
AL_API void AL_APIENTRY alSourcePlay( ALuint sid );
|
||||
|
||||
/* Stop a Source */
|
||||
AL_API void AL_APIENTRY alSourceStop( ALuint sid );
|
||||
|
||||
/* Rewind a Source (set playback postiton to beginning) */
|
||||
AL_API void AL_APIENTRY alSourceRewind( ALuint sid );
|
||||
|
||||
/* Pause a Source */
|
||||
AL_API void AL_APIENTRY alSourcePause( ALuint sid );
|
||||
|
||||
/*
|
||||
* Source Queuing
|
||||
*/
|
||||
AL_API void AL_APIENTRY alSourceQueueBuffers( ALuint sid, ALsizei numEntries, const ALuint *bids );
|
||||
|
||||
AL_API void AL_APIENTRY alSourceUnqueueBuffers( ALuint sid, ALsizei numEntries, ALuint *bids );
|
||||
|
||||
|
||||
/**
|
||||
* BUFFER
|
||||
* Buffer objects are storage space for sample data.
|
||||
* Buffers are referred to by Sources. One Buffer can be used
|
||||
* by multiple Sources.
|
||||
*
|
||||
* Properties include: -
|
||||
*
|
||||
* Frequency (Query only) AL_FREQUENCY ALint
|
||||
* Size (Query only) AL_SIZE ALint
|
||||
* Bits (Query only) AL_BITS ALint
|
||||
* Channels (Query only) AL_CHANNELS ALint
|
||||
*/
|
||||
|
||||
/* Create Buffer objects */
|
||||
AL_API void AL_APIENTRY alGenBuffers( ALsizei n, ALuint* buffers );
|
||||
|
||||
/* Delete Buffer objects */
|
||||
AL_API void AL_APIENTRY alDeleteBuffers( ALsizei n, const ALuint* buffers );
|
||||
|
||||
/* Verify a handle is a valid Buffer */
|
||||
AL_API ALboolean AL_APIENTRY alIsBuffer( ALuint bid );
|
||||
|
||||
/* Specify the data to be copied into a buffer */
|
||||
AL_API void AL_APIENTRY alBufferData( ALuint bid, ALenum format, const ALvoid* data, ALsizei size, ALsizei freq );
|
||||
|
||||
/*
|
||||
* Set Buffer parameters
|
||||
*/
|
||||
AL_API void AL_APIENTRY alBufferf( ALuint bid, ALenum param, ALfloat value );
|
||||
|
||||
AL_API void AL_APIENTRY alBuffer3f( ALuint bid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
|
||||
|
||||
AL_API void AL_APIENTRY alBufferfv( ALuint bid, ALenum param, const ALfloat* values );
|
||||
|
||||
AL_API void AL_APIENTRY alBufferi( ALuint bid, ALenum param, ALint value );
|
||||
|
||||
AL_API void AL_APIENTRY alBuffer3i( ALuint bid, ALenum param, ALint value1, ALint value2, ALint value3 );
|
||||
|
||||
AL_API void AL_APIENTRY alBufferiv( ALuint bid, ALenum param, const ALint* values );
|
||||
|
||||
/*
|
||||
* Get Buffer parameters
|
||||
*/
|
||||
AL_API void AL_APIENTRY alGetBufferf( ALuint bid, ALenum param, ALfloat* value );
|
||||
|
||||
AL_API void AL_APIENTRY alGetBuffer3f( ALuint bid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3);
|
||||
|
||||
AL_API void AL_APIENTRY alGetBufferfv( ALuint bid, ALenum param, ALfloat* values );
|
||||
|
||||
AL_API void AL_APIENTRY alGetBufferi( ALuint bid, ALenum param, ALint* value );
|
||||
|
||||
AL_API void AL_APIENTRY alGetBuffer3i( ALuint bid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
|
||||
|
||||
AL_API void AL_APIENTRY alGetBufferiv( ALuint bid, ALenum param, ALint* values );
|
||||
|
||||
|
||||
/*
|
||||
* Global Parameters
|
||||
*/
|
||||
AL_API void AL_APIENTRY alDopplerFactor( ALfloat value );
|
||||
|
||||
AL_API void AL_APIENTRY alDopplerVelocity( ALfloat value );
|
||||
|
||||
AL_API void AL_APIENTRY alSpeedOfSound( ALfloat value );
|
||||
|
||||
AL_API void AL_APIENTRY alDistanceModel( ALenum distanceModel );
|
||||
|
||||
/*
|
||||
* Pointer-to-function types, useful for dynamically getting AL entry points.
|
||||
*/
|
||||
typedef void (AL_APIENTRY *LPALENABLE)( ALenum capability );
|
||||
typedef void (AL_APIENTRY *LPALDISABLE)( ALenum capability );
|
||||
typedef ALboolean (AL_APIENTRY *LPALISENABLED)( ALenum capability );
|
||||
typedef const ALchar* (AL_APIENTRY *LPALGETSTRING)( ALenum param );
|
||||
typedef void (AL_APIENTRY *LPALGETBOOLEANV)( ALenum param, ALboolean* data );
|
||||
typedef void (AL_APIENTRY *LPALGETINTEGERV)( ALenum param, ALint* data );
|
||||
typedef void (AL_APIENTRY *LPALGETFLOATV)( ALenum param, ALfloat* data );
|
||||
typedef void (AL_APIENTRY *LPALGETDOUBLEV)( ALenum param, ALdouble* data );
|
||||
typedef ALboolean (AL_APIENTRY *LPALGETBOOLEAN)( ALenum param );
|
||||
typedef ALint (AL_APIENTRY *LPALGETINTEGER)( ALenum param );
|
||||
typedef ALfloat (AL_APIENTRY *LPALGETFLOAT)( ALenum param );
|
||||
typedef ALdouble (AL_APIENTRY *LPALGETDOUBLE)( ALenum param );
|
||||
typedef ALenum (AL_APIENTRY *LPALGETERROR)( void );
|
||||
typedef ALboolean (AL_APIENTRY *LPALISEXTENSIONPRESENT)(const ALchar* extname );
|
||||
typedef void* (AL_APIENTRY *LPALGETPROCADDRESS)( const ALchar* fname );
|
||||
typedef ALenum (AL_APIENTRY *LPALGETENUMVALUE)( const ALchar* ename );
|
||||
typedef void (AL_APIENTRY *LPALLISTENERF)( ALenum param, ALfloat value );
|
||||
typedef void (AL_APIENTRY *LPALLISTENER3F)( ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
|
||||
typedef void (AL_APIENTRY *LPALLISTENERFV)( ALenum param, const ALfloat* values );
|
||||
typedef void (AL_APIENTRY *LPALLISTENERI)( ALenum param, ALint value );
|
||||
typedef void (AL_APIENTRY *LPALLISTENER3I)( ALenum param, ALint value1, ALint value2, ALint value3 );
|
||||
typedef void (AL_APIENTRY *LPALLISTENERIV)( ALenum param, const ALint* values );
|
||||
typedef void (AL_APIENTRY *LPALGETLISTENERF)( ALenum param, ALfloat* value );
|
||||
typedef void (AL_APIENTRY *LPALGETLISTENER3F)( ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3 );
|
||||
typedef void (AL_APIENTRY *LPALGETLISTENERFV)( ALenum param, ALfloat* values );
|
||||
typedef void (AL_APIENTRY *LPALGETLISTENERI)( ALenum param, ALint* value );
|
||||
typedef void (AL_APIENTRY *LPALGETLISTENER3I)( ALenum param, ALint *value1, ALint *value2, ALint *value3 );
|
||||
typedef void (AL_APIENTRY *LPALGETLISTENERIV)( ALenum param, ALint* values );
|
||||
typedef void (AL_APIENTRY *LPALGENSOURCES)( ALsizei n, ALuint* sources );
|
||||
typedef void (AL_APIENTRY *LPALDELETESOURCES)( ALsizei n, const ALuint* sources );
|
||||
typedef ALboolean (AL_APIENTRY *LPALISSOURCE)( ALuint sid );
|
||||
typedef void (AL_APIENTRY *LPALSOURCEF)( ALuint sid, ALenum param, ALfloat value);
|
||||
typedef void (AL_APIENTRY *LPALSOURCE3F)( ALuint sid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
|
||||
typedef void (AL_APIENTRY *LPALSOURCEFV)( ALuint sid, ALenum param, const ALfloat* values );
|
||||
typedef void (AL_APIENTRY *LPALSOURCEI)( ALuint sid, ALenum param, ALint value);
|
||||
typedef void (AL_APIENTRY *LPALSOURCE3I)( ALuint sid, ALenum param, ALint value1, ALint value2, ALint value3 );
|
||||
typedef void (AL_APIENTRY *LPALSOURCEIV)( ALuint sid, ALenum param, const ALint* values );
|
||||
typedef void (AL_APIENTRY *LPALGETSOURCEF)( ALuint sid, ALenum param, ALfloat* value );
|
||||
typedef void (AL_APIENTRY *LPALGETSOURCE3F)( ALuint sid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3);
|
||||
typedef void (AL_APIENTRY *LPALGETSOURCEFV)( ALuint sid, ALenum param, ALfloat* values );
|
||||
typedef void (AL_APIENTRY *LPALGETSOURCEI)( ALuint sid, ALenum param, ALint* value );
|
||||
typedef void (AL_APIENTRY *LPALGETSOURCE3I)( ALuint sid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
|
||||
typedef void (AL_APIENTRY *LPALGETSOURCEIV)( ALuint sid, ALenum param, ALint* values );
|
||||
typedef void (AL_APIENTRY *LPALSOURCEPLAYV)( ALsizei ns, const ALuint *sids );
|
||||
typedef void (AL_APIENTRY *LPALSOURCESTOPV)( ALsizei ns, const ALuint *sids );
|
||||
typedef void (AL_APIENTRY *LPALSOURCEREWINDV)( ALsizei ns, const ALuint *sids );
|
||||
typedef void (AL_APIENTRY *LPALSOURCEPAUSEV)( ALsizei ns, const ALuint *sids );
|
||||
typedef void (AL_APIENTRY *LPALSOURCEPLAY)( ALuint sid );
|
||||
typedef void (AL_APIENTRY *LPALSOURCESTOP)( ALuint sid );
|
||||
typedef void (AL_APIENTRY *LPALSOURCEREWIND)( ALuint sid );
|
||||
typedef void (AL_APIENTRY *LPALSOURCEPAUSE)( ALuint sid );
|
||||
typedef void (AL_APIENTRY *LPALSOURCEQUEUEBUFFERS)(ALuint sid, ALsizei numEntries, const ALuint *bids );
|
||||
typedef void (AL_APIENTRY *LPALSOURCEUNQUEUEBUFFERS)(ALuint sid, ALsizei numEntries, ALuint *bids );
|
||||
typedef void (AL_APIENTRY *LPALGENBUFFERS)( ALsizei n, ALuint* buffers );
|
||||
typedef void (AL_APIENTRY *LPALDELETEBUFFERS)( ALsizei n, const ALuint* buffers );
|
||||
typedef ALboolean (AL_APIENTRY *LPALISBUFFER)( ALuint bid );
|
||||
typedef void (AL_APIENTRY *LPALBUFFERDATA)( ALuint bid, ALenum format, const ALvoid* data, ALsizei size, ALsizei freq );
|
||||
typedef void (AL_APIENTRY *LPALBUFFERF)( ALuint bid, ALenum param, ALfloat value);
|
||||
typedef void (AL_APIENTRY *LPALBUFFER3F)( ALuint bid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
|
||||
typedef void (AL_APIENTRY *LPALBUFFERFV)( ALuint bid, ALenum param, const ALfloat* values );
|
||||
typedef void (AL_APIENTRY *LPALBUFFERI)( ALuint bid, ALenum param, ALint value);
|
||||
typedef void (AL_APIENTRY *LPALBUFFER3I)( ALuint bid, ALenum param, ALint value1, ALint value2, ALint value3 );
|
||||
typedef void (AL_APIENTRY *LPALBUFFERIV)( ALuint bid, ALenum param, const ALint* values );
|
||||
typedef void (AL_APIENTRY *LPALGETBUFFERF)( ALuint bid, ALenum param, ALfloat* value );
|
||||
typedef void (AL_APIENTRY *LPALGETBUFFER3F)( ALuint bid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3);
|
||||
typedef void (AL_APIENTRY *LPALGETBUFFERFV)( ALuint bid, ALenum param, ALfloat* values );
|
||||
typedef void (AL_APIENTRY *LPALGETBUFFERI)( ALuint bid, ALenum param, ALint* value );
|
||||
typedef void (AL_APIENTRY *LPALGETBUFFER3I)( ALuint bid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
|
||||
typedef void (AL_APIENTRY *LPALGETBUFFERIV)( ALuint bid, ALenum param, ALint* values );
|
||||
typedef void (AL_APIENTRY *LPALDOPPLERFACTOR)( ALfloat value );
|
||||
typedef void (AL_APIENTRY *LPALDOPPLERVELOCITY)( ALfloat value );
|
||||
typedef void (AL_APIENTRY *LPALSPEEDOFSOUND)( ALfloat value );
|
||||
typedef void (AL_APIENTRY *LPALDISTANCEMODEL)( ALenum distanceModel );
|
||||
|
||||
#if defined(TARGET_OS_MAC) && TARGET_OS_MAC
|
||||
#pragma export off
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* AL_AL_H */
|
280
Engine/ExtIncludes/extlibAndroid/OpenAL/alc.h
Normal file
|
@ -0,0 +1,280 @@
|
|||
#ifndef AL_ALC_H
|
||||
#define AL_ALC_H
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef ALC_API
|
||||
#if defined(AL_LIBTYPE_STATIC)
|
||||
#define ALC_API
|
||||
#elif defined(_WIN32)
|
||||
#define ALC_API __declspec(dllimport)
|
||||
#else
|
||||
#define ALC_API extern
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
#define ALC_APIENTRY __cdecl
|
||||
#else
|
||||
#define ALC_APIENTRY
|
||||
#endif
|
||||
|
||||
#if defined(TARGET_OS_MAC) && TARGET_OS_MAC
|
||||
#pragma export on
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The ALCAPI, ALCAPIENTRY, and ALC_INVALID macros are deprecated, but are
|
||||
* included for applications porting code from AL 1.0
|
||||
*/
|
||||
#define ALCAPI ALC_API
|
||||
#define ALCAPIENTRY ALC_APIENTRY
|
||||
#define ALC_INVALID 0
|
||||
|
||||
|
||||
#define ALC_VERSION_0_1 1
|
||||
|
||||
typedef struct ALCdevice_struct ALCdevice;
|
||||
typedef struct ALCcontext_struct ALCcontext;
|
||||
|
||||
|
||||
/** 8-bit boolean */
|
||||
typedef char ALCboolean;
|
||||
|
||||
/** character */
|
||||
typedef char ALCchar;
|
||||
|
||||
/** signed 8-bit 2's complement integer */
|
||||
typedef signed char ALCbyte;
|
||||
|
||||
/** unsigned 8-bit integer */
|
||||
typedef unsigned char ALCubyte;
|
||||
|
||||
/** signed 16-bit 2's complement integer */
|
||||
typedef short ALCshort;
|
||||
|
||||
/** unsigned 16-bit integer */
|
||||
typedef unsigned short ALCushort;
|
||||
|
||||
/** signed 32-bit 2's complement integer */
|
||||
typedef int ALCint;
|
||||
|
||||
/** unsigned 32-bit integer */
|
||||
typedef unsigned int ALCuint;
|
||||
|
||||
/** non-negative 32-bit binary integer size */
|
||||
typedef int ALCsizei;
|
||||
|
||||
/** enumerated 32-bit value */
|
||||
typedef int ALCenum;
|
||||
|
||||
/** 32-bit IEEE754 floating-point */
|
||||
typedef float ALCfloat;
|
||||
|
||||
/** 64-bit IEEE754 floating-point */
|
||||
typedef double ALCdouble;
|
||||
|
||||
/** void type (for opaque pointers only) */
|
||||
typedef void ALCvoid;
|
||||
|
||||
|
||||
/* Enumerant values begin at column 50. No tabs. */
|
||||
|
||||
/* Boolean False. */
|
||||
#define ALC_FALSE 0
|
||||
|
||||
/* Boolean True. */
|
||||
#define ALC_TRUE 1
|
||||
|
||||
/**
|
||||
* followed by <int> Hz
|
||||
*/
|
||||
#define ALC_FREQUENCY 0x1007
|
||||
|
||||
/**
|
||||
* followed by <int> Hz
|
||||
*/
|
||||
#define ALC_REFRESH 0x1008
|
||||
|
||||
/**
|
||||
* followed by AL_TRUE, AL_FALSE
|
||||
*/
|
||||
#define ALC_SYNC 0x1009
|
||||
|
||||
/**
|
||||
* followed by <int> Num of requested Mono (3D) Sources
|
||||
*/
|
||||
#define ALC_MONO_SOURCES 0x1010
|
||||
|
||||
/**
|
||||
* followed by <int> Num of requested Stereo Sources
|
||||
*/
|
||||
#define ALC_STEREO_SOURCES 0x1011
|
||||
|
||||
/**
|
||||
* errors
|
||||
*/
|
||||
|
||||
/**
|
||||
* No error
|
||||
*/
|
||||
#define ALC_NO_ERROR 0
|
||||
|
||||
/**
|
||||
* No device
|
||||
*/
|
||||
#define ALC_INVALID_DEVICE 0xA001
|
||||
|
||||
/**
|
||||
* invalid context ID
|
||||
*/
|
||||
#define ALC_INVALID_CONTEXT 0xA002
|
||||
|
||||
/**
|
||||
* bad enum
|
||||
*/
|
||||
#define ALC_INVALID_ENUM 0xA003
|
||||
|
||||
/**
|
||||
* bad value
|
||||
*/
|
||||
#define ALC_INVALID_VALUE 0xA004
|
||||
|
||||
/**
|
||||
* Out of memory.
|
||||
*/
|
||||
#define ALC_OUT_OF_MEMORY 0xA005
|
||||
|
||||
|
||||
/**
|
||||
* The Specifier string for default device
|
||||
*/
|
||||
#define ALC_DEFAULT_DEVICE_SPECIFIER 0x1004
|
||||
#define ALC_DEVICE_SPECIFIER 0x1005
|
||||
#define ALC_EXTENSIONS 0x1006
|
||||
|
||||
#define ALC_MAJOR_VERSION 0x1000
|
||||
#define ALC_MINOR_VERSION 0x1001
|
||||
|
||||
#define ALC_ATTRIBUTES_SIZE 0x1002
|
||||
#define ALC_ALL_ATTRIBUTES 0x1003
|
||||
|
||||
|
||||
/**
|
||||
* Capture extension
|
||||
*/
|
||||
#define ALC_EXT_CAPTURE 1
|
||||
#define ALC_CAPTURE_DEVICE_SPECIFIER 0x310
|
||||
#define ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER 0x311
|
||||
#define ALC_CAPTURE_SAMPLES 0x312
|
||||
|
||||
|
||||
/**
|
||||
* ALC_ENUMERATE_ALL_EXT enums
|
||||
*/
|
||||
#define ALC_ENUMERATE_ALL_EXT 1
|
||||
#define ALC_DEFAULT_ALL_DEVICES_SPECIFIER 0x1012
|
||||
#define ALC_ALL_DEVICES_SPECIFIER 0x1013
|
||||
|
||||
|
||||
/*
|
||||
* Context Management
|
||||
*/
|
||||
ALC_API ALCcontext * ALC_APIENTRY alcCreateContext( ALCdevice *device, const ALCint* attrlist );
|
||||
|
||||
ALC_API ALCboolean ALC_APIENTRY alcMakeContextCurrent( ALCcontext *context );
|
||||
|
||||
ALC_API void ALC_APIENTRY alcProcessContext( ALCcontext *context );
|
||||
|
||||
ALC_API void ALC_APIENTRY alcSuspendContext( ALCcontext *context );
|
||||
|
||||
ALC_API void ALC_APIENTRY alcDestroyContext( ALCcontext *context );
|
||||
|
||||
ALC_API ALCcontext * ALC_APIENTRY alcGetCurrentContext( void );
|
||||
|
||||
ALC_API ALCdevice* ALC_APIENTRY alcGetContextsDevice( ALCcontext *context );
|
||||
|
||||
|
||||
/*
|
||||
* Device Management
|
||||
*/
|
||||
ALC_API ALCdevice * ALC_APIENTRY alcOpenDevice( const ALCchar *devicename );
|
||||
|
||||
ALC_API ALCboolean ALC_APIENTRY alcCloseDevice( ALCdevice *device );
|
||||
|
||||
|
||||
/*
|
||||
* Error support.
|
||||
* Obtain the most recent Context error
|
||||
*/
|
||||
ALC_API ALCenum ALC_APIENTRY alcGetError( ALCdevice *device );
|
||||
|
||||
|
||||
/*
|
||||
* Extension support.
|
||||
* Query for the presence of an extension, and obtain any appropriate
|
||||
* function pointers and enum values.
|
||||
*/
|
||||
ALC_API ALCboolean ALC_APIENTRY alcIsExtensionPresent( ALCdevice *device, const ALCchar *extname );
|
||||
|
||||
ALC_API void * ALC_APIENTRY alcGetProcAddress( ALCdevice *device, const ALCchar *funcname );
|
||||
|
||||
ALC_API ALCenum ALC_APIENTRY alcGetEnumValue( ALCdevice *device, const ALCchar *enumname );
|
||||
|
||||
|
||||
/*
|
||||
* Query functions
|
||||
*/
|
||||
ALC_API const ALCchar * ALC_APIENTRY alcGetString( ALCdevice *device, ALCenum param );
|
||||
|
||||
ALC_API void ALC_APIENTRY alcGetIntegerv( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *data );
|
||||
|
||||
|
||||
/*
|
||||
* Capture functions
|
||||
*/
|
||||
ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice( const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize );
|
||||
|
||||
ALC_API ALCboolean ALC_APIENTRY alcCaptureCloseDevice( ALCdevice *device );
|
||||
|
||||
ALC_API void ALC_APIENTRY alcCaptureStart( ALCdevice *device );
|
||||
|
||||
ALC_API void ALC_APIENTRY alcCaptureStop( ALCdevice *device );
|
||||
|
||||
ALC_API void ALC_APIENTRY alcCaptureSamples( ALCdevice *device, ALCvoid *buffer, ALCsizei samples );
|
||||
|
||||
/*
|
||||
* Pointer-to-function types, useful for dynamically getting ALC entry points.
|
||||
*/
|
||||
typedef ALCcontext * (ALC_APIENTRY *LPALCCREATECONTEXT) (ALCdevice *device, const ALCint *attrlist);
|
||||
typedef ALCboolean (ALC_APIENTRY *LPALCMAKECONTEXTCURRENT)( ALCcontext *context );
|
||||
typedef void (ALC_APIENTRY *LPALCPROCESSCONTEXT)( ALCcontext *context );
|
||||
typedef void (ALC_APIENTRY *LPALCSUSPENDCONTEXT)( ALCcontext *context );
|
||||
typedef void (ALC_APIENTRY *LPALCDESTROYCONTEXT)( ALCcontext *context );
|
||||
typedef ALCcontext * (ALC_APIENTRY *LPALCGETCURRENTCONTEXT)( void );
|
||||
typedef ALCdevice * (ALC_APIENTRY *LPALCGETCONTEXTSDEVICE)( ALCcontext *context );
|
||||
typedef ALCdevice * (ALC_APIENTRY *LPALCOPENDEVICE)( const ALCchar *devicename );
|
||||
typedef ALCboolean (ALC_APIENTRY *LPALCCLOSEDEVICE)( ALCdevice *device );
|
||||
typedef ALCenum (ALC_APIENTRY *LPALCGETERROR)( ALCdevice *device );
|
||||
typedef ALCboolean (ALC_APIENTRY *LPALCISEXTENSIONPRESENT)( ALCdevice *device, const ALCchar *extname );
|
||||
typedef void * (ALC_APIENTRY *LPALCGETPROCADDRESS)(ALCdevice *device, const ALCchar *funcname );
|
||||
typedef ALCenum (ALC_APIENTRY *LPALCGETENUMVALUE)(ALCdevice *device, const ALCchar *enumname );
|
||||
typedef const ALCchar* (ALC_APIENTRY *LPALCGETSTRING)( ALCdevice *device, ALCenum param );
|
||||
typedef void (ALC_APIENTRY *LPALCGETINTEGERV)( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *dest );
|
||||
typedef ALCdevice * (ALC_APIENTRY *LPALCCAPTUREOPENDEVICE)( const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize );
|
||||
typedef ALCboolean (ALC_APIENTRY *LPALCCAPTURECLOSEDEVICE)( ALCdevice *device );
|
||||
typedef void (ALC_APIENTRY *LPALCCAPTURESTART)( ALCdevice *device );
|
||||
typedef void (ALC_APIENTRY *LPALCCAPTURESTOP)( ALCdevice *device );
|
||||
typedef void (ALC_APIENTRY *LPALCCAPTURESAMPLES)( ALCdevice *device, ALCvoid *buffer, ALCsizei samples );
|
||||
|
||||
#if defined(TARGET_OS_MAC) && TARGET_OS_MAC
|
||||
#pragma export off
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* AL_ALC_H */
|
3
Engine/ExtIncludes/extlibAndroid/OpenAL/efx-creative.h
Normal file
|
@ -0,0 +1,3 @@
|
|||
/* The tokens that would be defined here are already defined in efx.h. This
|
||||
* empty file is here to provide compatibility with Windows-based projects
|
||||
* that would include it. */
|
758
Engine/ExtIncludes/extlibAndroid/OpenAL/efx.h
Normal file
|
@ -0,0 +1,758 @@
|
|||
#ifndef AL_EFX_H
|
||||
#define AL_EFX_H
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ALC_EXT_EFX_NAME "ALC_EXT_EFX"
|
||||
|
||||
#define ALC_EFX_MAJOR_VERSION 0x20001
|
||||
#define ALC_EFX_MINOR_VERSION 0x20002
|
||||
#define ALC_MAX_AUXILIARY_SENDS 0x20003
|
||||
|
||||
|
||||
/* Listener properties. */
|
||||
#define AL_METERS_PER_UNIT 0x20004
|
||||
|
||||
/* Source properties. */
|
||||
#define AL_DIRECT_FILTER 0x20005
|
||||
#define AL_AUXILIARY_SEND_FILTER 0x20006
|
||||
#define AL_AIR_ABSORPTION_FACTOR 0x20007
|
||||
#define AL_ROOM_ROLLOFF_FACTOR 0x20008
|
||||
#define AL_CONE_OUTER_GAINHF 0x20009
|
||||
#define AL_DIRECT_FILTER_GAINHF_AUTO 0x2000A
|
||||
#define AL_AUXILIARY_SEND_FILTER_GAIN_AUTO 0x2000B
|
||||
#define AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO 0x2000C
|
||||
|
||||
|
||||
/* Effect properties. */
|
||||
|
||||
/* Reverb effect parameters */
|
||||
#define AL_REVERB_DENSITY 0x0001
|
||||
#define AL_REVERB_DIFFUSION 0x0002
|
||||
#define AL_REVERB_GAIN 0x0003
|
||||
#define AL_REVERB_GAINHF 0x0004
|
||||
#define AL_REVERB_DECAY_TIME 0x0005
|
||||
#define AL_REVERB_DECAY_HFRATIO 0x0006
|
||||
#define AL_REVERB_REFLECTIONS_GAIN 0x0007
|
||||
#define AL_REVERB_REFLECTIONS_DELAY 0x0008
|
||||
#define AL_REVERB_LATE_REVERB_GAIN 0x0009
|
||||
#define AL_REVERB_LATE_REVERB_DELAY 0x000A
|
||||
#define AL_REVERB_AIR_ABSORPTION_GAINHF 0x000B
|
||||
#define AL_REVERB_ROOM_ROLLOFF_FACTOR 0x000C
|
||||
#define AL_REVERB_DECAY_HFLIMIT 0x000D
|
||||
|
||||
/* EAX Reverb effect parameters */
|
||||
#define AL_EAXREVERB_DENSITY 0x0001
|
||||
#define AL_EAXREVERB_DIFFUSION 0x0002
|
||||
#define AL_EAXREVERB_GAIN 0x0003
|
||||
#define AL_EAXREVERB_GAINHF 0x0004
|
||||
#define AL_EAXREVERB_GAINLF 0x0005
|
||||
#define AL_EAXREVERB_DECAY_TIME 0x0006
|
||||
#define AL_EAXREVERB_DECAY_HFRATIO 0x0007
|
||||
#define AL_EAXREVERB_DECAY_LFRATIO 0x0008
|
||||
#define AL_EAXREVERB_REFLECTIONS_GAIN 0x0009
|
||||
#define AL_EAXREVERB_REFLECTIONS_DELAY 0x000A
|
||||
#define AL_EAXREVERB_REFLECTIONS_PAN 0x000B
|
||||
#define AL_EAXREVERB_LATE_REVERB_GAIN 0x000C
|
||||
#define AL_EAXREVERB_LATE_REVERB_DELAY 0x000D
|
||||
#define AL_EAXREVERB_LATE_REVERB_PAN 0x000E
|
||||
#define AL_EAXREVERB_ECHO_TIME 0x000F
|
||||
#define AL_EAXREVERB_ECHO_DEPTH 0x0010
|
||||
#define AL_EAXREVERB_MODULATION_TIME 0x0011
|
||||
#define AL_EAXREVERB_MODULATION_DEPTH 0x0012
|
||||
#define AL_EAXREVERB_AIR_ABSORPTION_GAINHF 0x0013
|
||||
#define AL_EAXREVERB_HFREFERENCE 0x0014
|
||||
#define AL_EAXREVERB_LFREFERENCE 0x0015
|
||||
#define AL_EAXREVERB_ROOM_ROLLOFF_FACTOR 0x0016
|
||||
#define AL_EAXREVERB_DECAY_HFLIMIT 0x0017
|
||||
|
||||
/* Chorus effect parameters */
|
||||
#define AL_CHORUS_WAVEFORM 0x0001
|
||||
#define AL_CHORUS_PHASE 0x0002
|
||||
#define AL_CHORUS_RATE 0x0003
|
||||
#define AL_CHORUS_DEPTH 0x0004
|
||||
#define AL_CHORUS_FEEDBACK 0x0005
|
||||
#define AL_CHORUS_DELAY 0x0006
|
||||
|
||||
/* Distortion effect parameters */
|
||||
#define AL_DISTORTION_EDGE 0x0001
|
||||
#define AL_DISTORTION_GAIN 0x0002
|
||||
#define AL_DISTORTION_LOWPASS_CUTOFF 0x0003
|
||||
#define AL_DISTORTION_EQCENTER 0x0004
|
||||
#define AL_DISTORTION_EQBANDWIDTH 0x0005
|
||||
|
||||
/* Echo effect parameters */
|
||||
#define AL_ECHO_DELAY 0x0001
|
||||
#define AL_ECHO_LRDELAY 0x0002
|
||||
#define AL_ECHO_DAMPING 0x0003
|
||||
#define AL_ECHO_FEEDBACK 0x0004
|
||||
#define AL_ECHO_SPREAD 0x0005
|
||||
|
||||
/* Flanger effect parameters */
|
||||
#define AL_FLANGER_WAVEFORM 0x0001
|
||||
#define AL_FLANGER_PHASE 0x0002
|
||||
#define AL_FLANGER_RATE 0x0003
|
||||
#define AL_FLANGER_DEPTH 0x0004
|
||||
#define AL_FLANGER_FEEDBACK 0x0005
|
||||
#define AL_FLANGER_DELAY 0x0006
|
||||
|
||||
/* Frequency shifter effect parameters */
|
||||
#define AL_FREQUENCY_SHIFTER_FREQUENCY 0x0001
|
||||
#define AL_FREQUENCY_SHIFTER_LEFT_DIRECTION 0x0002
|
||||
#define AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION 0x0003
|
||||
|
||||
/* Vocal morpher effect parameters */
|
||||
#define AL_VOCAL_MORPHER_PHONEMEA 0x0001
|
||||
#define AL_VOCAL_MORPHER_PHONEMEA_COARSE_TUNING 0x0002
|
||||
#define AL_VOCAL_MORPHER_PHONEMEB 0x0003
|
||||
#define AL_VOCAL_MORPHER_PHONEMEB_COARSE_TUNING 0x0004
|
||||
#define AL_VOCAL_MORPHER_WAVEFORM 0x0005
|
||||
#define AL_VOCAL_MORPHER_RATE 0x0006
|
||||
|
||||
/* Pitchshifter effect parameters */
|
||||
#define AL_PITCH_SHIFTER_COARSE_TUNE 0x0001
|
||||
#define AL_PITCH_SHIFTER_FINE_TUNE 0x0002
|
||||
|
||||
/* Ringmodulator effect parameters */
|
||||
#define AL_RING_MODULATOR_FREQUENCY 0x0001
|
||||
#define AL_RING_MODULATOR_HIGHPASS_CUTOFF 0x0002
|
||||
#define AL_RING_MODULATOR_WAVEFORM 0x0003
|
||||
|
||||
/* Autowah effect parameters */
|
||||
#define AL_AUTOWAH_ATTACK_TIME 0x0001
|
||||
#define AL_AUTOWAH_RELEASE_TIME 0x0002
|
||||
#define AL_AUTOWAH_RESONANCE 0x0003
|
||||
#define AL_AUTOWAH_PEAK_GAIN 0x0004
|
||||
|
||||
/* Compressor effect parameters */
|
||||
#define AL_COMPRESSOR_ONOFF 0x0001
|
||||
|
||||
/* Equalizer effect parameters */
|
||||
#define AL_EQUALIZER_LOW_GAIN 0x0001
|
||||
#define AL_EQUALIZER_LOW_CUTOFF 0x0002
|
||||
#define AL_EQUALIZER_MID1_GAIN 0x0003
|
||||
#define AL_EQUALIZER_MID1_CENTER 0x0004
|
||||
#define AL_EQUALIZER_MID1_WIDTH 0x0005
|
||||
#define AL_EQUALIZER_MID2_GAIN 0x0006
|
||||
#define AL_EQUALIZER_MID2_CENTER 0x0007
|
||||
#define AL_EQUALIZER_MID2_WIDTH 0x0008
|
||||
#define AL_EQUALIZER_HIGH_GAIN 0x0009
|
||||
#define AL_EQUALIZER_HIGH_CUTOFF 0x000A
|
||||
|
||||
/* Effect type */
|
||||
#define AL_EFFECT_FIRST_PARAMETER 0x0000
|
||||
#define AL_EFFECT_LAST_PARAMETER 0x8000
|
||||
#define AL_EFFECT_TYPE 0x8001
|
||||
|
||||
/* Effect types, used with the AL_EFFECT_TYPE property */
|
||||
#define AL_EFFECT_NULL 0x0000
|
||||
#define AL_EFFECT_REVERB 0x0001
|
||||
#define AL_EFFECT_CHORUS 0x0002
|
||||
#define AL_EFFECT_DISTORTION 0x0003
|
||||
#define AL_EFFECT_ECHO 0x0004
|
||||
#define AL_EFFECT_FLANGER 0x0005
|
||||
#define AL_EFFECT_FREQUENCY_SHIFTER 0x0006
|
||||
#define AL_EFFECT_VOCAL_MORPHER 0x0007
|
||||
#define AL_EFFECT_PITCH_SHIFTER 0x0008
|
||||
#define AL_EFFECT_RING_MODULATOR 0x0009
|
||||
#define AL_EFFECT_AUTOWAH 0x000A
|
||||
#define AL_EFFECT_COMPRESSOR 0x000B
|
||||
#define AL_EFFECT_EQUALIZER 0x000C
|
||||
#define AL_EFFECT_EAXREVERB 0x8000
|
||||
|
||||
/* Auxiliary Effect Slot properties. */
|
||||
#define AL_EFFECTSLOT_EFFECT 0x0001
|
||||
#define AL_EFFECTSLOT_GAIN 0x0002
|
||||
#define AL_EFFECTSLOT_AUXILIARY_SEND_AUTO 0x0003
|
||||
|
||||
/* NULL Auxiliary Slot ID to disable a source send. */
|
||||
#define AL_EFFECTSLOT_NULL 0x0000
|
||||
|
||||
|
||||
/* Filter properties. */
|
||||
|
||||
/* Lowpass filter parameters */
|
||||
#define AL_LOWPASS_GAIN 0x0001
|
||||
#define AL_LOWPASS_GAINHF 0x0002
|
||||
|
||||
/* Highpass filter parameters */
|
||||
#define AL_HIGHPASS_GAIN 0x0001
|
||||
#define AL_HIGHPASS_GAINLF 0x0002
|
||||
|
||||
/* Bandpass filter parameters */
|
||||
#define AL_BANDPASS_GAIN 0x0001
|
||||
#define AL_BANDPASS_GAINLF 0x0002
|
||||
#define AL_BANDPASS_GAINHF 0x0003
|
||||
|
||||
/* Filter type */
|
||||
#define AL_FILTER_FIRST_PARAMETER 0x0000
|
||||
#define AL_FILTER_LAST_PARAMETER 0x8000
|
||||
#define AL_FILTER_TYPE 0x8001
|
||||
|
||||
/* Filter types, used with the AL_FILTER_TYPE property */
|
||||
#define AL_FILTER_NULL 0x0000
|
||||
#define AL_FILTER_LOWPASS 0x0001
|
||||
#define AL_FILTER_HIGHPASS 0x0002
|
||||
#define AL_FILTER_BANDPASS 0x0003
|
||||
|
||||
|
||||
/* Effect object function types. */
|
||||
typedef void (AL_APIENTRY *LPALGENEFFECTS)(ALsizei, ALuint*);
|
||||
typedef void (AL_APIENTRY *LPALDELETEEFFECTS)(ALsizei, const ALuint*);
|
||||
typedef ALboolean (AL_APIENTRY *LPALISEFFECT)(ALuint);
|
||||
typedef void (AL_APIENTRY *LPALEFFECTI)(ALuint, ALenum, ALint);
|
||||
typedef void (AL_APIENTRY *LPALEFFECTIV)(ALuint, ALenum, const ALint*);
|
||||
typedef void (AL_APIENTRY *LPALEFFECTF)(ALuint, ALenum, ALfloat);
|
||||
typedef void (AL_APIENTRY *LPALEFFECTFV)(ALuint, ALenum, const ALfloat*);
|
||||
typedef void (AL_APIENTRY *LPALGETEFFECTI)(ALuint, ALenum, ALint*);
|
||||
typedef void (AL_APIENTRY *LPALGETEFFECTIV)(ALuint, ALenum, ALint*);
|
||||
typedef void (AL_APIENTRY *LPALGETEFFECTF)(ALuint, ALenum, ALfloat*);
|
||||
typedef void (AL_APIENTRY *LPALGETEFFECTFV)(ALuint, ALenum, ALfloat*);
|
||||
|
||||
/* Filter object function types. */
|
||||
typedef void (AL_APIENTRY *LPALGENFILTERS)(ALsizei, ALuint*);
|
||||
typedef void (AL_APIENTRY *LPALDELETEFILTERS)(ALsizei, const ALuint*);
|
||||
typedef ALboolean (AL_APIENTRY *LPALISFILTER)(ALuint);
|
||||
typedef void (AL_APIENTRY *LPALFILTERI)(ALuint, ALenum, ALint);
|
||||
typedef void (AL_APIENTRY *LPALFILTERIV)(ALuint, ALenum, const ALint*);
|
||||
typedef void (AL_APIENTRY *LPALFILTERF)(ALuint, ALenum, ALfloat);
|
||||
typedef void (AL_APIENTRY *LPALFILTERFV)(ALuint, ALenum, const ALfloat*);
|
||||
typedef void (AL_APIENTRY *LPALGETFILTERI)(ALuint, ALenum, ALint*);
|
||||
typedef void (AL_APIENTRY *LPALGETFILTERIV)(ALuint, ALenum, ALint*);
|
||||
typedef void (AL_APIENTRY *LPALGETFILTERF)(ALuint, ALenum, ALfloat*);
|
||||
typedef void (AL_APIENTRY *LPALGETFILTERFV)(ALuint, ALenum, ALfloat*);
|
||||
|
||||
/* Auxiliary Effect Slot object function types. */
|
||||
typedef void (AL_APIENTRY *LPALGENAUXILIARYEFFECTSLOTS)(ALsizei, ALuint*);
|
||||
typedef void (AL_APIENTRY *LPALDELETEAUXILIARYEFFECTSLOTS)(ALsizei, const ALuint*);
|
||||
typedef ALboolean (AL_APIENTRY *LPALISAUXILIARYEFFECTSLOT)(ALuint);
|
||||
typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTI)(ALuint, ALenum, ALint);
|
||||
typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTIV)(ALuint, ALenum, const ALint*);
|
||||
typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTF)(ALuint, ALenum, ALfloat);
|
||||
typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTFV)(ALuint, ALenum, const ALfloat*);
|
||||
typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTI)(ALuint, ALenum, ALint*);
|
||||
typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTIV)(ALuint, ALenum, ALint*);
|
||||
typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTF)(ALuint, ALenum, ALfloat*);
|
||||
typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTFV)(ALuint, ALenum, ALfloat*);
|
||||
|
||||
#ifdef AL_ALEXT_PROTOTYPES
|
||||
AL_API ALvoid AL_APIENTRY alGenEffects(ALsizei n, ALuint *effects);
|
||||
AL_API ALvoid AL_APIENTRY alDeleteEffects(ALsizei n, const ALuint *effects);
|
||||
AL_API ALboolean AL_APIENTRY alIsEffect(ALuint effect);
|
||||
AL_API ALvoid AL_APIENTRY alEffecti(ALuint effect, ALenum param, ALint iValue);
|
||||
AL_API ALvoid AL_APIENTRY alEffectiv(ALuint effect, ALenum param, const ALint *piValues);
|
||||
AL_API ALvoid AL_APIENTRY alEffectf(ALuint effect, ALenum param, ALfloat flValue);
|
||||
AL_API ALvoid AL_APIENTRY alEffectfv(ALuint effect, ALenum param, const ALfloat *pflValues);
|
||||
AL_API ALvoid AL_APIENTRY alGetEffecti(ALuint effect, ALenum param, ALint *piValue);
|
||||
AL_API ALvoid AL_APIENTRY alGetEffectiv(ALuint effect, ALenum param, ALint *piValues);
|
||||
AL_API ALvoid AL_APIENTRY alGetEffectf(ALuint effect, ALenum param, ALfloat *pflValue);
|
||||
AL_API ALvoid AL_APIENTRY alGetEffectfv(ALuint effect, ALenum param, ALfloat *pflValues);
|
||||
|
||||
AL_API ALvoid AL_APIENTRY alGenFilters(ALsizei n, ALuint *filters);
|
||||
AL_API ALvoid AL_APIENTRY alDeleteFilters(ALsizei n, const ALuint *filters);
|
||||
AL_API ALboolean AL_APIENTRY alIsFilter(ALuint filter);
|
||||
AL_API ALvoid AL_APIENTRY alFilteri(ALuint filter, ALenum param, ALint iValue);
|
||||
AL_API ALvoid AL_APIENTRY alFilteriv(ALuint filter, ALenum param, const ALint *piValues);
|
||||
AL_API ALvoid AL_APIENTRY alFilterf(ALuint filter, ALenum param, ALfloat flValue);
|
||||
AL_API ALvoid AL_APIENTRY alFilterfv(ALuint filter, ALenum param, const ALfloat *pflValues);
|
||||
AL_API ALvoid AL_APIENTRY alGetFilteri(ALuint filter, ALenum param, ALint *piValue);
|
||||
AL_API ALvoid AL_APIENTRY alGetFilteriv(ALuint filter, ALenum param, ALint *piValues);
|
||||
AL_API ALvoid AL_APIENTRY alGetFilterf(ALuint filter, ALenum param, ALfloat *pflValue);
|
||||
AL_API ALvoid AL_APIENTRY alGetFilterfv(ALuint filter, ALenum param, ALfloat *pflValues);
|
||||
|
||||
AL_API ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslots);
|
||||
AL_API ALvoid AL_APIENTRY alDeleteAuxiliaryEffectSlots(ALsizei n, const ALuint *effectslots);
|
||||
AL_API ALboolean AL_APIENTRY alIsAuxiliaryEffectSlot(ALuint effectslot);
|
||||
AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSloti(ALuint effectslot, ALenum param, ALint iValue);
|
||||
AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotiv(ALuint effectslot, ALenum param, const ALint *piValues);
|
||||
AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat flValue);
|
||||
AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotfv(ALuint effectslot, ALenum param, const ALfloat *pflValues);
|
||||
AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSloti(ALuint effectslot, ALenum param, ALint *piValue);
|
||||
AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotiv(ALuint effectslot, ALenum param, ALint *piValues);
|
||||
AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat *pflValue);
|
||||
AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotfv(ALuint effectslot, ALenum param, ALfloat *pflValues);
|
||||
#endif
|
||||
|
||||
/* Filter ranges and defaults. */
|
||||
|
||||
/* Lowpass filter */
|
||||
#define AL_LOWPASS_MIN_GAIN (0.0f)
|
||||
#define AL_LOWPASS_MAX_GAIN (1.0f)
|
||||
#define AL_LOWPASS_DEFAULT_GAIN (1.0f)
|
||||
|
||||
#define AL_LOWPASS_MIN_GAINHF (0.0f)
|
||||
#define AL_LOWPASS_MAX_GAINHF (1.0f)
|
||||
#define AL_LOWPASS_DEFAULT_GAINHF (1.0f)
|
||||
|
||||
/* Highpass filter */
|
||||
#define AL_HIGHPASS_MIN_GAIN (0.0f)
|
||||
#define AL_HIGHPASS_MAX_GAIN (1.0f)
|
||||
#define AL_HIGHPASS_DEFAULT_GAIN (1.0f)
|
||||
|
||||
#define AL_HIGHPASS_MIN_GAINLF (0.0f)
|
||||
#define AL_HIGHPASS_MAX_GAINLF (1.0f)
|
||||
#define AL_HIGHPASS_DEFAULT_GAINLF (1.0f)
|
||||
|
||||
/* Bandpass filter */
|
||||
#define AL_BANDPASS_MIN_GAIN (0.0f)
|
||||
#define AL_BANDPASS_MAX_GAIN (1.0f)
|
||||
#define AL_BANDPASS_DEFAULT_GAIN (1.0f)
|
||||
|
||||
#define AL_BANDPASS_MIN_GAINHF (0.0f)
|
||||
#define AL_BANDPASS_MAX_GAINHF (1.0f)
|
||||
#define AL_BANDPASS_DEFAULT_GAINHF (1.0f)
|
||||
|
||||
#define AL_BANDPASS_MIN_GAINLF (0.0f)
|
||||
#define AL_BANDPASS_MAX_GAINLF (1.0f)
|
||||
#define AL_BANDPASS_DEFAULT_GAINLF (1.0f)
|
||||
|
||||
|
||||
/* Effect parameter ranges and defaults. */
|
||||
|
||||
/* Standard reverb effect */
|
||||
#define AL_REVERB_MIN_DENSITY (0.0f)
|
||||
#define AL_REVERB_MAX_DENSITY (1.0f)
|
||||
#define AL_REVERB_DEFAULT_DENSITY (1.0f)
|
||||
|
||||
#define AL_REVERB_MIN_DIFFUSION (0.0f)
|
||||
#define AL_REVERB_MAX_DIFFUSION (1.0f)
|
||||
#define AL_REVERB_DEFAULT_DIFFUSION (1.0f)
|
||||
|
||||
#define AL_REVERB_MIN_GAIN (0.0f)
|
||||
#define AL_REVERB_MAX_GAIN (1.0f)
|
||||
#define AL_REVERB_DEFAULT_GAIN (0.32f)
|
||||
|
||||
#define AL_REVERB_MIN_GAINHF (0.0f)
|
||||
#define AL_REVERB_MAX_GAINHF (1.0f)
|
||||
#define AL_REVERB_DEFAULT_GAINHF (0.89f)
|
||||
|
||||
#define AL_REVERB_MIN_DECAY_TIME (0.1f)
|
||||
#define AL_REVERB_MAX_DECAY_TIME (20.0f)
|
||||
#define AL_REVERB_DEFAULT_DECAY_TIME (1.49f)
|
||||
|
||||
#define AL_REVERB_MIN_DECAY_HFRATIO (0.1f)
|
||||
#define AL_REVERB_MAX_DECAY_HFRATIO (2.0f)
|
||||
#define AL_REVERB_DEFAULT_DECAY_HFRATIO (0.83f)
|
||||
|
||||
#define AL_REVERB_MIN_REFLECTIONS_GAIN (0.0f)
|
||||
#define AL_REVERB_MAX_REFLECTIONS_GAIN (3.16f)
|
||||
#define AL_REVERB_DEFAULT_REFLECTIONS_GAIN (0.05f)
|
||||
|
||||
#define AL_REVERB_MIN_REFLECTIONS_DELAY (0.0f)
|
||||
#define AL_REVERB_MAX_REFLECTIONS_DELAY (0.3f)
|
||||
#define AL_REVERB_DEFAULT_REFLECTIONS_DELAY (0.007f)
|
||||
|
||||
#define AL_REVERB_MIN_LATE_REVERB_GAIN (0.0f)
|
||||
#define AL_REVERB_MAX_LATE_REVERB_GAIN (10.0f)
|
||||
#define AL_REVERB_DEFAULT_LATE_REVERB_GAIN (1.26f)
|
||||
|
||||
#define AL_REVERB_MIN_LATE_REVERB_DELAY (0.0f)
|
||||
#define AL_REVERB_MAX_LATE_REVERB_DELAY (0.1f)
|
||||
#define AL_REVERB_DEFAULT_LATE_REVERB_DELAY (0.011f)
|
||||
|
||||
#define AL_REVERB_MIN_AIR_ABSORPTION_GAINHF (0.892f)
|
||||
#define AL_REVERB_MAX_AIR_ABSORPTION_GAINHF (1.0f)
|
||||
#define AL_REVERB_DEFAULT_AIR_ABSORPTION_GAINHF (0.994f)
|
||||
|
||||
#define AL_REVERB_MIN_ROOM_ROLLOFF_FACTOR (0.0f)
|
||||
#define AL_REVERB_MAX_ROOM_ROLLOFF_FACTOR (10.0f)
|
||||
#define AL_REVERB_DEFAULT_ROOM_ROLLOFF_FACTOR (0.0f)
|
||||
|
||||
#define AL_REVERB_MIN_DECAY_HFLIMIT AL_FALSE
|
||||
#define AL_REVERB_MAX_DECAY_HFLIMIT AL_TRUE
|
||||
#define AL_REVERB_DEFAULT_DECAY_HFLIMIT AL_TRUE
|
||||
|
||||
/* EAX reverb effect */
|
||||
#define AL_EAXREVERB_MIN_DENSITY (0.0f)
|
||||
#define AL_EAXREVERB_MAX_DENSITY (1.0f)
|
||||
#define AL_EAXREVERB_DEFAULT_DENSITY (1.0f)
|
||||
|
||||
#define AL_EAXREVERB_MIN_DIFFUSION (0.0f)
|
||||
#define AL_EAXREVERB_MAX_DIFFUSION (1.0f)
|
||||
#define AL_EAXREVERB_DEFAULT_DIFFUSION (1.0f)
|
||||
|
||||
#define AL_EAXREVERB_MIN_GAIN (0.0f)
|
||||
#define AL_EAXREVERB_MAX_GAIN (1.0f)
|
||||
#define AL_EAXREVERB_DEFAULT_GAIN (0.32f)
|
||||
|
||||
#define AL_EAXREVERB_MIN_GAINHF (0.0f)
|
||||
#define AL_EAXREVERB_MAX_GAINHF (1.0f)
|
||||
#define AL_EAXREVERB_DEFAULT_GAINHF (0.89f)
|
||||
|
||||
#define AL_EAXREVERB_MIN_GAINLF (0.0f)
|
||||
#define AL_EAXREVERB_MAX_GAINLF (1.0f)
|
||||
#define AL_EAXREVERB_DEFAULT_GAINLF (1.0f)
|
||||
|
||||
#define AL_EAXREVERB_MIN_DECAY_TIME (0.1f)
|
||||
#define AL_EAXREVERB_MAX_DECAY_TIME (20.0f)
|
||||
#define AL_EAXREVERB_DEFAULT_DECAY_TIME (1.49f)
|
||||
|
||||
#define AL_EAXREVERB_MIN_DECAY_HFRATIO (0.1f)
|
||||
#define AL_EAXREVERB_MAX_DECAY_HFRATIO (2.0f)
|
||||
#define AL_EAXREVERB_DEFAULT_DECAY_HFRATIO (0.83f)
|
||||
|
||||
#define AL_EAXREVERB_MIN_DECAY_LFRATIO (0.1f)
|
||||
#define AL_EAXREVERB_MAX_DECAY_LFRATIO (2.0f)
|
||||
#define AL_EAXREVERB_DEFAULT_DECAY_LFRATIO (1.0f)
|
||||
|
||||
#define AL_EAXREVERB_MIN_REFLECTIONS_GAIN (0.0f)
|
||||
#define AL_EAXREVERB_MAX_REFLECTIONS_GAIN (3.16f)
|
||||
#define AL_EAXREVERB_DEFAULT_REFLECTIONS_GAIN (0.05f)
|
||||
|
||||
#define AL_EAXREVERB_MIN_REFLECTIONS_DELAY (0.0f)
|
||||
#define AL_EAXREVERB_MAX_REFLECTIONS_DELAY (0.3f)
|
||||
#define AL_EAXREVERB_DEFAULT_REFLECTIONS_DELAY (0.007f)
|
||||
|
||||
#define AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ (0.0f)
|
||||
|
||||
#define AL_EAXREVERB_MIN_LATE_REVERB_GAIN (0.0f)
|
||||
#define AL_EAXREVERB_MAX_LATE_REVERB_GAIN (10.0f)
|
||||
#define AL_EAXREVERB_DEFAULT_LATE_REVERB_GAIN (1.26f)
|
||||
|
||||
#define AL_EAXREVERB_MIN_LATE_REVERB_DELAY (0.0f)
|
||||
#define AL_EAXREVERB_MAX_LATE_REVERB_DELAY (0.1f)
|
||||
#define AL_EAXREVERB_DEFAULT_LATE_REVERB_DELAY (0.011f)
|
||||
|
||||
#define AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ (0.0f)
|
||||
|
||||
#define AL_EAXREVERB_MIN_ECHO_TIME (0.075f)
|
||||
#define AL_EAXREVERB_MAX_ECHO_TIME (0.25f)
|
||||
#define AL_EAXREVERB_DEFAULT_ECHO_TIME (0.25f)
|
||||
|
||||
#define AL_EAXREVERB_MIN_ECHO_DEPTH (0.0f)
|
||||
#define AL_EAXREVERB_MAX_ECHO_DEPTH (1.0f)
|
||||
#define AL_EAXREVERB_DEFAULT_ECHO_DEPTH (0.0f)
|
||||
|
||||
#define AL_EAXREVERB_MIN_MODULATION_TIME (0.04f)
|
||||
#define AL_EAXREVERB_MAX_MODULATION_TIME (4.0f)
|
||||
#define AL_EAXREVERB_DEFAULT_MODULATION_TIME (0.25f)
|
||||
|
||||
#define AL_EAXREVERB_MIN_MODULATION_DEPTH (0.0f)
|
||||
#define AL_EAXREVERB_MAX_MODULATION_DEPTH (1.0f)
|
||||
#define AL_EAXREVERB_DEFAULT_MODULATION_DEPTH (0.0f)
|
||||
|
||||
#define AL_EAXREVERB_MIN_AIR_ABSORPTION_GAINHF (0.892f)
|
||||
#define AL_EAXREVERB_MAX_AIR_ABSORPTION_GAINHF (1.0f)
|
||||
#define AL_EAXREVERB_DEFAULT_AIR_ABSORPTION_GAINHF (0.994f)
|
||||
|
||||
#define AL_EAXREVERB_MIN_HFREFERENCE (1000.0f)
|
||||
#define AL_EAXREVERB_MAX_HFREFERENCE (20000.0f)
|
||||
#define AL_EAXREVERB_DEFAULT_HFREFERENCE (5000.0f)
|
||||
|
||||
#define AL_EAXREVERB_MIN_LFREFERENCE (20.0f)
|
||||
#define AL_EAXREVERB_MAX_LFREFERENCE (1000.0f)
|
||||
#define AL_EAXREVERB_DEFAULT_LFREFERENCE (250.0f)
|
||||
|
||||
#define AL_EAXREVERB_MIN_ROOM_ROLLOFF_FACTOR (0.0f)
|
||||
#define AL_EAXREVERB_MAX_ROOM_ROLLOFF_FACTOR (10.0f)
|
||||
#define AL_EAXREVERB_DEFAULT_ROOM_ROLLOFF_FACTOR (0.0f)
|
||||
|
||||
#define AL_EAXREVERB_MIN_DECAY_HFLIMIT AL_FALSE
|
||||
#define AL_EAXREVERB_MAX_DECAY_HFLIMIT AL_TRUE
|
||||
#define AL_EAXREVERB_DEFAULT_DECAY_HFLIMIT AL_TRUE
|
||||
|
||||
/* Chorus effect */
|
||||
#define AL_CHORUS_WAVEFORM_SINUSOID (0)
|
||||
#define AL_CHORUS_WAVEFORM_TRIANGLE (1)
|
||||
|
||||
#define AL_CHORUS_MIN_WAVEFORM (0)
|
||||
#define AL_CHORUS_MAX_WAVEFORM (1)
|
||||
#define AL_CHORUS_DEFAULT_WAVEFORM (1)
|
||||
|
||||
#define AL_CHORUS_MIN_PHASE (-180)
|
||||
#define AL_CHORUS_MAX_PHASE (180)
|
||||
#define AL_CHORUS_DEFAULT_PHASE (90)
|
||||
|
||||
#define AL_CHORUS_MIN_RATE (0.0f)
|
||||
#define AL_CHORUS_MAX_RATE (10.0f)
|
||||
#define AL_CHORUS_DEFAULT_RATE (1.1f)
|
||||
|
||||
#define AL_CHORUS_MIN_DEPTH (0.0f)
|
||||
#define AL_CHORUS_MAX_DEPTH (1.0f)
|
||||
#define AL_CHORUS_DEFAULT_DEPTH (0.1f)
|
||||
|
||||
#define AL_CHORUS_MIN_FEEDBACK (-1.0f)
|
||||
#define AL_CHORUS_MAX_FEEDBACK (1.0f)
|
||||
#define AL_CHORUS_DEFAULT_FEEDBACK (0.25f)
|
||||
|
||||
#define AL_CHORUS_MIN_DELAY (0.0f)
|
||||
#define AL_CHORUS_MAX_DELAY (0.016f)
|
||||
#define AL_CHORUS_DEFAULT_DELAY (0.016f)
|
||||
|
||||
/* Distortion effect */
|
||||
#define AL_DISTORTION_MIN_EDGE (0.0f)
|
||||
#define AL_DISTORTION_MAX_EDGE (1.0f)
|
||||
#define AL_DISTORTION_DEFAULT_EDGE (0.2f)
|
||||
|
||||
#define AL_DISTORTION_MIN_GAIN (0.01f)
|
||||
#define AL_DISTORTION_MAX_GAIN (1.0f)
|
||||
#define AL_DISTORTION_DEFAULT_GAIN (0.05f)
|
||||
|
||||
#define AL_DISTORTION_MIN_LOWPASS_CUTOFF (80.0f)
|
||||
#define AL_DISTORTION_MAX_LOWPASS_CUTOFF (24000.0f)
|
||||
#define AL_DISTORTION_DEFAULT_LOWPASS_CUTOFF (8000.0f)
|
||||
|
||||
#define AL_DISTORTION_MIN_EQCENTER (80.0f)
|
||||
#define AL_DISTORTION_MAX_EQCENTER (24000.0f)
|
||||
#define AL_DISTORTION_DEFAULT_EQCENTER (3600.0f)
|
||||
|
||||
#define AL_DISTORTION_MIN_EQBANDWIDTH (80.0f)
|
||||
#define AL_DISTORTION_MAX_EQBANDWIDTH (24000.0f)
|
||||
#define AL_DISTORTION_DEFAULT_EQBANDWIDTH (3600.0f)
|
||||
|
||||
/* Echo effect */
|
||||
#define AL_ECHO_MIN_DELAY (0.0f)
|
||||
#define AL_ECHO_MAX_DELAY (0.207f)
|
||||
#define AL_ECHO_DEFAULT_DELAY (0.1f)
|
||||
|
||||
#define AL_ECHO_MIN_LRDELAY (0.0f)
|
||||
#define AL_ECHO_MAX_LRDELAY (0.404f)
|
||||
#define AL_ECHO_DEFAULT_LRDELAY (0.1f)
|
||||
|
||||
#define AL_ECHO_MIN_DAMPING (0.0f)
|
||||
#define AL_ECHO_MAX_DAMPING (0.99f)
|
||||
#define AL_ECHO_DEFAULT_DAMPING (0.5f)
|
||||
|
||||
#define AL_ECHO_MIN_FEEDBACK (0.0f)
|
||||
#define AL_ECHO_MAX_FEEDBACK (1.0f)
|
||||
#define AL_ECHO_DEFAULT_FEEDBACK (0.5f)
|
||||
|
||||
#define AL_ECHO_MIN_SPREAD (-1.0f)
|
||||
#define AL_ECHO_MAX_SPREAD (1.0f)
|
||||
#define AL_ECHO_DEFAULT_SPREAD (-1.0f)
|
||||
|
||||
/* Flanger effect */
|
||||
#define AL_FLANGER_WAVEFORM_SINUSOID (0)
|
||||
#define AL_FLANGER_WAVEFORM_TRIANGLE (1)
|
||||
|
||||
#define AL_FLANGER_MIN_WAVEFORM (0)
|
||||
#define AL_FLANGER_MAX_WAVEFORM (1)
|
||||
#define AL_FLANGER_DEFAULT_WAVEFORM (1)
|
||||
|
||||
#define AL_FLANGER_MIN_PHASE (-180)
|
||||
#define AL_FLANGER_MAX_PHASE (180)
|
||||
#define AL_FLANGER_DEFAULT_PHASE (0)
|
||||
|
||||
#define AL_FLANGER_MIN_RATE (0.0f)
|
||||
#define AL_FLANGER_MAX_RATE (10.0f)
|
||||
#define AL_FLANGER_DEFAULT_RATE (0.27f)
|
||||
|
||||
#define AL_FLANGER_MIN_DEPTH (0.0f)
|
||||
#define AL_FLANGER_MAX_DEPTH (1.0f)
|
||||
#define AL_FLANGER_DEFAULT_DEPTH (1.0f)
|
||||
|
||||
#define AL_FLANGER_MIN_FEEDBACK (-1.0f)
|
||||
#define AL_FLANGER_MAX_FEEDBACK (1.0f)
|
||||
#define AL_FLANGER_DEFAULT_FEEDBACK (-0.5f)
|
||||
|
||||
#define AL_FLANGER_MIN_DELAY (0.0f)
|
||||
#define AL_FLANGER_MAX_DELAY (0.004f)
|
||||
#define AL_FLANGER_DEFAULT_DELAY (0.002f)
|
||||
|
||||
/* Frequency shifter effect */
|
||||
#define AL_FREQUENCY_SHIFTER_MIN_FREQUENCY (0.0f)
|
||||
#define AL_FREQUENCY_SHIFTER_MAX_FREQUENCY (24000.0f)
|
||||
#define AL_FREQUENCY_SHIFTER_DEFAULT_FREQUENCY (0.0f)
|
||||
|
||||
#define AL_FREQUENCY_SHIFTER_MIN_LEFT_DIRECTION (0)
|
||||
#define AL_FREQUENCY_SHIFTER_MAX_LEFT_DIRECTION (2)
|
||||
#define AL_FREQUENCY_SHIFTER_DEFAULT_LEFT_DIRECTION (0)
|
||||
|
||||
#define AL_FREQUENCY_SHIFTER_DIRECTION_DOWN (0)
|
||||
#define AL_FREQUENCY_SHIFTER_DIRECTION_UP (1)
|
||||
#define AL_FREQUENCY_SHIFTER_DIRECTION_OFF (2)
|
||||
|
||||
#define AL_FREQUENCY_SHIFTER_MIN_RIGHT_DIRECTION (0)
|
||||
#define AL_FREQUENCY_SHIFTER_MAX_RIGHT_DIRECTION (2)
|
||||
#define AL_FREQUENCY_SHIFTER_DEFAULT_RIGHT_DIRECTION (0)
|
||||
|
||||
/* Vocal morpher effect */
|
||||
#define AL_VOCAL_MORPHER_MIN_PHONEMEA (0)
|
||||
#define AL_VOCAL_MORPHER_MAX_PHONEMEA (29)
|
||||
#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEA (0)
|
||||
|
||||
#define AL_VOCAL_MORPHER_MIN_PHONEMEA_COARSE_TUNING (-24)
|
||||
#define AL_VOCAL_MORPHER_MAX_PHONEMEA_COARSE_TUNING (24)
|
||||
#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEA_COARSE_TUNING (0)
|
||||
|
||||
#define AL_VOCAL_MORPHER_MIN_PHONEMEB (0)
|
||||
#define AL_VOCAL_MORPHER_MAX_PHONEMEB (29)
|
||||
#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEB (10)
|
||||
|
||||
#define AL_VOCAL_MORPHER_MIN_PHONEMEB_COARSE_TUNING (-24)
|
||||
#define AL_VOCAL_MORPHER_MAX_PHONEMEB_COARSE_TUNING (24)
|
||||
#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEB_COARSE_TUNING (0)
|
||||
|
||||
#define AL_VOCAL_MORPHER_PHONEME_A (0)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_E (1)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_I (2)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_O (3)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_U (4)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_AA (5)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_AE (6)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_AH (7)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_AO (8)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_EH (9)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_ER (10)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_IH (11)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_IY (12)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_UH (13)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_UW (14)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_B (15)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_D (16)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_F (17)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_G (18)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_J (19)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_K (20)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_L (21)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_M (22)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_N (23)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_P (24)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_R (25)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_S (26)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_T (27)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_V (28)
|
||||
#define AL_VOCAL_MORPHER_PHONEME_Z (29)
|
||||
|
||||
#define AL_VOCAL_MORPHER_WAVEFORM_SINUSOID (0)
|
||||
#define AL_VOCAL_MORPHER_WAVEFORM_TRIANGLE (1)
|
||||
#define AL_VOCAL_MORPHER_WAVEFORM_SAWTOOTH (2)
|
||||
|
||||
#define AL_VOCAL_MORPHER_MIN_WAVEFORM (0)
|
||||
#define AL_VOCAL_MORPHER_MAX_WAVEFORM (2)
|
||||
#define AL_VOCAL_MORPHER_DEFAULT_WAVEFORM (0)
|
||||
|
||||
#define AL_VOCAL_MORPHER_MIN_RATE (0.0f)
|
||||
#define AL_VOCAL_MORPHER_MAX_RATE (10.0f)
|
||||
#define AL_VOCAL_MORPHER_DEFAULT_RATE (1.41f)
|
||||
|
||||
/* Pitch shifter effect */
|
||||
#define AL_PITCH_SHIFTER_MIN_COARSE_TUNE (-12)
|
||||
#define AL_PITCH_SHIFTER_MAX_COARSE_TUNE (12)
|
||||
#define AL_PITCH_SHIFTER_DEFAULT_COARSE_TUNE (12)
|
||||
|
||||
#define AL_PITCH_SHIFTER_MIN_FINE_TUNE (-50)
|
||||
#define AL_PITCH_SHIFTER_MAX_FINE_TUNE (50)
|
||||
#define AL_PITCH_SHIFTER_DEFAULT_FINE_TUNE (0)
|
||||
|
||||
/* Ring modulator effect */
|
||||
#define AL_RING_MODULATOR_MIN_FREQUENCY (0.0f)
|
||||
#define AL_RING_MODULATOR_MAX_FREQUENCY (8000.0f)
|
||||
#define AL_RING_MODULATOR_DEFAULT_FREQUENCY (440.0f)
|
||||
|
||||
#define AL_RING_MODULATOR_MIN_HIGHPASS_CUTOFF (0.0f)
|
||||
#define AL_RING_MODULATOR_MAX_HIGHPASS_CUTOFF (24000.0f)
|
||||
#define AL_RING_MODULATOR_DEFAULT_HIGHPASS_CUTOFF (800.0f)
|
||||
|
||||
#define AL_RING_MODULATOR_SINUSOID (0)
|
||||
#define AL_RING_MODULATOR_SAWTOOTH (1)
|
||||
#define AL_RING_MODULATOR_SQUARE (2)
|
||||
|
||||
#define AL_RING_MODULATOR_MIN_WAVEFORM (0)
|
||||
#define AL_RING_MODULATOR_MAX_WAVEFORM (2)
|
||||
#define AL_RING_MODULATOR_DEFAULT_WAVEFORM (0)
|
||||
|
||||
/* Autowah effect */
|
||||
#define AL_AUTOWAH_MIN_ATTACK_TIME (0.0001f)
|
||||
#define AL_AUTOWAH_MAX_ATTACK_TIME (1.0f)
|
||||
#define AL_AUTOWAH_DEFAULT_ATTACK_TIME (0.06f)
|
||||
|
||||
#define AL_AUTOWAH_MIN_RELEASE_TIME (0.0001f)
|
||||
#define AL_AUTOWAH_MAX_RELEASE_TIME (1.0f)
|
||||
#define AL_AUTOWAH_DEFAULT_RELEASE_TIME (0.06f)
|
||||
|
||||
#define AL_AUTOWAH_MIN_RESONANCE (2.0f)
|
||||
#define AL_AUTOWAH_MAX_RESONANCE (1000.0f)
|
||||
#define AL_AUTOWAH_DEFAULT_RESONANCE (1000.0f)
|
||||
|
||||
#define AL_AUTOWAH_MIN_PEAK_GAIN (0.00003f)
|
||||
#define AL_AUTOWAH_MAX_PEAK_GAIN (31621.0f)
|
||||
#define AL_AUTOWAH_DEFAULT_PEAK_GAIN (11.22f)
|
||||
|
||||
/* Compressor effect */
|
||||
#define AL_COMPRESSOR_MIN_ONOFF (0)
|
||||
#define AL_COMPRESSOR_MAX_ONOFF (1)
|
||||
#define AL_COMPRESSOR_DEFAULT_ONOFF (1)
|
||||
|
||||
/* Equalizer effect */
|
||||
#define AL_EQUALIZER_MIN_LOW_GAIN (0.126f)
|
||||
#define AL_EQUALIZER_MAX_LOW_GAIN (7.943f)
|
||||
#define AL_EQUALIZER_DEFAULT_LOW_GAIN (1.0f)
|
||||
|
||||
#define AL_EQUALIZER_MIN_LOW_CUTOFF (50.0f)
|
||||
#define AL_EQUALIZER_MAX_LOW_CUTOFF (800.0f)
|
||||
#define AL_EQUALIZER_DEFAULT_LOW_CUTOFF (200.0f)
|
||||
|
||||
#define AL_EQUALIZER_MIN_MID1_GAIN (0.126f)
|
||||
#define AL_EQUALIZER_MAX_MID1_GAIN (7.943f)
|
||||
#define AL_EQUALIZER_DEFAULT_MID1_GAIN (1.0f)
|
||||
|
||||
#define AL_EQUALIZER_MIN_MID1_CENTER (200.0f)
|
||||
#define AL_EQUALIZER_MAX_MID1_CENTER (3000.0f)
|
||||
#define AL_EQUALIZER_DEFAULT_MID1_CENTER (500.0f)
|
||||
|
||||
#define AL_EQUALIZER_MIN_MID1_WIDTH (0.01f)
|
||||
#define AL_EQUALIZER_MAX_MID1_WIDTH (1.0f)
|
||||
#define AL_EQUALIZER_DEFAULT_MID1_WIDTH (1.0f)
|
||||
|
||||
#define AL_EQUALIZER_MIN_MID2_GAIN (0.126f)
|
||||
#define AL_EQUALIZER_MAX_MID2_GAIN (7.943f)
|
||||
#define AL_EQUALIZER_DEFAULT_MID2_GAIN (1.0f)
|
||||
|
||||
#define AL_EQUALIZER_MIN_MID2_CENTER (1000.0f)
|
||||
#define AL_EQUALIZER_MAX_MID2_CENTER (8000.0f)
|
||||
#define AL_EQUALIZER_DEFAULT_MID2_CENTER (3000.0f)
|
||||
|
||||
#define AL_EQUALIZER_MIN_MID2_WIDTH (0.01f)
|
||||
#define AL_EQUALIZER_MAX_MID2_WIDTH (1.0f)
|
||||
#define AL_EQUALIZER_DEFAULT_MID2_WIDTH (1.0f)
|
||||
|
||||
#define AL_EQUALIZER_MIN_HIGH_GAIN (0.126f)
|
||||
#define AL_EQUALIZER_MAX_HIGH_GAIN (7.943f)
|
||||
#define AL_EQUALIZER_DEFAULT_HIGH_GAIN (1.0f)
|
||||
|
||||
#define AL_EQUALIZER_MIN_HIGH_CUTOFF (4000.0f)
|
||||
#define AL_EQUALIZER_MAX_HIGH_CUTOFF (16000.0f)
|
||||
#define AL_EQUALIZER_DEFAULT_HIGH_CUTOFF (6000.0f)
|
||||
|
||||
|
||||
/* Source parameter value ranges and defaults. */
|
||||
#define AL_MIN_AIR_ABSORPTION_FACTOR (0.0f)
|
||||
#define AL_MAX_AIR_ABSORPTION_FACTOR (10.0f)
|
||||
#define AL_DEFAULT_AIR_ABSORPTION_FACTOR (0.0f)
|
||||
|
||||
#define AL_MIN_ROOM_ROLLOFF_FACTOR (0.0f)
|
||||
#define AL_MAX_ROOM_ROLLOFF_FACTOR (10.0f)
|
||||
#define AL_DEFAULT_ROOM_ROLLOFF_FACTOR (0.0f)
|
||||
|
||||
#define AL_MIN_CONE_OUTER_GAINHF (0.0f)
|
||||
#define AL_MAX_CONE_OUTER_GAINHF (1.0f)
|
||||
#define AL_DEFAULT_CONE_OUTER_GAINHF (1.0f)
|
||||
|
||||
#define AL_MIN_DIRECT_FILTER_GAINHF_AUTO AL_FALSE
|
||||
#define AL_MAX_DIRECT_FILTER_GAINHF_AUTO AL_TRUE
|
||||
#define AL_DEFAULT_DIRECT_FILTER_GAINHF_AUTO AL_TRUE
|
||||
|
||||
#define AL_MIN_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_FALSE
|
||||
#define AL_MAX_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_TRUE
|
||||
#define AL_DEFAULT_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_TRUE
|
||||
|
||||
#define AL_MIN_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_FALSE
|
||||
#define AL_MAX_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_TRUE
|
||||
#define AL_DEFAULT_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_TRUE
|
||||
|
||||
|
||||
/* Listener parameter value ranges and defaults. */
|
||||
#define AL_MIN_METERS_PER_UNIT FLT_MIN
|
||||
#define AL_MAX_METERS_PER_UNIT FLT_MAX
|
||||
#define AL_DEFAULT_METERS_PER_UNIT (1.0f)
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* AL_EFX_H */
|
398
Engine/ExtIncludes/physX3/windows/PxActor.h
Normal file
|
@ -0,0 +1,398 @@
|
|||
// This code contains NVIDIA Confidential Information and is disclosed to you
|
||||
// under a form of NVIDIA software license agreement provided separately to you.
|
||||
//
|
||||
// Notice
|
||||
// NVIDIA Corporation and its licensors retain all intellectual property and
|
||||
// proprietary rights in and to this software and related documentation and
|
||||
// any modifications thereto. Any use, reproduction, disclosure, or
|
||||
// distribution of this software and related documentation without an express
|
||||
// license agreement from NVIDIA Corporation is strictly prohibited.
|
||||
//
|
||||
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
|
||||
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
|
||||
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
|
||||
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// Information and code furnished is believed to be accurate and reliable.
|
||||
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
|
||||
// information or for any infringement of patents or other rights of third parties that may
|
||||
// result from its use. No license is granted by implication or otherwise under any patent
|
||||
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
|
||||
// This code supersedes and replaces all information previously supplied.
|
||||
// NVIDIA Corporation products are not authorized for use as critical
|
||||
// components in life support devices or systems without express written approval of
|
||||
// NVIDIA Corporation.
|
||||
//
|
||||
// Copyright (c) 2008-2013 NVIDIA Corporation. All rights reserved.
|
||||
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
|
||||
|
||||
|
||||
#ifndef PX_PHYSICS_NX_ACTOR
|
||||
#define PX_PHYSICS_NX_ACTOR
|
||||
|
||||
/** \addtogroup physics
|
||||
@{
|
||||
*/
|
||||
|
||||
#include "PxPhysX.h"
|
||||
#include "foundation/PxBounds3.h"
|
||||
#include "PxPhysics.h"
|
||||
#include "PxObserver.h"
|
||||
#include "PxClient.h"
|
||||
#include "common/PxSerialFramework.h"
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
namespace physx
|
||||
{
|
||||
#endif
|
||||
|
||||
class PxRigidActor;
|
||||
class PxRigidBody;
|
||||
class PxRigidStatic;
|
||||
class PxRigidDynamic;
|
||||
class PxParticleBase;
|
||||
class PxParticleSystem;
|
||||
class PxParticleFluid;
|
||||
class PxArticulation;
|
||||
class PxArticulationLink;
|
||||
|
||||
|
||||
/** Group index which allows to specify 1- or 2-way interaction */
|
||||
typedef PxU8 PxDominanceGroup; // Must be < 32, PxU8.
|
||||
|
||||
/**
|
||||
\brief Flags which control the behavior of an actor.
|
||||
|
||||
@see PxActorFlags PxActor PxActor.setActorFlag() PxActor.getActorFlags()
|
||||
*/
|
||||
struct PxActorFlag
|
||||
{
|
||||
enum Enum
|
||||
{
|
||||
/**
|
||||
\brief Enable debug renderer for this actor
|
||||
|
||||
@see PxScene.getRenderBuffer() PxRenderBuffer PxVisualizationParameter
|
||||
*/
|
||||
eVISUALIZATION = (1<<0),
|
||||
|
||||
/**
|
||||
\brief Disables scene gravity for this actor
|
||||
*/
|
||||
eDISABLE_GRAVITY = (1<<1),
|
||||
|
||||
/**
|
||||
\brief Enables the sending of PxSimulationEventCallback::onWake() and PxSimulationEventCallback::onSleep() notify events
|
||||
|
||||
@see PxSimulationEventCallback::onWake() PxSimulationEventCallback::onSleep()
|
||||
*/
|
||||
eSEND_SLEEP_NOTIFIES = (1<<2)
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
\brief collection of set bits defined in PxActorFlag.
|
||||
|
||||
@see PxActorFlag
|
||||
*/
|
||||
typedef PxFlags<PxActorFlag::Enum,PxU16> PxActorFlags;
|
||||
PX_FLAGS_OPERATORS(PxActorFlag::Enum,PxU16);
|
||||
|
||||
/**
|
||||
\brief Identifies each type of actor.
|
||||
@see PxActor
|
||||
*/
|
||||
struct PxActorType
|
||||
{
|
||||
enum Enum
|
||||
{
|
||||
/**
|
||||
\brief A static rigid body
|
||||
@see PxRigidStatic
|
||||
*/
|
||||
eRIGID_STATIC,
|
||||
|
||||
/**
|
||||
\brief A dynamic rigid body
|
||||
@see PxRigidDynamic
|
||||
*/
|
||||
eRIGID_DYNAMIC,
|
||||
|
||||
#if PX_USE_PARTICLE_SYSTEM_API
|
||||
/**
|
||||
\brief A particle system
|
||||
@see PxParticleSystem
|
||||
*/
|
||||
ePARTICLE_SYSTEM,
|
||||
|
||||
/**
|
||||
\brief A particle fluid
|
||||
@see PxParticleFluid
|
||||
*/
|
||||
ePARTICLE_FLUID,
|
||||
#endif
|
||||
|
||||
/**
|
||||
\brief An articulation link
|
||||
@see PxArticulationLink
|
||||
*/
|
||||
eARTICULATION_LINK,
|
||||
|
||||
#if PX_USE_CLOTH_API
|
||||
/**
|
||||
\brief A cloth
|
||||
@see PxCloth
|
||||
*/
|
||||
eCLOTH,
|
||||
#endif
|
||||
|
||||
//brief internal use only!
|
||||
eACTOR_COUNT,
|
||||
|
||||
eACTOR_FORCE_DWORD = 0x7fffffff
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
\brief PxActor is the base class for the main simulation objects in the physics SDK.
|
||||
|
||||
The actor is owned by and contained in a PxScene.
|
||||
|
||||
*/
|
||||
|
||||
class PxActor : public PxSerializable, public PxObservable
|
||||
{
|
||||
public:
|
||||
/**
|
||||
\brief Deletes the actor.
|
||||
|
||||
Do not keep a reference to the deleted instance.
|
||||
|
||||
<b>Sleeping:</b> If this is a PxRigidActor, this call will awaken any sleeping actors contacting the deleted actor (directly or indirectly).
|
||||
|
||||
If the actor belongs to a #PxAggregate object, it is automatically removed from the aggregate.
|
||||
|
||||
@see PxScene::createRigidStatic(), PxScene::createRigidDynamic(), PxScene::createParticleSystem(),
|
||||
PxScene::createParticleFluid(), PxAggregate
|
||||
*/
|
||||
virtual void release() = 0;
|
||||
|
||||
/**
|
||||
\brief Retrieves the type of actor.
|
||||
|
||||
\return The actor type of the actor.
|
||||
|
||||
@see PxActorType
|
||||
*/
|
||||
virtual PxActorType::Enum getType() const = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief Attempts to cast to specific actor type.
|
||||
|
||||
\return NULL if the actor is not of the appropriate type. Otherwise a pointer to the specific actor type.
|
||||
|
||||
\note Since PxParticleFluid inherits from PxParticleSystem, calling isParticleSystem() on a PxParticleFluid instance will
|
||||
succeed and return the upcast to PxParticleSystem.
|
||||
|
||||
@see PxActorType PxRigidActor PxRigidBody PxRigidStatic PxRigidDynamic PxParticleBase PxParticleSystem PxParticleFluid
|
||||
*/
|
||||
PX_DEPRECATED PX_INLINE PxRigidStatic* isRigidStatic();
|
||||
PX_DEPRECATED PX_INLINE const PxRigidStatic* isRigidStatic() const;
|
||||
PX_DEPRECATED PX_INLINE PxRigidDynamic* isRigidDynamic();
|
||||
PX_DEPRECATED PX_INLINE const PxRigidDynamic* isRigidDynamic() const;
|
||||
PX_DEPRECATED PX_INLINE PxParticleSystem* isParticleSystem();
|
||||
PX_DEPRECATED PX_INLINE const PxParticleSystem* isParticleSystem() const;
|
||||
PX_DEPRECATED PX_INLINE PxParticleFluid* isParticleFluid();
|
||||
PX_DEPRECATED PX_INLINE const PxParticleFluid* isParticleFluid() const;
|
||||
PX_DEPRECATED PX_INLINE PxArticulationLink* isArticulationLink();
|
||||
PX_DEPRECATED PX_INLINE const PxArticulationLink* isArticulationLink() const;
|
||||
PX_DEPRECATED PX_INLINE PxCloth* isCloth();
|
||||
PX_DEPRECATED PX_INLINE const PxCloth* isCloth() const;
|
||||
|
||||
PX_DEPRECATED PX_INLINE PxRigidActor* isRigidActor();
|
||||
PX_DEPRECATED PX_INLINE const PxRigidActor* isRigidActor() const;
|
||||
PX_DEPRECATED PX_INLINE PxRigidBody* isRigidBody();
|
||||
PX_DEPRECATED PX_INLINE const PxRigidBody* isRigidBody() const;
|
||||
PX_DEPRECATED PX_INLINE PxParticleBase* isParticleBase();
|
||||
PX_DEPRECATED PX_INLINE const PxParticleBase* isParticleBase() const;
|
||||
|
||||
/**
|
||||
\brief Retrieves the scene which this actor belongs to.
|
||||
|
||||
\return Owner Scene. NULL if not part of a scene.
|
||||
|
||||
@see PxScene
|
||||
*/
|
||||
virtual PxScene* getScene() const = 0;
|
||||
|
||||
// Runtime modifications
|
||||
|
||||
/**
|
||||
\brief Sets a name string for the object that can be retrieved with getName().
|
||||
|
||||
This is for debugging and is not used by the SDK. The string is not copied by the SDK,
|
||||
only the pointer is stored.
|
||||
|
||||
\param[in] name String to set the objects name to.
|
||||
|
||||
<b>Default:</b> NULL
|
||||
|
||||
@see getName()
|
||||
*/
|
||||
virtual void setName(const char* name) = 0;
|
||||
|
||||
/**
|
||||
\brief Retrieves the name string set with setName().
|
||||
|
||||
\return Name string associated with object.
|
||||
|
||||
@see setName()
|
||||
*/
|
||||
virtual const char* getName() const = 0;
|
||||
|
||||
/**
|
||||
\brief Retrieves the axis aligned bounding box enclosing the actor.
|
||||
|
||||
\return The actor's bounding box.
|
||||
|
||||
@see PxBounds3
|
||||
*/
|
||||
virtual PxBounds3 getWorldBounds() const = 0;
|
||||
|
||||
/**
|
||||
\brief Raises or clears a particular actor flag.
|
||||
|
||||
See the list of flags #PxActorFlag
|
||||
|
||||
<b>Sleeping:</b> Does <b>NOT</b> wake the actor up automatically.
|
||||
|
||||
\param[in] flag The PxActor flag to raise(set) or clear. See #PxActorFlag.
|
||||
\param[in] value The boolean value to assign to the flag.
|
||||
|
||||
<b>Default:</b> PxActorFlag::eVISUALIZATION
|
||||
|
||||
@see PxActorFlag getActorFlags()
|
||||
*/
|
||||
virtual void setActorFlag(PxActorFlag::Enum flag, bool value) = 0;
|
||||
/**
|
||||
\brief sets the actor flags
|
||||
|
||||
See the list of flags #PxActorFlag
|
||||
@see PxActorFlag setActorFlag()
|
||||
*/
|
||||
virtual void setActorFlags( PxActorFlags inFlags ) = 0;
|
||||
|
||||
/**
|
||||
\brief Reads the PxActor flags.
|
||||
|
||||
See the list of flags #PxActorFlag
|
||||
|
||||
\return The values of the PxActor flags.
|
||||
|
||||
@see PxActorFlag setActorFlag()
|
||||
*/
|
||||
virtual PxActorFlags getActorFlags() const = 0;
|
||||
|
||||
/**
|
||||
\brief Assigns dynamic actors a dominance group identifier.
|
||||
|
||||
PxDominanceGroup is a 5 bit group identifier (legal range from 0 to 31).
|
||||
|
||||
The PxScene::setDominanceGroupPair() lets you set certain behaviors for pairs of dominance groups.
|
||||
By default every dynamic actor is created in group 0.
|
||||
|
||||
<b>Default:</b> 0
|
||||
|
||||
<b>Sleeping:</b> Changing the dominance group does <b>NOT</b> wake the actor up automatically.
|
||||
|
||||
\param[in] dominanceGroup The dominance group identifier. <b>Range:</b> [0..31]
|
||||
|
||||
@see getDominanceGroup() PxDominanceGroup PxScene::setDominanceGroupPair()
|
||||
*/
|
||||
virtual void setDominanceGroup(PxDominanceGroup dominanceGroup) = 0;
|
||||
|
||||
/**
|
||||
\brief Retrieves the value set with setDominanceGroup().
|
||||
|
||||
\return The dominance group of this actor.
|
||||
|
||||
@see setDominanceGroup() PxDominanceGroup PxScene::setDominanceGroupPair()
|
||||
*/
|
||||
virtual PxDominanceGroup getDominanceGroup() const = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief Sets the owner client of an actor.
|
||||
|
||||
This cannot be done once the actor has been placed into a scene.
|
||||
|
||||
<b>Default:</b> PX_DEFAULT_CLIENT
|
||||
|
||||
@see PxClientID
|
||||
*/
|
||||
virtual void setOwnerClient( PxClientID inClient ) = 0;
|
||||
|
||||
/**
|
||||
\brief Returns the owner client that was specified with at creation time.
|
||||
|
||||
This value cannot be changed once the object is placed into the scene.
|
||||
|
||||
@see PxClientID
|
||||
*/
|
||||
virtual PxClientID getOwnerClient() const = 0;
|
||||
|
||||
/**
|
||||
\brief Sets the behavior bits of the actor.
|
||||
|
||||
The behavior bits determine which types of events the actor will broadcast to foreign clients.
|
||||
The actor will always send notice for all possible events to its own owner client. By default
|
||||
it will not send any events to any other clients. If the user however raises a bit flag for
|
||||
any event type using this function, that event will then be sent also to any other clients which
|
||||
are programmed to listed to foreign actor events of that type.
|
||||
|
||||
<b>Default:</b> 0
|
||||
|
||||
@see PxClientID PxActorClientBehaviorBit PxScene::setClientBehaviorBits()
|
||||
*/
|
||||
virtual void setClientBehaviorBits(PxU32) = 0;
|
||||
|
||||
/**
|
||||
\brief Retrieves the behavior bits of the actor.
|
||||
|
||||
The behavior bits determine which types of events the actor will broadcast to foreign clients.
|
||||
|
||||
@see PxActorClientBehaviorBit setClientBehaviorBits
|
||||
*/
|
||||
virtual PxU32 getClientBehaviorBits() const = 0;
|
||||
|
||||
/**
|
||||
\brief Retrieves the aggregate the actor might be a part of.
|
||||
|
||||
\return The aggregate the actor is a part of, or NULL if the actor does not belong to an aggregate.
|
||||
|
||||
@see PxAggregate
|
||||
*/
|
||||
virtual PxAggregate* getAggregate() const = 0;
|
||||
|
||||
//public variables:
|
||||
void* userData; //!< user can assign this to whatever, usually to create a 1:1 relationship with a user object.
|
||||
|
||||
|
||||
protected:
|
||||
PxActor(PxRefResolver& v) : PxSerializable(v) {}
|
||||
PX_INLINE PxActor() : userData(NULL) {}
|
||||
virtual ~PxActor() {}
|
||||
virtual bool isKindOf(const char* name) const { return !strcmp("PxActor", name) || PxSerializable::isKindOf(name); }
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
} // namespace physx
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif
|
204
Engine/ExtIncludes/physX3/windows/PxAggregate.h
Normal file
|
@ -0,0 +1,204 @@
|
|||
// This code contains NVIDIA Confidential Information and is disclosed to you
|
||||
// under a form of NVIDIA software license agreement provided separately to you.
|
||||
//
|
||||
// Notice
|
||||
// NVIDIA Corporation and its licensors retain all intellectual property and
|
||||
// proprietary rights in and to this software and related documentation and
|
||||
// any modifications thereto. Any use, reproduction, disclosure, or
|
||||
// distribution of this software and related documentation without an express
|
||||
// license agreement from NVIDIA Corporation is strictly prohibited.
|
||||
//
|
||||
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
|
||||
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
|
||||
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
|
||||
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// Information and code furnished is believed to be accurate and reliable.
|
||||
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
|
||||
// information or for any infringement of patents or other rights of third parties that may
|
||||
// result from its use. No license is granted by implication or otherwise under any patent
|
||||
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
|
||||
// This code supersedes and replaces all information previously supplied.
|
||||
// NVIDIA Corporation products are not authorized for use as critical
|
||||
// components in life support devices or systems without express written approval of
|
||||
// NVIDIA Corporation.
|
||||
//
|
||||
// Copyright (c) 2008-2013 NVIDIA Corporation. All rights reserved.
|
||||
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
|
||||
|
||||
|
||||
#ifndef PX_PHYSICS_NX_AGGREGATE
|
||||
#define PX_PHYSICS_NX_AGGREGATE
|
||||
|
||||
/** \addtogroup physics
|
||||
@{
|
||||
*/
|
||||
|
||||
#include "PxPhysX.h"
|
||||
#include "common/PxSerialFramework.h"
|
||||
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
namespace physx
|
||||
{
|
||||
#endif
|
||||
|
||||
class PxActor;
|
||||
|
||||
/**
|
||||
\brief Class to aggregate actors into a single broad phase entry.
|
||||
|
||||
A PxAggregate object is a collection of PxActors, which will exist as a single entry in the
|
||||
broad-phase structures. This has 3 main benefits:
|
||||
|
||||
1) it reduces "broad phase pollution", where multiple objects of a single entity often overlap
|
||||
all the time (e.g. typically in a ragdoll).
|
||||
|
||||
2) it reduces broad-phase memory usage (which can be vital e.g. on SPU)
|
||||
|
||||
3) filtering can be optimized a lot if self-collisions within an aggregate are not needed. For
|
||||
example if you don't need collisions between ragdoll bones, it's faster to simply disable
|
||||
filtering once and for all, for the aggregate containing the ragdoll, rather than filtering
|
||||
out each bone-bone collision in the filter shader.
|
||||
|
||||
@see PxActor
|
||||
*/
|
||||
|
||||
class PxAggregate : public PxSerializable
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
\brief Deletes the aggregate object.
|
||||
|
||||
Deleting the PxAggregate object does not delete the aggregated actors. If the PxAggregate object
|
||||
belongs to a scene, the aggregated actors are automatically re-inserted in that scene. If you intend
|
||||
to delete both the PxAggregate and its actors, it is best to release the actors first, then release
|
||||
the PxAggregate when it is empty.
|
||||
*/
|
||||
virtual void release() = 0;
|
||||
|
||||
/**
|
||||
\brief Adds an actor to the aggregate object.
|
||||
|
||||
A warning is output if the total number of actors is reached, or if the incoming actor already belongs
|
||||
to an aggregate.
|
||||
|
||||
If the aggregate belongs to a scene, adding an actor to the aggregate also adds the actor to that scene.
|
||||
|
||||
If the actor already belongs to a scene, a warning is output and the call is ignored. You need to remove
|
||||
the actor from the scene first, before adding it to the aggregate.
|
||||
|
||||
\param [in] actor The actor that should be added to the aggregate
|
||||
return true if success
|
||||
*/
|
||||
virtual bool addActor(PxActor& actor) = 0;
|
||||
|
||||
/**
|
||||
\brief Removes an actor from the aggregate object.
|
||||
|
||||
A warning is output if the incoming actor does not belong to the aggregate. Otherwise the actor is
|
||||
removed from the aggregate. If the aggregate belongs to a scene, the actor is reinserted in that
|
||||
scene. If you intend to delete the actor, it is best to call #PxActor::release() directly. That way
|
||||
the actor will be automatically removed from its aggregate (if any) and not reinserted in a scene.
|
||||
|
||||
\param [in] actor The actor that should be removed from the aggregate
|
||||
return true if success
|
||||
*/
|
||||
virtual bool removeActor(PxActor& actor) = 0;
|
||||
|
||||
/**
|
||||
\brief Adds an articulation to the aggregate object.
|
||||
|
||||
A warning is output if the total number of actors is reached (every articulation link counts as an actor),
|
||||
or if the incoming articulation already belongs to an aggregate.
|
||||
|
||||
If the aggregate belongs to a scene, adding an articulation to the aggregate also adds the articulation to that scene.
|
||||
|
||||
If the articulation already belongs to a scene, a warning is output and the call is ignored. You need to remove
|
||||
the articulation from the scene first, before adding it to the aggregate.
|
||||
|
||||
\param [in] articulation The articulation that should be added to the aggregate
|
||||
return true if success
|
||||
*/
|
||||
virtual bool addArticulation(PxArticulation& articulation) = 0;
|
||||
|
||||
/**
|
||||
\brief Removes an articulation from the aggregate object.
|
||||
|
||||
A warning is output if the incoming articulation does not belong to the aggregate. Otherwise the articulation is
|
||||
removed from the aggregate. If the aggregate belongs to a scene, the articulation is reinserted in that
|
||||
scene. If you intend to delete the articulation, it is best to call #PxArticulation::release() directly. That way
|
||||
the articulation will be automatically removed from its aggregate (if any) and not reinserted in a scene.
|
||||
|
||||
\param [in] articulation The articulation that should be removed from the aggregate
|
||||
return true if success
|
||||
*/
|
||||
virtual bool removeArticulation(PxArticulation& articulation) = 0;
|
||||
|
||||
/**
|
||||
\brief Returns the number of actors contained in the aggregate.
|
||||
|
||||
You can use #getActors() to retrieve the actor pointers.
|
||||
|
||||
\return Number of actors contained in the aggregate.
|
||||
|
||||
@see PxActor getActors()
|
||||
*/
|
||||
virtual PxU32 getNbActors() const = 0;
|
||||
|
||||
/**
|
||||
\brief Retrieves max amount of actors that can be contained in the aggregate.
|
||||
|
||||
\return Max aggregate size.
|
||||
|
||||
@see PxPhysics::createAggregate()
|
||||
*/
|
||||
virtual PxU32 getMaxNbActors() const = 0;
|
||||
|
||||
/**
|
||||
\brief Retrieve all actors contained in the aggregate.
|
||||
|
||||
You can retrieve the number of actor pointers by calling #getNbActors()
|
||||
|
||||
\param[out] userBuffer The buffer to store the actor pointers.
|
||||
\param[in] bufferSize Size of provided user buffer.
|
||||
\param[in] startIndex Index of first actor pointer to be retrieved
|
||||
\return Number of actor pointers written to the buffer.
|
||||
|
||||
@see PxShape getNbShapes()
|
||||
*/
|
||||
virtual PxU32 getActors(PxActor** userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const = 0;
|
||||
|
||||
/**
|
||||
\brief Retrieves the scene which this aggregate belongs to.
|
||||
|
||||
\return Owner Scene. NULL if not part of a scene.
|
||||
|
||||
@see PxScene
|
||||
*/
|
||||
virtual PxScene* getScene() = 0;
|
||||
|
||||
/**
|
||||
\brief Retrieves aggregate's self-collision flag.
|
||||
|
||||
\return self-collision flag
|
||||
*/
|
||||
virtual bool getSelfCollision() const = 0;
|
||||
|
||||
virtual const char* getConcreteTypeName() const { return "PxAggregate"; }
|
||||
|
||||
protected:
|
||||
PxAggregate(PxRefResolver& v) : PxSerializable(v) {}
|
||||
PxAggregate() {}
|
||||
virtual ~PxAggregate() {}
|
||||
virtual bool isKindOf(const char* name) const { return !strcmp("PxAggregate", name) || PxSerializable::isKindOf(name); }
|
||||
};
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
} // namespace physx
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif
|
454
Engine/ExtIncludes/physX3/windows/PxArticulation.h
Normal file
|
@ -0,0 +1,454 @@
|
|||
// This code contains NVIDIA Confidential Information and is disclosed to you
|
||||
// under a form of NVIDIA software license agreement provided separately to you.
|
||||
//
|
||||
// Notice
|
||||
// NVIDIA Corporation and its licensors retain all intellectual property and
|
||||
// proprietary rights in and to this software and related documentation and
|
||||
// any modifications thereto. Any use, reproduction, disclosure, or
|
||||
// distribution of this software and related documentation without an express
|
||||
// license agreement from NVIDIA Corporation is strictly prohibited.
|
||||
//
|
||||
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
|
||||
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
|
||||
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
|
||||
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// Information and code furnished is believed to be accurate and reliable.
|
||||
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
|
||||
// information or for any infringement of patents or other rights of third parties that may
|
||||
// result from its use. No license is granted by implication or otherwise under any patent
|
||||
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
|
||||
// This code supersedes and replaces all information previously supplied.
|
||||
// NVIDIA Corporation products are not authorized for use as critical
|
||||
// components in life support devices or systems without express written approval of
|
||||
// NVIDIA Corporation.
|
||||
//
|
||||
// Copyright (c) 2008-2013 NVIDIA Corporation. All rights reserved.
|
||||
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
|
||||
|
||||
|
||||
#ifndef PX_PHYSICS_NX_ARTICULATION
|
||||
#define PX_PHYSICS_NX_ARTICULATION
|
||||
/** \addtogroup physics
|
||||
@{ */
|
||||
|
||||
#include "PxPhysX.h"
|
||||
#include "common/PxSerialFramework.h"
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
namespace physx
|
||||
{
|
||||
#endif
|
||||
|
||||
class PxArticulationLink;
|
||||
|
||||
/**
|
||||
\brief articulation drive cache
|
||||
|
||||
This cache is used for making one or more impulse applications to the articulation.
|
||||
|
||||
@see PxArticulation
|
||||
*/
|
||||
|
||||
class PxArticulationDriveCache;
|
||||
|
||||
/**
|
||||
\brief a tree structure of bodies connected by joints that is treated as a unit by the dynamics solver
|
||||
|
||||
Articulations are more expensive to simulate than the equivalent collection of
|
||||
PxRigidDynamic and PxJoint structures, but because the dynamics solver treats
|
||||
each articulation as a single object, they are much less prone to separation and
|
||||
have better support for actuation.
|
||||
|
||||
@see PxArticulationJoint PxArticulationLink
|
||||
*/
|
||||
|
||||
class PxArticulation : public PxSerializable
|
||||
{
|
||||
public:
|
||||
/**
|
||||
\brief Deletes the articulation.
|
||||
|
||||
Do not keep a reference to the deleted instance.
|
||||
|
||||
@see PxScene::createArticulation()
|
||||
*/
|
||||
virtual void release() = 0;
|
||||
|
||||
/**
|
||||
\brief Retrieves the scene which this articulation belongs to.
|
||||
|
||||
\return Owner Scene. NULL if not part of a scene.
|
||||
|
||||
@see PxScene
|
||||
*/
|
||||
virtual PxScene* getScene() const = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief sets maxProjectionIterations.
|
||||
|
||||
This is the maximum number of iterations to run projection on the articulation to bring
|
||||
the links back together if the separation tolerance is exceeded.
|
||||
|
||||
|
||||
\param[in] iterations the maximum number of projection iterations
|
||||
<b>Default:</b> 4
|
||||
|
||||
@see getMaxProjectionIterations()
|
||||
*/
|
||||
virtual void setMaxProjectionIterations(PxU32 iterations) = 0;
|
||||
|
||||
/**
|
||||
\brief gets maxProjectionIterations.
|
||||
|
||||
\return the maximum number of projection iterations
|
||||
|
||||
@see setMaxProjectionIterations()
|
||||
*/
|
||||
|
||||
virtual PxU32 getMaxProjectionIterations() const = 0;
|
||||
|
||||
/**
|
||||
\brief sets separationTolerance.
|
||||
|
||||
This is the maximum allowed separation of any joint in the articulation before projection is used
|
||||
|
||||
<b>Default: 0.1f, scaled by the tolerance scale </b>
|
||||
|
||||
\param[in] tolerance the separation tolerance for the articulation
|
||||
|
||||
@see getSeparationTolerance()
|
||||
*/
|
||||
virtual void setSeparationTolerance(PxReal tolerance) = 0;
|
||||
|
||||
/**
|
||||
\brief gets separationTolerance.
|
||||
|
||||
\return the separation tolerance
|
||||
|
||||
@see setSeparationTolerance()
|
||||
*/
|
||||
|
||||
virtual PxReal getSeparationTolerance() const = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief sets the number of iterations used to compute the drive response to internal forces
|
||||
|
||||
The drive model uses an iterative algorithm to determine the load on each joint of the articulation.
|
||||
This is the number of iterations to use when computing response of the drive to internal forces.
|
||||
|
||||
\param[in] iterations the number of iterations used to compute the drive response to internal forces.
|
||||
|
||||
<b>Default:</b> 4
|
||||
|
||||
@see getInternalDriveIterations()
|
||||
*/
|
||||
virtual void setInternalDriveIterations(PxU32 iterations) = 0;
|
||||
|
||||
/**
|
||||
\brief gets internal driveIterations.
|
||||
|
||||
\return the number of iterations used to compute the drive response to internal forces
|
||||
|
||||
@see setInternalDriveIterations()
|
||||
*/
|
||||
|
||||
virtual PxU32 getInternalDriveIterations() const = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief sets the number of iterations for drive response to external forces.
|
||||
|
||||
The drive model uses an iterative algorithm to determine the load on each joint of the articulation.
|
||||
This is the number of iterations to use when computing response of the drive to external forces.
|
||||
|
||||
\param[in] iterations the number of iterations used to compute the drive response to external forces.
|
||||
|
||||
<b>Default:</b> 4
|
||||
|
||||
@see getExternalDriveIterations()
|
||||
*/
|
||||
|
||||
virtual void setExternalDriveIterations(PxU32 iterations) = 0;
|
||||
|
||||
/**
|
||||
\brief gets externalDriveIterations.
|
||||
|
||||
\return the number of iterations used to compute the drive response to external forces
|
||||
|
||||
@see setExternalDriveIterations()
|
||||
*/
|
||||
|
||||
virtual PxU32 getExternalDriveIterations() const = 0;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
\brief Sets the solver iteration counts for the articulation.
|
||||
|
||||
The solver iteration count determines how accurately joints and contacts are resolved.
|
||||
If you are having trouble with jointed bodies oscillating and behaving erratically, then
|
||||
setting a higher position iteration count may improve their stability.
|
||||
|
||||
If intersecting bodies are being depenetrated too violently, increase the number of velocity iterations.
|
||||
|
||||
\param[in] minPositionIters Number of position iterations the solver should perform for this articulation. <b>Range:</b> [1,255]
|
||||
\param[in] minVelocityIters Number of velocity iterations the solver should perform for this articulation. <b>Range:</b> [1,255]
|
||||
|
||||
@see getSolverIterationCounts()
|
||||
*/
|
||||
virtual void setSolverIterationCounts(PxU32 minPositionIters, PxU32 minVelocityIters = 1) = 0;
|
||||
|
||||
/**
|
||||
\brief Retrieves the solver iteration counts.
|
||||
|
||||
@see setSolverIterationCounts()
|
||||
*/
|
||||
virtual void getSolverIterationCounts(PxU32 & minPositionIters, PxU32 & minVelocityIters) const = 0;
|
||||
|
||||
/**
|
||||
\brief Returns true if this articulation is sleeping.
|
||||
|
||||
When an actor does not move for a period of time, it is no longer simulated in order to save time. This state
|
||||
is called sleeping. However, because the object automatically wakes up when it is either touched by an awake object,
|
||||
or one of its properties is changed by the user, the entire sleep mechanism should be transparent to the user.
|
||||
|
||||
If an articulation is asleep after the call to PxScene::fetchResults() returns, it is guaranteed that the poses of the
|
||||
links were not changed. You can use this information to avoid updating the transforms of associated of dependent objects.
|
||||
|
||||
\return True if the articulation is sleeping.
|
||||
|
||||
@see isSleeping() wakeUp() putToSleep() getSleepThreshold()
|
||||
*/
|
||||
virtual bool isSleeping() const = 0;
|
||||
|
||||
/**
|
||||
\brief Sets the mass-normalized energy threshold below which an articulation may go to sleep.
|
||||
|
||||
The articulation will sleep if the energy of each body is below this threshold.
|
||||
|
||||
\param[in] threshold Energy below which an actor may go to sleep. <b>Range:</b> (0,inf]
|
||||
|
||||
@see isSleeping() getSleepThreshold() wakeUp() putToSleep()
|
||||
*/
|
||||
virtual void setSleepThreshold(PxReal threshold) = 0;
|
||||
|
||||
/**
|
||||
\brief Returns the mass-normalized energy below which an articulation may go to sleep.
|
||||
|
||||
\return The energy threshold for sleeping.
|
||||
|
||||
@see isSleeping() wakeUp() putToSleep() setSleepThreshold()
|
||||
*/
|
||||
virtual PxReal getSleepThreshold() const = 0;
|
||||
|
||||
/**
|
||||
\brief Wakes up the articulation if it is sleeping.
|
||||
|
||||
The wakeCounterValue determines how long until the articulation is put to sleep, a value of zero means
|
||||
that the articulation is sleeping. wakeUp(0) is equivalent to PxRigidDynamic::putToSleep().
|
||||
|
||||
\param[in] wakeCounterValue New sleep counter value. <b>Range:</b> [0,inf]
|
||||
|
||||
@see isSleeping() putToSleep()
|
||||
*/
|
||||
virtual void wakeUp(PxReal wakeCounterValue=PX_SLEEP_INTERVAL) = 0;
|
||||
|
||||
/**
|
||||
\brief Forces the articulation to sleep.
|
||||
|
||||
The articulation will stay asleep during the next simulation step if not touched by another non-sleeping actor.
|
||||
|
||||
\note This will set the velocity of all bodies in the articulation to zero.
|
||||
|
||||
@see isSleeping() wakeUp()
|
||||
*/
|
||||
virtual void putToSleep() = 0;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
\brief adds a link to the articulation with default attribute values.
|
||||
|
||||
\param[in] parent the parent link of the articulation. Should be NULL if (and only if) this is the root link
|
||||
\param[in] pose the pose of the new link
|
||||
|
||||
\return the new link, or NULL if the link cannot be created because the articulation has reached
|
||||
its maximum link count
|
||||
|
||||
@see PxsArticulationLink
|
||||
*/
|
||||
|
||||
virtual PxArticulationLink* createLink(PxArticulationLink* parent, const PxTransform& pose) = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief returns the number of links in the articulation
|
||||
*/
|
||||
|
||||
virtual PxU32 getNbLinks() const = 0;
|
||||
|
||||
/**
|
||||
\brief returns the set of links in the articulation
|
||||
|
||||
\param[in] userBuffer buffer into which to write an array of articulation link pointers
|
||||
\param[in] bufferSize the size of the buffer. If this is not large enough to contain all the pointers to links,
|
||||
only as many as will fit are written.
|
||||
|
||||
\return the number of links written into the buffer.
|
||||
|
||||
@see PxsArticulationLink
|
||||
*/
|
||||
|
||||
virtual PxU32 getLinks(PxArticulationLink** userBuffer, PxU32 bufferSize) const = 0;
|
||||
|
||||
/**
|
||||
\brief Sets a name string for the object that can be retrieved with getName().
|
||||
|
||||
This is for debugging and is not used by the SDK. The string is not copied by the SDK,
|
||||
only the pointer is stored.
|
||||
|
||||
\param[in] name String to set the objects name to.
|
||||
|
||||
@see getName()
|
||||
*/
|
||||
virtual void setName(const char* name) = 0;
|
||||
|
||||
/**
|
||||
\brief Retrieves the name string set with setName().
|
||||
|
||||
\return Name string associated with object.
|
||||
|
||||
@see setName()
|
||||
*/
|
||||
virtual const char* getName() const = 0;
|
||||
|
||||
/**
|
||||
\brief Retrieves the axis aligned bounding box enclosing the articulation.
|
||||
|
||||
\return The articulation's bounding box.
|
||||
|
||||
@see PxBounds3
|
||||
*/
|
||||
virtual PxBounds3 getWorldBounds() const = 0;
|
||||
|
||||
/**
|
||||
\brief Retrieves the aggregate the articulation might be a part of.
|
||||
|
||||
\return The aggregate the articulation is a part of, or NULL if the articulation does not belong to an aggregate.
|
||||
|
||||
@see PxAggregate
|
||||
*/
|
||||
virtual PxAggregate* getAggregate() const = 0;
|
||||
|
||||
/**
|
||||
\brief create a drive cache for applying impulses which are propagated to the entire articulation
|
||||
|
||||
\param[in] compliance the compliance value to use at all joints of the articulation. This is equivalent to the external compliance
|
||||
parameter for articulation joints, as the impulse is treated as an external force
|
||||
\param[in] driveIterations the number of iterations to use to evaluate the drive strengths
|
||||
|
||||
\return a drive cache
|
||||
|
||||
@see updateDriveCache releaseDriveCache applyImpulse computeImpulseResponse
|
||||
|
||||
\note this call may only be made on articulations that are in a scene, and may not be made during simulation
|
||||
|
||||
*/
|
||||
virtual PxArticulationDriveCache*
|
||||
createDriveCache(PxReal compliance, PxU32 driveIterations) const = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief update a drive cache
|
||||
|
||||
\param[in] driveCache the drive cache to update
|
||||
\param[in] compliance the compliance value to use at all joints of the articulation.
|
||||
\param[in] driveIterations the number of iterations to use to evaluate the drive strengths
|
||||
|
||||
\return a drive cache
|
||||
|
||||
@see releaseDriveCache createDriveCache applyImpulse computeImpulseResponse
|
||||
|
||||
\note this call may only be made on articulations that are in a scene, and may not be made during simulation
|
||||
|
||||
*/
|
||||
virtual void updateDriveCache(PxArticulationDriveCache& driveCache,
|
||||
PxReal compliance,
|
||||
PxU32 driveIterations) const = 0;
|
||||
|
||||
/**
|
||||
\brief release a drive cache
|
||||
|
||||
\param[in] driveCache the drive cache to release
|
||||
|
||||
@see createDriveCache updateDriveCache
|
||||
*/
|
||||
virtual void releaseDriveCache(PxArticulationDriveCache& driveCache) const = 0;
|
||||
|
||||
/**
|
||||
\brief apply an impulse to an entire articulation
|
||||
|
||||
\param[in] link the link to which to apply the impulse
|
||||
\param[in] driveCache the drive cache
|
||||
\param[in] linearImpulse the linear impulse to apply
|
||||
\param[in] angularImpulse the angular impulse to apply
|
||||
|
||||
@see computeImpulseResponse
|
||||
|
||||
\note this call may only be made on articulations that are in a scene, and may not be made during simulation
|
||||
|
||||
*/
|
||||
virtual void applyImpulse(PxArticulationLink* link,
|
||||
const PxArticulationDriveCache& driveCache,
|
||||
const PxVec3& linearImpulse,
|
||||
const PxVec3& angularImpulse) = 0;
|
||||
|
||||
/**
|
||||
\brief determine the effect of applying an impulse to an entire articulation, without applying the impulse
|
||||
|
||||
\param[in] link the link to which to apply the impulse
|
||||
\param[out] linearResponse the change in linear velocity of the articulation link
|
||||
\param[out] angularResponse the change in angular velocity of the articulation link
|
||||
\param[in] driveCache the drive cache
|
||||
\param[in] linearImpulse the linear impulse to apply
|
||||
\param[in] angularImpulse the angular impulse to apply
|
||||
|
||||
@see applyImpulse
|
||||
|
||||
This call will wake up the articulation if it is asleep.
|
||||
|
||||
\note this call may only be made on articulations that are in a scene, and may not be made during simulation
|
||||
*/
|
||||
|
||||
virtual void computeImpulseResponse(PxArticulationLink*link,
|
||||
PxVec3& linearResponse,
|
||||
PxVec3& angularResponse,
|
||||
const PxArticulationDriveCache& driveCache,
|
||||
const PxVec3& linearImpulse,
|
||||
const PxVec3& angularImpulse) const = 0;
|
||||
|
||||
|
||||
//public variables:
|
||||
void* userData; //!< user can assign this to whatever, usually to create a 1:1 relationship with a user object.
|
||||
|
||||
virtual const char* getConcreteTypeName() const { return "PxArticulation"; }
|
||||
|
||||
protected:
|
||||
PxArticulation(PxRefResolver& v) : PxSerializable(v) {}
|
||||
PX_INLINE PxArticulation() {}
|
||||
virtual ~PxArticulation() {}
|
||||
virtual bool isKindOf(const char* name) const { return !strcmp("PxArticulation", name) || PxSerializable::isKindOf(name); }
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
} // namespace physx
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif
|
451
Engine/ExtIncludes/physX3/windows/PxArticulationJoint.h
Normal file
|
@ -0,0 +1,451 @@
|
|||
// This code contains NVIDIA Confidential Information and is disclosed to you
|
||||
// under a form of NVIDIA software license agreement provided separately to you.
|
||||
//
|
||||
// Notice
|
||||
// NVIDIA Corporation and its licensors retain all intellectual property and
|
||||
// proprietary rights in and to this software and related documentation and
|
||||
// any modifications thereto. Any use, reproduction, disclosure, or
|
||||
// distribution of this software and related documentation without an express
|
||||
// license agreement from NVIDIA Corporation is strictly prohibited.
|
||||
//
|
||||
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
|
||||
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
|
||||
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
|
||||
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// Information and code furnished is believed to be accurate and reliable.
|
||||
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
|
||||
// information or for any infringement of patents or other rights of third parties that may
|
||||
// result from its use. No license is granted by implication or otherwise under any patent
|
||||
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
|
||||
// This code supersedes and replaces all information previously supplied.
|
||||
// NVIDIA Corporation products are not authorized for use as critical
|
||||
// components in life support devices or systems without express written approval of
|
||||
// NVIDIA Corporation.
|
||||
//
|
||||
// Copyright (c) 2008-2013 NVIDIA Corporation. All rights reserved.
|
||||
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
|
||||
|
||||
|
||||
#ifndef PX_PHYSICS_NX_ARTICULATION_JOINT
|
||||
#define PX_PHYSICS_NX_ARTICULATION_JOINT
|
||||
/** \addtogroup physics
|
||||
@{ */
|
||||
|
||||
#include "PxPhysX.h"
|
||||
#include "common/PxSerialFramework.h"
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
namespace physx
|
||||
{
|
||||
#endif
|
||||
|
||||
/**
|
||||
\brief a joint between two links in an articulation.
|
||||
|
||||
The joint model is very similar to a PxSphericalJoint with swing and twist limits,
|
||||
and an implicit drive model.
|
||||
|
||||
@see PxArticulation PxArticulationLink
|
||||
*/
|
||||
|
||||
class PxArticulationJoint : public PxSerializable
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
\brief set the joint pose in the parent frame
|
||||
|
||||
\param[in] pose the joint pose in the parent frame
|
||||
<b>Default:</b> the identity matrix
|
||||
|
||||
@see getParentPose()
|
||||
*/
|
||||
|
||||
virtual void setParentPose(const PxTransform& pose) = 0;
|
||||
|
||||
/**
|
||||
\brief get the joint pose in the parent frame
|
||||
|
||||
\return the joint pose in the parent frame
|
||||
|
||||
@see setParentPose()
|
||||
*/
|
||||
|
||||
virtual PxTransform getParentPose() const = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief set the joint pose in the child frame
|
||||
|
||||
\param[in] pose the joint pose in the child frame
|
||||
<b>Default:</b> the identity matrix
|
||||
|
||||
@see getChildPose()
|
||||
*/
|
||||
|
||||
virtual void setChildPose(const PxTransform& pose) = 0;
|
||||
|
||||
/**
|
||||
\brief get the joint pose in the child frame
|
||||
|
||||
\return the joint pose in the child frame
|
||||
|
||||
@see setChildPose()
|
||||
*/
|
||||
virtual PxTransform getChildPose() const = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief set the target drive
|
||||
|
||||
This is the target position for the joint drive, measured in the parent constraint frame.
|
||||
|
||||
\param[in] orientation the target orientation for the joint
|
||||
<b>Range:</b> a unit quaternion
|
||||
<b>Default:</b> the identity quaternion
|
||||
|
||||
@see getTargetOrientation()
|
||||
*/
|
||||
|
||||
virtual void setTargetOrientation(const PxQuat& orientation) = 0;
|
||||
|
||||
/**
|
||||
\brief get the target drive position
|
||||
|
||||
\return the joint drive target position
|
||||
|
||||
@see setTargetOrientation()
|
||||
*/
|
||||
virtual PxQuat getTargetOrientation() const = 0;
|
||||
|
||||
/**
|
||||
\brief set the target drive velocity
|
||||
|
||||
This is the target velocity for the joint drive, measured in the parent constraint frame
|
||||
|
||||
\param[in] velocity the target velocity for the joint
|
||||
<b>Default:</b> the zero vector
|
||||
|
||||
@see getTargetVelocity()
|
||||
*/
|
||||
virtual void setTargetVelocity(const PxVec3& velocity) = 0;
|
||||
|
||||
/**
|
||||
\brief get the target drive velocity
|
||||
|
||||
\return the target velocity for the joint
|
||||
|
||||
@see setTargetVelocity()
|
||||
*/
|
||||
virtual PxVec3 getTargetVelocity() const = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief set the drive strength of the joint acceleration spring.
|
||||
|
||||
The acceleration generated by the spring drive is proportional to
|
||||
this value and the angle between the drive target position and the
|
||||
current position.
|
||||
|
||||
\param[in] spring the spring strength of the joint
|
||||
<b>Range:</b> [0,inf)<br>
|
||||
<b>Default:</b> 0.0
|
||||
|
||||
@see getSpring()
|
||||
*/
|
||||
virtual void setSpring(PxReal spring) = 0;
|
||||
|
||||
/**
|
||||
\brief get the drive strength of the joint acceleration spring
|
||||
|
||||
\return the spring strength of the joint
|
||||
|
||||
@see setSpring()
|
||||
*/
|
||||
virtual PxReal getSpring() const = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief set the damping of the joint acceleration spring
|
||||
|
||||
The acceleration generated by the spring drive is proportional to
|
||||
this value and the difference between the angular velocity of the
|
||||
joint and the target drive velocity.
|
||||
|
||||
\param[in] damping the damping of the joint drive
|
||||
<b>Range:</b> [0,inf)<br>
|
||||
<b>Default:</b> 0.0
|
||||
|
||||
@see getDamping()
|
||||
*/
|
||||
virtual void setDamping(PxReal damping) = 0;
|
||||
|
||||
/**
|
||||
\brief get the damping of the joint acceleration spring
|
||||
|
||||
@see setDamping()
|
||||
*/
|
||||
|
||||
virtual PxReal getDamping() const = 0;
|
||||
|
||||
/**
|
||||
\brief set the internal compliance
|
||||
|
||||
Compliance determines the extent to which the joint resists acceleration.
|
||||
|
||||
There are separate values for resistance to accelerations caused by external
|
||||
forces such as gravity and contact forces, and internal forces generated from
|
||||
other joints.
|
||||
|
||||
A low compliance means that forces have little effect, a compliance of 1 means
|
||||
the joint does not resist such forces at all.
|
||||
|
||||
\param[in] compliance the compliance to internal forces
|
||||
<b> Range: (0,1]</b>
|
||||
<b> Default:</b> 0.0
|
||||
|
||||
@see getInternalCompliance()
|
||||
*/
|
||||
|
||||
virtual void setInternalCompliance(PxReal compliance) = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief get the internal compliance
|
||||
|
||||
\return the compliance to internal forces
|
||||
|
||||
@see setInternalCompliance()
|
||||
*/
|
||||
virtual PxReal getInternalCompliance() const = 0;
|
||||
|
||||
/**
|
||||
\brief get the drive external compliance
|
||||
|
||||
Compliance determines the extent to which the joint resists acceleration.
|
||||
|
||||
There are separate values for resistance to accelerations caused by external
|
||||
forces such as gravity and contact forces, and internal forces generated from
|
||||
other joints.
|
||||
|
||||
A low compliance means that forces have little effect, a compliance of 1 means
|
||||
the joint does not resist such forces at all.
|
||||
|
||||
\param[in] compliance the compliance to external forces
|
||||
<b> Range: (0,1]</b>
|
||||
<b> Default:</b> 0.0
|
||||
|
||||
@see getExternalCompliance()
|
||||
*/
|
||||
|
||||
virtual void setExternalCompliance(PxReal compliance) = 0;
|
||||
|
||||
/**
|
||||
\brief get the drive external compliance
|
||||
|
||||
\return the compliance to external forces
|
||||
|
||||
@see setExternalCompliance()
|
||||
*/
|
||||
virtual PxReal getExternalCompliance() const = 0;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
\brief set the extents of the cone limit. The extents are measured in the frame
|
||||
of the parent.
|
||||
|
||||
Note that very small or highly elliptical limit cones may result in jitter.
|
||||
|
||||
\param[in] yLimit the allowed extent of rotation around the y-axis
|
||||
\param[in] zLimit the allowed extent of rotation around the z-axis
|
||||
<b> Range:</b> ([0,Pi), [0, Pi)]
|
||||
<b> Default:</b> (0.0, 0.0)
|
||||
*/
|
||||
|
||||
virtual void setSwingLimit(PxReal yLimit, PxReal zLimit) = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief get the extents for the swing limit cone
|
||||
|
||||
\param[out] yLimit the allowed extent of rotation around the y-axis
|
||||
\param[out] zLimit the allowed extent of rotation around the z-axis
|
||||
|
||||
@see setSwingLimit()
|
||||
*/
|
||||
virtual void getSwingLimit(PxReal &yLimit, PxReal &zLimit) const = 0;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
\brief set the tangential spring for the limit cone
|
||||
<b> Range:</b> ([0,infinity), [0, infinity)]
|
||||
<b> Default:</b> (0.0, 0.0)
|
||||
*/
|
||||
|
||||
virtual void setTangentialSpring(PxReal spring) = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief get the tangential spring for the swing limit cone
|
||||
|
||||
\return the tangential spring
|
||||
|
||||
@see setTangentialSpring()
|
||||
*/
|
||||
virtual PxReal getTangentialSpring() const = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief set the tangential damping for the limit cone
|
||||
<b> Range:</b> ([0,infinity), [0, infinity)]
|
||||
<b> Default:</b> (0.0, 0.0)
|
||||
*/
|
||||
|
||||
virtual void setTangentialDamping(PxReal damping) = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief get the tangential damping for the swing limit cone
|
||||
|
||||
\return the tangential damping
|
||||
|
||||
@see setTangentialDamping()
|
||||
*/
|
||||
virtual PxReal getTangentialDamping() const = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief set the contact distance for the swing limit
|
||||
|
||||
The contact distance should be less than either limit angle.
|
||||
|
||||
<b> Range:</b> [0,Pi)
|
||||
<b> Default:</b> 0.05 radians
|
||||
|
||||
@see getSwingLimitContactDistance()
|
||||
*/
|
||||
|
||||
virtual void setSwingLimitContactDistance(PxReal contactDistance) = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief get the contact distance for the swing limit
|
||||
|
||||
\return the contact distance for the swing limit cone
|
||||
|
||||
@see setSwingLimitContactDistance()
|
||||
*/
|
||||
virtual PxReal getSwingLimitContactDistance() const = 0;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
\brief set the flag which enables the swing limit
|
||||
|
||||
\param[in] enabled whether the limit is enabled
|
||||
<b>Default:</b> false
|
||||
|
||||
@see getSwingLimitEnabled()
|
||||
*/
|
||||
virtual void setSwingLimitEnabled(bool enabled) = 0;
|
||||
|
||||
/**
|
||||
\brief get the flag which enables the swing limit
|
||||
|
||||
\return whether the swing limit is enabled
|
||||
|
||||
@see setSwingLimitEnabled()
|
||||
*/
|
||||
|
||||
virtual bool getSwingLimitEnabled() const = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief set the bounds of the twistLimit
|
||||
|
||||
\param[in] lower the lower extent of the twist limit
|
||||
\param[in] upper the upper extent of the twist limit
|
||||
<b> Range: (-Pi,Pi)</b>
|
||||
<b> Default:</b> (0.0, 0.0)
|
||||
|
||||
The lower limit value must be less than the upper limit if the limit is enabled
|
||||
|
||||
@see getTwistLimit()
|
||||
*/
|
||||
virtual void setTwistLimit(PxReal lower, PxReal upper) = 0;
|
||||
|
||||
/**
|
||||
\brief get the bounds of the twistLimit
|
||||
|
||||
\param[out] lower the lower extent of the twist limit
|
||||
\param[out] upper the upper extent of the twist limit
|
||||
|
||||
@see setTwistLimit()
|
||||
*/
|
||||
|
||||
virtual void getTwistLimit(PxReal &lower, PxReal &upper) const = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief set the flag which enables the twist limit
|
||||
|
||||
\param[in] enabled whether the twist limit is enabled
|
||||
<b>Default:</b> false
|
||||
|
||||
@see getTwistLimitEnabled()
|
||||
*/
|
||||
virtual void setTwistLimitEnabled(bool enabled) = 0;
|
||||
|
||||
/**
|
||||
\brief get the twistLimitEnabled flag
|
||||
|
||||
\return whether the twist limit is enabled
|
||||
|
||||
@see setTwistLimitEnabled()
|
||||
*/
|
||||
|
||||
virtual bool getTwistLimitEnabled() const = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief set the contact distance for the swing limit
|
||||
|
||||
The contact distance should be less than half the distance between the upper and lower limits.
|
||||
|
||||
<b> Range:</b> [0,Pi)
|
||||
<b> Default:</b> 0.05 radians
|
||||
|
||||
@see getTwistLimitContactDistance()
|
||||
*/
|
||||
|
||||
virtual void setTwistLimitContactDistance(PxReal contactDistance) = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief get the contact distance for the swing limit
|
||||
|
||||
\return the contact distance for the twist limit
|
||||
|
||||
@see setTwistLimitContactDistance()
|
||||
*/
|
||||
virtual PxReal getTwistLimitContactDistance() const = 0;
|
||||
|
||||
virtual const char* getConcreteTypeName() const { return "PxArticulationJoint"; }
|
||||
|
||||
protected:
|
||||
PxArticulationJoint(PxRefResolver& v) : PxSerializable(v) {}
|
||||
PX_INLINE PxArticulationJoint() {}
|
||||
virtual ~PxArticulationJoint() {}
|
||||
virtual bool isKindOf(const char* name) const { return !strcmp("PxArticulationJoint", name) || PxSerializable::isKindOf(name); }
|
||||
};
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
} // namespace physx
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif
|
124
Engine/ExtIncludes/physX3/windows/PxArticulationLink.h
Normal file
|
@ -0,0 +1,124 @@
|
|||
// This code contains NVIDIA Confidential Information and is disclosed to you
|
||||
// under a form of NVIDIA software license agreement provided separately to you.
|
||||
//
|
||||
// Notice
|
||||
// NVIDIA Corporation and its licensors retain all intellectual property and
|
||||
// proprietary rights in and to this software and related documentation and
|
||||
// any modifications thereto. Any use, reproduction, disclosure, or
|
||||
// distribution of this software and related documentation without an express
|
||||
// license agreement from NVIDIA Corporation is strictly prohibited.
|
||||
//
|
||||
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
|
||||
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
|
||||
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
|
||||
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// Information and code furnished is believed to be accurate and reliable.
|
||||
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
|
||||
// information or for any infringement of patents or other rights of third parties that may
|
||||
// result from its use. No license is granted by implication or otherwise under any patent
|
||||
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
|
||||
// This code supersedes and replaces all information previously supplied.
|
||||
// NVIDIA Corporation products are not authorized for use as critical
|
||||
// components in life support devices or systems without express written approval of
|
||||
// NVIDIA Corporation.
|
||||
//
|
||||
// Copyright (c) 2008-2013 NVIDIA Corporation. All rights reserved.
|
||||
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
|
||||
|
||||
|
||||
#ifndef PX_PHYSICS_NX_ARTICULATION_LINK
|
||||
#define PX_PHYSICS_NX_ARTICULATION_LINK
|
||||
/** \addtogroup physics
|
||||
@{ */
|
||||
|
||||
#include "PxPhysX.h"
|
||||
#include "PxArticulationJoint.h"
|
||||
#include "PxRigidBody.h"
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
namespace physx
|
||||
{
|
||||
#endif
|
||||
|
||||
/**
|
||||
\brief a component of an articulation that represents a rigid body
|
||||
|
||||
A limited subset of the properties of PxRigidDynamic are supported. In particular, sleep properties
|
||||
are attributes of the articulation rather than each individual body, damping and velocity limits
|
||||
are not supported, and links may not be kinematic.
|
||||
|
||||
@see PxArticulation PxArticulationJoint PxRigidBody
|
||||
*/
|
||||
|
||||
class PxArticulationLink : public PxRigidBody
|
||||
{
|
||||
public:
|
||||
/**
|
||||
\brief Deletes the articulation link.
|
||||
|
||||
\note Only a leaf articulation link can be released
|
||||
|
||||
Do not keep a reference to the deleted instance.
|
||||
|
||||
@see PxArticulation::createLink()
|
||||
*/
|
||||
virtual void release() = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief get the articulation to which this articulation link belongs
|
||||
|
||||
\return the articulation to which this link belongs
|
||||
*/
|
||||
virtual PxArticulation& getArticulation() const = 0;
|
||||
|
||||
/**
|
||||
\brief Get the joint which connects this link to its parent.
|
||||
|
||||
\return The joint connecting the link to the parent. NULL for the root link.
|
||||
|
||||
@see PxArticulationJoint
|
||||
*/
|
||||
virtual PxArticulationJoint* getInboundJoint() const = 0;
|
||||
|
||||
/**
|
||||
\brief Get number of child links.
|
||||
|
||||
\return the number of child links
|
||||
|
||||
@see getChildren()
|
||||
*/
|
||||
virtual PxU32 getNbChildren() const = 0;
|
||||
|
||||
/**
|
||||
\brief Retrieve all the child links.
|
||||
|
||||
\param[out] userBuffer The buffer to receive articulation link pointers.
|
||||
\param[in] bufferSize Size of provided user buffer.
|
||||
\return Number of articulation links written to the buffer.
|
||||
|
||||
@see getNbChildren()
|
||||
*/
|
||||
virtual PxU32 getChildren(PxArticulationLink** userBuffer, PxU32 bufferSize) const = 0;
|
||||
|
||||
virtual const char* getConcreteTypeName() const { return "PxArticulationLink"; }
|
||||
|
||||
protected:
|
||||
PxArticulationLink(PxRefResolver& v) : PxRigidBody(v) {}
|
||||
PX_INLINE PxArticulationLink() : PxRigidBody() {}
|
||||
virtual ~PxArticulationLink() {}
|
||||
virtual bool isKindOf(const char* name) const { return !strcmp("PxArticulationLink", name) || PxRigidBody::isKindOf(name); }
|
||||
};
|
||||
|
||||
PX_INLINE PxArticulationLink* PxActor::isArticulationLink() { return is<PxArticulationLink>(); }
|
||||
PX_INLINE const PxArticulationLink* PxActor::isArticulationLink() const { return is<PxArticulationLink>(); }
|
||||
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
} // namespace physx
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif
|
391
Engine/ExtIncludes/physX3/windows/PxBatchQuery.h
Normal file
|
@ -0,0 +1,391 @@
|
|||
// This code contains NVIDIA Confidential Information and is disclosed to you
|
||||
// under a form of NVIDIA software license agreement provided separately to you.
|
||||
//
|
||||
// Notice
|
||||
// NVIDIA Corporation and its licensors retain all intellectual property and
|
||||
// proprietary rights in and to this software and related documentation and
|
||||
// any modifications thereto. Any use, reproduction, disclosure, or
|
||||
// distribution of this software and related documentation without an express
|
||||
// license agreement from NVIDIA Corporation is strictly prohibited.
|
||||
//
|
||||
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
|
||||
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
|
||||
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
|
||||
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// Information and code furnished is believed to be accurate and reliable.
|
||||
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
|
||||
// information or for any infringement of patents or other rights of third parties that may
|
||||
// result from its use. No license is granted by implication or otherwise under any patent
|
||||
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
|
||||
// This code supersedes and replaces all information previously supplied.
|
||||
// NVIDIA Corporation products are not authorized for use as critical
|
||||
// components in life support devices or systems without express written approval of
|
||||
// NVIDIA Corporation.
|
||||
//
|
||||
// Copyright (c) 2008-2013 NVIDIA Corporation. All rights reserved.
|
||||
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
|
||||
|
||||
|
||||
#ifndef PX_PHYSICS_NX_SCENEQUERY
|
||||
#define PX_PHYSICS_NX_SCENEQUERY
|
||||
/** \addtogroup scenequery
|
||||
@{ */
|
||||
|
||||
#include "PxPhysX.h"
|
||||
#include "PxShape.h"
|
||||
#include "PxBatchQueryDesc.h"
|
||||
#include "PxSceneQueryReport.h"
|
||||
#include "PxSceneQueryFiltering.h"
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
namespace physx
|
||||
{
|
||||
#endif
|
||||
|
||||
class PxBoxGeometry;
|
||||
class PxSphereGeometry;
|
||||
class PxSweepCache;
|
||||
struct PxSceneQueryCache;
|
||||
|
||||
/**
|
||||
\brief Batched queries object. This is used to perform several queries at the same time.
|
||||
|
||||
@see PxSceneQueryManager
|
||||
*/
|
||||
class PxBatchQuery
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
\brief Executes batched queries.
|
||||
*/
|
||||
virtual void execute() = 0;
|
||||
|
||||
/**
|
||||
\brief Gets the prefilter shader in use for this scene query.
|
||||
|
||||
\return Prefilter shader.
|
||||
|
||||
@see PxBatchQueryDesc.preFilterShade PxBatchQueryPreFilterShader
|
||||
*/
|
||||
virtual PxBatchQueryPreFilterShader getPreFilterShader() const = 0;
|
||||
|
||||
/**
|
||||
\brief Gets the postfilter shader in use for this scene query.
|
||||
|
||||
\return Postfilter shader.
|
||||
|
||||
@see PxBatchQueryDesc.preFilterShade PxBatchQueryPostFilterShader
|
||||
*/
|
||||
virtual PxBatchQueryPostFilterShader getPostFilterShader() const = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief Gets the shared global filter data in use for this scene query.
|
||||
|
||||
\return Shared filter data for filter shader.
|
||||
|
||||
@see getFilterShaderDataSize() PxBatchQueryDesc.filterShaderData PxBatchQueryPreFilterShader, PxBatchQueryPostFilterShader
|
||||
*/
|
||||
virtual const void* getFilterShaderData() const = 0;
|
||||
|
||||
/**
|
||||
\brief Gets the size of the shared global filter data (#PxSceneDesc.filterShaderData)
|
||||
|
||||
\return Size of shared filter data [bytes].
|
||||
|
||||
@see getFilterShaderData() PxBatchQueryDesc.filterShaderDataSize PxBatchQueryPreFilterShader, PxBatchQueryPostFilterShader
|
||||
*/
|
||||
virtual PxU32 getFilterShaderDataSize() const = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief Retrieves the client specified with PxBatchQueryDesc::ownerClient at creation time.
|
||||
|
||||
It is not possible to change this value after creating the scene query.
|
||||
|
||||
@see PxBatchQueryDesc::ownerClient
|
||||
*/
|
||||
virtual PxClientID getOwnerClient() const = 0;
|
||||
|
||||
/**
|
||||
\brief Releases PxBatchQuery from PxSceneQueryManager
|
||||
|
||||
@see PxSceneQueryManager
|
||||
*/
|
||||
virtual void release() = 0;
|
||||
|
||||
/**
|
||||
\brief Returns whether any object of type objectsType is hit along the ray.
|
||||
|
||||
\note Make certain that the direction vector of the ray is normalized.
|
||||
|
||||
\note Shooting a ray from within an object leads to different results depending on the shape type. Please check the details in article SceneQuery. User can ignore such objects by using one of the provided filter mechanisms.
|
||||
|
||||
\param[in] origin Origin of the ray.
|
||||
\param[in] unitDir Normalized direction of the ray.
|
||||
\param[in] distance Length of the ray. Needs to be larger than 0.
|
||||
\param[in] filterData filterData which is passed to the filer shader. See #PxSceneQueryFilterData #PxBatchQueryPreFilterShader, #PxBatchQueryPostFilterShader
|
||||
\param[in] userData user can assign this to a value of his choice, usually to identify this particular query
|
||||
\param[in] cache Cached hit shape (optional). Ray is tested against cached shape first. If no hit is found the ray gets queried against the scene.
|
||||
Note: Filtering is not executed for a cached shape if supplied; instead, if a hit is found, it is assumed to be a blocking hit.
|
||||
Note: Using past touching hits as cache will produce incorrect behavior since the cached hit will always be treated as blocking.
|
||||
|
||||
@see PxSceneQueryFilterData PxBatchQueryPreFilterShader PxBatchQueryPostFilterShader PxRaycastHit raycastSingle() raycastMultiple()
|
||||
*/
|
||||
virtual void raycastAny( const PxVec3& origin, const PxVec3& unitDir, PxReal distance = PX_MAX_F32,
|
||||
const PxSceneQueryFilterData& filterData = PxSceneQueryFilterData(),
|
||||
void* userData = NULL,
|
||||
const PxSceneQueryCache* cache = NULL) const = 0;
|
||||
|
||||
/**
|
||||
\brief Returns the first object of type objectsType that is hit along the ray.
|
||||
|
||||
The world space intersection point, and the distance along the ray are also provided.
|
||||
hintFlags is a combination of #PxSceneQueryFlag flags.
|
||||
|
||||
\note Make certain that the direction vector of the ray is normalized.
|
||||
|
||||
\note Shooting a ray from within an object leads to different results depending on the shape type. Please check the details in article SceneQuery. User can ignore such objects by using one of the provided filter mechanisms.
|
||||
|
||||
\param[in] origin Origin of the ray.
|
||||
\param[in] unitDir Normalized direction of the ray.
|
||||
\param[in] distance Length of the ray. Needs to be larger than 0.
|
||||
\param[in] outputFlags Specifies which properties should be written to the hit information
|
||||
\param[in] filterData filterData which is passed to the filer shader. See #PxSceneQueryFilterData #PxBatchQueryPreFilterShader, #PxBatchQueryPostFilterShader
|
||||
\param[in] userData user can assign this to a value of his choice, usually to identify this particular query
|
||||
\param[in] cache Cached hit shape (optional). Ray is tested against cached shape first then against the scene.
|
||||
Note: Filtering is not executed for a cached shape if supplied; instead, if a hit is found, it is assumed to be a blocking hit.
|
||||
Note: Using past touching hits as cache will produce incorrect behavior since the cached hit will always be treated as blocking.
|
||||
|
||||
@see PxSceneQueryFilterData PxBatchQueryPreFilterShader PxBatchQueryPostFilterShader PxRaycastHit raycastAny() raycastMultiple()
|
||||
*/
|
||||
virtual void raycastSingle( const PxVec3& origin, const PxVec3& unitDir, PxReal distance = PX_MAX_F32,
|
||||
const PxSceneQueryFilterData& filterData = PxSceneQueryFilterData(),
|
||||
PxSceneQueryFlags outputFlags = PxSceneQueryFlag::eIMPACT|PxSceneQueryFlag::eNORMAL|PxSceneQueryFlag::eDISTANCE|PxSceneQueryFlag::eUV,
|
||||
void* userData = NULL,
|
||||
const PxSceneQueryCache* cache = NULL) const = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief Find all objects of type objectsType which a ray intersects.
|
||||
|
||||
hintFlags is a combination of #PxSceneQueryFlag flags.
|
||||
|
||||
\note Make certain that the direction vector of the ray is normalized.
|
||||
|
||||
\note Shooting a ray from within an object leads to different results depending on the shape type. Please check the details in article SceneQuery. User can ignore such objects by using one of the provided filter mechanisms.
|
||||
|
||||
\param[in] origin Origin of the ray.
|
||||
\param[in] unitDir Normalized direction of the ray.
|
||||
\param[in] distance Length of the ray. Needs to be larger than 0.
|
||||
\param[in] outputFlags Specifies which properties should be written to the hit information
|
||||
\param[in] filterData filterData which is passed to the filer shader. See #PxSceneQueryFilterData #PxBatchQueryPreFilterShader, #PxBatchQueryPostFilterShader
|
||||
\param[in] userData user can assign this to a value of his choice, usually to identify this particular query
|
||||
\param[in] cache Cached hit shape (optional). Ray is tested against cached shape first then against the scene.
|
||||
Note: Filtering is not executed for a cached shape if supplied; instead, if a hit is found, it is assumed to be a blocking hit.
|
||||
Note: Using past touching hits as cache will produce incorrect behavior since the cached hit will always be treated as blocking.
|
||||
|
||||
@see PxSceneQueryFilterData PxBatchQueryPreFilterShader PxBatchQueryPostFilterShader PxRaycastHit raycastAny() raycastSingle()
|
||||
*/
|
||||
virtual void raycastMultiple( const PxVec3& origin, const PxVec3& unitDir, PxReal distance = PX_MAX_F32,
|
||||
const PxSceneQueryFilterData& filterData = PxSceneQueryFilterData(),
|
||||
PxSceneQueryFlags outputFlags = PxSceneQueryFlag::eIMPACT|PxSceneQueryFlag::eNORMAL|PxSceneQueryFlag::eDISTANCE|PxSceneQueryFlag::eUV,
|
||||
void* userData = NULL,
|
||||
const PxSceneQueryCache* cache = NULL) const = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief Test overlap between a geometry and objects in the scene. Returns all objects of type objectsType which overlap the world-space sphere
|
||||
|
||||
\note Filtering: Overlap tests do not distinguish between touching and blocking hit types (see #PxSceneQueryHitType). Both get written to the hit buffer.
|
||||
|
||||
\note PxSceneQueryFilterFlag::eMESH_MULTIPLE and PxSceneQueryFilterFlag::eBACKFACE have no effect in this case
|
||||
|
||||
\param[in] geometry Geometry of object to check for overlap (supported types are: box, sphere, capsule, convex).
|
||||
\param[in] pose Pose of the object.
|
||||
\param[in] filterData Filtering data and simple logic. See #PxSceneQueryFilterData #PxBatchQueryPreFilterShader, #PxBatchQueryPostFilterShader
|
||||
\param[in] userData user can assign this to a value of his choice, usually to identify this particular query
|
||||
\param[in] cache Cached hit shape (optional). Ray is tested against cached shape first then against the scene.
|
||||
Note: Filtering is not executed for a cached shape if supplied; instead, if a hit is found, it is assumed to be a blocking hit.
|
||||
Note: Using past touching hits as cache will produce incorrect behavior since the cached hit will always be treated as blocking.
|
||||
\param[in] maxShapes user-defined limit on number of reported shapes (0 to report all shapes)
|
||||
|
||||
@see PxSceneQueryFlags PxSceneQueryFilterData PxBatchQueryPreFilterShader PxBatchQueryPostFilterShader
|
||||
*/
|
||||
virtual void overlapMultiple( const PxGeometry& geometry,
|
||||
const PxTransform& pose,
|
||||
const PxSceneQueryFilterData& filterData = PxSceneQueryFilterData(),
|
||||
void* userData=NULL,
|
||||
const PxSceneQueryCache* cache = NULL,
|
||||
PxU32 maxShapes=0) const = 0;
|
||||
|
||||
/**
|
||||
\brief Test returning, for a given geometry, any overlapping object in the scene. Returns any object of type objectsType which overlap the world-space sphere
|
||||
|
||||
\note Filtering: Overlap tests do not distinguish between touching and blocking hit types (see #PxSceneQueryHitType). Both get written to the hit buffer.
|
||||
|
||||
\note PxSceneQueryFilterFlag::eMESH_MULTIPLE and PxSceneQueryFilterFlag::eBACKFACE have no effect in this case
|
||||
|
||||
\param[in] geometry Geometry of object to check for overlap (supported types are: box, sphere, capsule, convex).
|
||||
\param[in] pose Pose of the object.
|
||||
\param[in] filterData Filtering data and simple logic. See #PxSceneQueryFilterData #PxBatchQueryPreFilterShader, #PxBatchQueryPostFilterShader
|
||||
\param[in] userData user can assign this to a value of his choice, usually to identify this particular query
|
||||
\param[in] cache Cached hit shape (optional). Ray is tested against cached shape first then against the scene.
|
||||
Note: Filtering is not executed for a cached shape if supplied; instead, if a hit is found, it is assumed to be a blocking hit.
|
||||
Note: Using past touching hits as cache will produce incorrect behavior since the cached hit will always be treated as blocking.
|
||||
|
||||
@see PxSceneQueryFlags PxSceneQueryFilterData PxBatchQueryPreFilterShader PxBatchQueryPostFilterShader
|
||||
*/
|
||||
PX_INLINE void overlapAny( const PxGeometry& geometry,
|
||||
const PxTransform& pose,
|
||||
const PxSceneQueryFilterData& filterData = PxSceneQueryFilterData(),
|
||||
void* userData=NULL,
|
||||
const PxSceneQueryCache* cache = NULL )
|
||||
{ overlapMultiple(geometry, pose, filterData, userData, cache,1); }
|
||||
|
||||
/**
|
||||
\brief Sweeps returning a single result.
|
||||
|
||||
Returns the first rigid actor that is hit along the ray. Data for a blocking hit will be returned as specified by the outputFlags field. Touching hits will be ignored.
|
||||
|
||||
\note If a shape from the scene is already overlapping with the query shape in its starting position, behavior is controlled by the PxSceneQueryFlag::eINITIAL_OVERLAP flag.
|
||||
|
||||
\param[in] geometry Geometry of object to sweep (supported types are: box, sphere, capsule, convex).
|
||||
\param[in] pose Pose of the sweep object.
|
||||
\param[in] unitDir Normalized direction of the sweep.
|
||||
\param[in] distance Sweep distance. Needs to be larger than 0. Will be clamped to PX_MAX_SWEEP_DISTANCE.
|
||||
\param[in] outputFlags Specifies which properties should be written to the hit information.
|
||||
\param[in] filterData Filtering data and simple logic.
|
||||
\param[in] cache Cached hit shape (optional). Ray is tested against cached shape first then against the scene.
|
||||
Note: Filtering is not executed for a cached shape if supplied; instead, if a hit is found, it is assumed to be a blocking hit.
|
||||
Note: Using past touching hits as cache will produce incorrect behavior since the cached hit will always be treated as blocking.
|
||||
\param[in] userData user can assign this to a value of his choice, usually to identify this particular query
|
||||
\param[in] inflation This parameter creates a skin around the swept geometry which increases its extents for sweeping. The sweep will register a hit as soon as the skin touches a shape, and will return the corresponding distance and normal.
|
||||
|
||||
@see PxSceneQueryFlags PxSceneQueryFilterData PxBatchQueryPreFilterShader PxBatchQueryPostFilterShader PxSweepHit
|
||||
*/
|
||||
virtual void sweepSingle( const PxGeometry& geometry, const PxTransform& pose, const PxVec3& unitDir, const PxReal distance,
|
||||
PxSceneQueryFlags outputFlags = PxSceneQueryFlag::eIMPACT|PxSceneQueryFlag::eNORMAL|PxSceneQueryFlag::eDISTANCE|PxSceneQueryFlag::eUV,
|
||||
const PxSceneQueryFilterData& filterData = PxSceneQueryFilterData(),
|
||||
void* userData=NULL,
|
||||
const PxSceneQueryCache* cache = NULL, const PxReal inflation = 0.f) const = 0;
|
||||
|
||||
/**
|
||||
\brief Performs a linear sweep through space with a compound of geometry objects
|
||||
|
||||
\note Supported geometries are: PxBoxGeometry, PxSphereGeometry, PxCapsuleGeometry, PxConvexMeshGeometry.
|
||||
\note If a shape from the scene is already overlapping with the query shape in its starting position, behavior is controlled by the PxSceneQueryFlag::eINITIAL_OVERLAP flag.
|
||||
|
||||
The function sweeps all specified geometry objects through space and reports any objects in the scene
|
||||
which intersect. Apart from the number of objects intersected in this way, and the objects
|
||||
intersected, information on the closest intersection is put in an #PxSweepHit structure which
|
||||
is stored in the user allocated buffer in PxBatchQueryDesc . See #PxBatchQueryDesc.
|
||||
|
||||
\param[in] geometryList List of pointers to the geometry objects to sweep
|
||||
\param[in] poseList The world pose for each geometry object
|
||||
\param[in] filterDataList Filter data for each geometry object. NULL, if no filtering should be done
|
||||
\param[in] geometryCount Number of geometry objects specified
|
||||
\param[in] unitDir Normalized direction of the sweep.
|
||||
\param[in] distance Sweep distance. Needs to be larger than 0. Will be clamped to PX_MAX_SWEEP_DISTANCE.
|
||||
\param[in] filterFlags Filter logic settings. See #PxSceneQueryFilterFlag.
|
||||
\param[in] outputFlags Allows the user to specify which field of #PxSweepHit they are interested in. See #PxSceneQueryFlag
|
||||
\param[in] userData user can assign this to a value of his choice, usually to identify this particular query
|
||||
\param[in] cache Sweep cache to use with the query
|
||||
\param[in] inflation This parameter creates a skin around the swept geometry which increases its extents for sweeping. The sweep will register a hit as soon as the skin touches a shape, and will return the corresponding distance and normal.
|
||||
|
||||
@see PxSceneQueryFilterFlag PxFilterData PxBatchQueryPreFilterShader PxBatchQueryPostFilterShader PxSceneQueryReport PxSweepHit linearCompoundGeometrySweepMultiple
|
||||
*/
|
||||
virtual void linearCompoundGeometrySweepSingle( const PxGeometry** geometryList,
|
||||
const PxTransform* poseList,
|
||||
const PxFilterData* filterDataList,
|
||||
PxU32 geometryCount,
|
||||
const PxVec3& unitDir,
|
||||
const PxReal distance,
|
||||
PxSceneQueryFilterFlags filterFlags,
|
||||
PxSceneQueryFlags outputFlags = PxSceneQueryFlag::eIMPACT|PxSceneQueryFlag::eNORMAL|PxSceneQueryFlag::eDISTANCE|PxSceneQueryFlag::eUV,
|
||||
void* userData=NULL,
|
||||
const PxSweepCache* cache = NULL, const PxReal inflation = 0.f) const = 0;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
\brief Sweep returning multiple results.
|
||||
|
||||
Find all rigid actors that get hit along the sweep. Each result contains data as specified by the outputFlags field.
|
||||
|
||||
\note Touching hits are not ordered.
|
||||
|
||||
\note If a shape from the scene is already overlapping with the query shape in its starting position, behavior is controlled by the PxSceneQueryFlag::eINITIAL_OVERLAP flag.
|
||||
|
||||
\param[in] geometry Geometry of object to sweep (supported types are: box, sphere, capsule, convex).
|
||||
\param[in] pose Pose of the sweep object.
|
||||
\param[in] unitDir Normalized direction of the sweep.
|
||||
\param[in] distance Sweep distance. Needs to be larger than 0. Will be clamped to PX_MAX_SWEEP_DISTANCE.
|
||||
\param[in] outputFlags Specifies which properties should be written to the hit information.
|
||||
\param[in] filterData Filtering data and simple logic.
|
||||
\param[in] cache Cached hit shape (optional). Ray is tested against cached shape first then against the scene.
|
||||
Note: Filtering is not executed for a cached shape if supplied; instead, if a hit is found, it is assumed to be a blocking hit.
|
||||
Note: Using past touching hits as cache will produce incorrect behavior since the cached hit will always be treated as blocking.
|
||||
\param[in] userData user can assign this to a value of his choice, usually to identify this particular query
|
||||
\param[in] inflation This parameter creates a skin around the swept geometry which increases its extents for sweeping. The sweep will register a hit as soon as the skin touches a shape, and will return the corresponding distance and normal.
|
||||
|
||||
@see PxSceneQueryFlags PxSceneQueryFilterData PxBatchQueryPreFilterShader PxBatchQueryPostFilterShader PxSweepHit
|
||||
*/
|
||||
virtual void sweepMultiple( const PxGeometry& geometry, const PxTransform& pose, const PxVec3& unitDir, const PxReal distance,
|
||||
PxSceneQueryFlags outputFlags = PxSceneQueryFlag::eIMPACT|PxSceneQueryFlag::eNORMAL|PxSceneQueryFlag::eDISTANCE|PxSceneQueryFlag::eUV,
|
||||
const PxSceneQueryFilterData& filterData = PxSceneQueryFilterData(),
|
||||
void* userData=NULL,
|
||||
const PxSceneQueryCache* cache = NULL, const PxReal inflation = 0.f) const = 0;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
\brief Performs a linear sweep through space with a compound of geometry objects, returning all overlaps.
|
||||
|
||||
\note Supported geometries are: PxBoxGeometry, PxSphereGeometry, PxCapsuleGeometry, PxConvexMeshGeometry.
|
||||
\note If a shape from the scene is already overlapping with the query shape in its starting position, behavior is controlled by the PxSceneQueryFlag::eINITIAL_OVERLAP flag.
|
||||
|
||||
The function sweeps all specified geometry objects through space and reports all objects in the scene
|
||||
which intersect. Apart from the number of objects intersected in this way, and the objects
|
||||
intersected, information on the closest intersection is put in an #PxSweepHit structure which
|
||||
is stored in the user allocated buffer in PxBatchQueryDesc . See #PxBatchQueryDesc.
|
||||
|
||||
\param[in] geometryList List of pointers to the geometry objects to sweep
|
||||
\param[in] poseList The world pose for each geometry object
|
||||
\param[in] filterDataList Filter data for each geometry object. NULL, if no filtering should be done
|
||||
\param[in] geometryCount Number of geometry objects specified
|
||||
\param[in] unitDir Normalized direction of the sweep.
|
||||
\param[in] distance Sweep distance. Needs to be larger than 0. Will be clamped to PX_MAX_SWEEP_DISTANCE.
|
||||
\param[in] filterFlags Filter logic settings. See #PxSceneQueryFilterFlag.
|
||||
\param[in] outputFlags Allows the user to specify which field of #PxSweepHit they are interested in. See #PxSceneQueryFlag
|
||||
\param[in] userData user can assign this to a value of his choice, usually to identify this particular query
|
||||
\param[in] cache Sweep cache to use with the query
|
||||
\param[in] inflation This parameter creates a skin around the swept geometry which increases its extents for sweeping. The sweep will register a hit as soon as the skin touches a shape, and will return the corresponding distance and normal.
|
||||
|
||||
@see PxSceneQueryFilterFlag PxFilterData PxBatchQueryPreFilterShader PxBatchQueryPostFilterShader PxSceneQueryReport PxSweepHit linearCompoundGeometrySweepSingle
|
||||
*/
|
||||
virtual void linearCompoundGeometrySweepMultiple( const PxGeometry** geometryList,
|
||||
const PxTransform* poseList,
|
||||
const PxFilterData* filterDataList,
|
||||
PxU32 geometryCount,
|
||||
const PxVec3& unitDir,
|
||||
const PxReal distance,
|
||||
PxSceneQueryFilterFlags filterFlags,
|
||||
PxSceneQueryFlags outputFlags = PxSceneQueryFlag::eIMPACT|PxSceneQueryFlag::eNORMAL|PxSceneQueryFlag::eDISTANCE|PxSceneQueryFlag::eUV,
|
||||
void* userData=NULL,
|
||||
const PxSweepCache* cache=NULL, const PxReal inflation=0.f) const = 0;
|
||||
|
||||
|
||||
protected:
|
||||
virtual ~PxBatchQuery(){}
|
||||
};
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
} // namespace physx
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif
|
333
Engine/ExtIncludes/physX3/windows/PxBatchQueryDesc.h
Normal file
|
@ -0,0 +1,333 @@
|
|||
// This code contains NVIDIA Confidential Information and is disclosed to you
|
||||
// under a form of NVIDIA software license agreement provided separately to you.
|
||||
//
|
||||
// Notice
|
||||
// NVIDIA Corporation and its licensors retain all intellectual property and
|
||||
// proprietary rights in and to this software and related documentation and
|
||||
// any modifications thereto. Any use, reproduction, disclosure, or
|
||||
// distribution of this software and related documentation without an express
|
||||
// license agreement from NVIDIA Corporation is strictly prohibited.
|
||||
//
|
||||
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
|
||||
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
|
||||
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
|
||||
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// Information and code furnished is believed to be accurate and reliable.
|
||||
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
|
||||
// information or for any infringement of patents or other rights of third parties that may
|
||||
// result from its use. No license is granted by implication or otherwise under any patent
|
||||
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
|
||||
// This code supersedes and replaces all information previously supplied.
|
||||
// NVIDIA Corporation products are not authorized for use as critical
|
||||
// components in life support devices or systems without express written approval of
|
||||
// NVIDIA Corporation.
|
||||
//
|
||||
// Copyright (c) 2008-2013 NVIDIA Corporation. All rights reserved.
|
||||
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
|
||||
|
||||
|
||||
#ifndef PX_PHYSICS_NX_SCENEQUERYDESC
|
||||
#define PX_PHYSICS_NX_SCENEQUERYDESC
|
||||
/** \addtogroup physics
|
||||
@{ */
|
||||
|
||||
#include "PxPhysX.h"
|
||||
#include "PxClient.h"
|
||||
#include "PxFiltering.h"
|
||||
#include "PxSceneQueryFiltering.h"
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
namespace physx
|
||||
{
|
||||
#endif
|
||||
|
||||
struct PxSweepHit;
|
||||
struct PxRaycastHit;
|
||||
|
||||
struct PxBatchQueryStatus
|
||||
{
|
||||
enum Enum
|
||||
{
|
||||
/**
|
||||
\brief This is the initial state before a query starts.
|
||||
*/
|
||||
ePENDING = 0,
|
||||
|
||||
/**
|
||||
\brief The query is finished; results have been written into the result and hit buffers.
|
||||
*/
|
||||
eSUCCESS,
|
||||
|
||||
/**
|
||||
\brief The query was aborted due to the hit buffer being full.
|
||||
*/
|
||||
eABORTED
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
\brief Struct for the result of a batched raycast query.
|
||||
*/
|
||||
struct PxRaycastQueryResult
|
||||
{
|
||||
PxRaycastHit* hits;
|
||||
PxU32 nbHits;
|
||||
PxU32 queryStatus;
|
||||
void* userData;
|
||||
};
|
||||
|
||||
/**
|
||||
\brief Struct for the result of a batched sweep query.
|
||||
*/
|
||||
struct PxSweepQueryResult
|
||||
{
|
||||
PxSweepHit* hits;
|
||||
PxU32 nbHits;
|
||||
PxU32 queryStatus;
|
||||
void* userData;
|
||||
};
|
||||
|
||||
/**
|
||||
\brief Struct for the result of a batched overlap query.
|
||||
*/
|
||||
struct PxOverlapQueryResult
|
||||
{
|
||||
PxShape** hits;
|
||||
PxU32 nbHits;
|
||||
PxU32 queryStatus;
|
||||
void* userData;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
\brief Descriptor class for #PxBatchQuery.
|
||||
|
||||
@see PxBatchQuery PxSceneQueryExecuteMode
|
||||
*/
|
||||
class PxBatchQueryDesc
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
\brief Shared global filter data which will get passed into the filter shader.
|
||||
|
||||
\note The provided data will get copied to internal buffers and this copy will be used for filtering calls.
|
||||
|
||||
<b>Default:</b> NULL
|
||||
|
||||
@see PxSimulationFilterShader
|
||||
*/
|
||||
void* filterShaderData;
|
||||
|
||||
/**
|
||||
\brief Size (in bytes) of the shared global filter data #filterShaderData.
|
||||
|
||||
<b>Default:</b> 0
|
||||
|
||||
@see PxSimulationFilterShader filterShaderData
|
||||
*/
|
||||
PxU32 filterShaderDataSize;
|
||||
|
||||
/**
|
||||
\brief The custom preFilter shader to use for filtering.
|
||||
|
||||
@see PxBatchQueryPreFilterShader PxDefaultPreFilterShader
|
||||
*/
|
||||
PxBatchQueryPreFilterShader preFilterShader;
|
||||
|
||||
/**
|
||||
\brief The custom postFilter shader to use for filtering.
|
||||
|
||||
@see PxBatchQueryPostFilterShader PxDefaultPostFilterShader
|
||||
*/
|
||||
PxBatchQueryPostFilterShader postFilterShader;
|
||||
|
||||
/**
|
||||
\brief The custom spu pre filter shader to use for collision filtering.
|
||||
|
||||
\note This parameter is a fragment of SPU binary codes with the similar function of #PxBatchQueryPreFilterShader.
|
||||
The requirement of the spu function is the same as PxBatchQueryPreFilterShader::filter. To compile the shader for
|
||||
spu, you can reference the implementation, makefile and awk scripts in SampleVehicle. If you don't want to define
|
||||
your own filter shader you can just leave this variable as NULL.
|
||||
|
||||
<b>Platform:</b>
|
||||
\li PC SW: Not applicable
|
||||
\li PS3 : Yes
|
||||
\li XB360: Not applicable
|
||||
\li WII : Not applicable
|
||||
|
||||
*/
|
||||
void* spuPreFilterShader;
|
||||
|
||||
/**
|
||||
\brief Size (in bytes) of the spu pre filter shader codes #spuPreFilterShader
|
||||
|
||||
<b>Default:</b> 0
|
||||
|
||||
@see spuPreFilterShader
|
||||
*/
|
||||
PxU32 spuPreFilterShaderSize;
|
||||
|
||||
/**
|
||||
\brief The custom spu post filter shader to use for collision filtering.
|
||||
|
||||
\note This parameter is a fragment of SPU binary codes with the similar function of #PxBatchQueryPostFilterShader.
|
||||
The requirement of the spu function is the same as PxBatchQueryPreFilterShader::filter. To compile the shader for
|
||||
spu, you can reference the implementation, makefile and awk scripts in SampleVehicle.If you don't want to define
|
||||
your own filter shader you can just leave this variable as NULL.
|
||||
library.
|
||||
|
||||
<b>Platform:</b>
|
||||
\li PC SW: Not applicable
|
||||
\li PS3 : Yes
|
||||
\li XB360: Not applicable
|
||||
\li WII : Not applicable
|
||||
|
||||
*/
|
||||
void* spuPostFilterShader;
|
||||
|
||||
/**
|
||||
\brief Size (in bytes) of the spu post filter shader codes #spuPostFilterShader
|
||||
|
||||
<b>Default:</b> 0
|
||||
|
||||
@see spuPostFilterShader
|
||||
*/
|
||||
PxU32 spuPostFilterShaderSize;
|
||||
|
||||
/**
|
||||
\brief Immutable client that creates and owns this scene query.
|
||||
|
||||
NOT CURRENTLY SUPPORTED
|
||||
|
||||
@see PxScene::createClient()
|
||||
*/
|
||||
PxClientID ownerClient;
|
||||
|
||||
/**
|
||||
\brief The pointer to the user-allocated buffer for raycast query result
|
||||
|
||||
\note The length should be same as the number of raycast queries
|
||||
\note For ps3, this must be 16 bytes aligned and not on stack
|
||||
|
||||
@see PxRaycastQueryResult
|
||||
*/
|
||||
PxRaycastQueryResult* userRaycastResultBuffer;
|
||||
|
||||
/**
|
||||
\brief The pointer to the user-allocated buffer for raycast hits.
|
||||
\note The size of this buffer should be large enough to store PxRaycastHit.
|
||||
If the buffer is too small to store hits, the related PxRaycastQueryResult.queryStatus will be set to eABORTED
|
||||
\note For ps3, this buffer must be 16 bytes aligned and not on stack
|
||||
|
||||
*/
|
||||
PxRaycastHit* userRaycastHitBuffer;
|
||||
|
||||
/**
|
||||
\brief The pointer to the user-allocated buffer for sweep query result
|
||||
|
||||
\note The length should be same as the number of sweep query
|
||||
\note For ps3, this must be 16 bytes aligned and not on stack
|
||||
|
||||
@see PxRaycastQueryResult
|
||||
*/
|
||||
PxSweepQueryResult* userSweepResultBuffer;
|
||||
|
||||
/**
|
||||
\brief The pointer to the user-allocated buffer for sweep hits.
|
||||
\note The size of this buffer should be large enough to store PxSweepHit.
|
||||
If the buffer is too small to store hits, the related PxSweepQueryResult.queryStatus will be set to eABORTED
|
||||
\note For ps3, this buffer must be 16 bytes aligned and not on stack
|
||||
|
||||
*/
|
||||
PxSweepHit* userSweepHitBuffer;
|
||||
|
||||
/**
|
||||
\brief The pointer to the user-allocated buffer for overlap query result
|
||||
|
||||
\note The length should be same as the number of overlap query
|
||||
\note For ps3, this must be 16 bytes aligned and not on stack
|
||||
|
||||
@see PxRaycastQueryResult
|
||||
*/
|
||||
PxOverlapQueryResult* userOverlapResultBuffer;
|
||||
|
||||
/**
|
||||
\brief The pointer to the user-allocated buffer for overlap hits.
|
||||
\note The size of this buffer should be large enough to store the hits returned.
|
||||
If the buffer is too small to store hits, the related PxOverlapQueryResult.queryStatus will be set to eABORTED
|
||||
\note For ps3, this buffer must be 16 bytes aligned and not on stack
|
||||
|
||||
*/
|
||||
PxShape** userOverlapHitBuffer;
|
||||
|
||||
/**
|
||||
\brief The number of elements of the user-allocated userRaycastHitBuffer
|
||||
|
||||
*/
|
||||
PxU32 raycastHitBufferSize;
|
||||
|
||||
/**
|
||||
\brief The number of elements of the user-allocated userSweepHitBuffer
|
||||
|
||||
*/
|
||||
PxU32 sweepHitBufferSize;
|
||||
|
||||
/**
|
||||
\brief The number of elements of the user-allocated userOverlapHitBuffer
|
||||
|
||||
*/
|
||||
PxU32 overlapHitBufferSize;
|
||||
|
||||
|
||||
PX_INLINE PxBatchQueryDesc();
|
||||
PX_INLINE void setToDefault();
|
||||
PX_INLINE bool isValid() const;
|
||||
};
|
||||
|
||||
|
||||
PX_INLINE PxBatchQueryDesc::PxBatchQueryDesc() :
|
||||
filterShaderData (NULL),
|
||||
filterShaderDataSize (0),
|
||||
preFilterShader (NULL),
|
||||
postFilterShader (NULL),
|
||||
spuPreFilterShader (NULL),
|
||||
spuPreFilterShaderSize (0),
|
||||
spuPostFilterShader (NULL),
|
||||
spuPostFilterShaderSize (0),
|
||||
ownerClient (PX_DEFAULT_CLIENT),
|
||||
userRaycastResultBuffer (NULL),
|
||||
userRaycastHitBuffer (NULL),
|
||||
userSweepResultBuffer (NULL),
|
||||
userSweepHitBuffer (NULL),
|
||||
userOverlapResultBuffer (NULL),
|
||||
userOverlapHitBuffer (NULL),
|
||||
raycastHitBufferSize (0),
|
||||
sweepHitBufferSize (0),
|
||||
overlapHitBufferSize (0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
PX_INLINE void PxBatchQueryDesc::setToDefault()
|
||||
{
|
||||
*this = PxBatchQueryDesc();
|
||||
}
|
||||
|
||||
PX_INLINE bool PxBatchQueryDesc::isValid() const
|
||||
{
|
||||
if ( ((filterShaderDataSize == 0) && (filterShaderData != NULL)) ||
|
||||
((filterShaderDataSize > 0) && (filterShaderData == NULL)) )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
} // namespace physx
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif
|
86
Engine/ExtIncludes/physX3/windows/PxClient.h
Normal file
|
@ -0,0 +1,86 @@
|
|||
// This code contains NVIDIA Confidential Information and is disclosed to you
|
||||
// under a form of NVIDIA software license agreement provided separately to you.
|
||||
//
|
||||
// Notice
|
||||
// NVIDIA Corporation and its licensors retain all intellectual property and
|
||||
// proprietary rights in and to this software and related documentation and
|
||||
// any modifications thereto. Any use, reproduction, disclosure, or
|
||||
// distribution of this software and related documentation without an express
|
||||
// license agreement from NVIDIA Corporation is strictly prohibited.
|
||||
//
|
||||
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
|
||||
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
|
||||
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
|
||||
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// Information and code furnished is believed to be accurate and reliable.
|
||||
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
|
||||
// information or for any infringement of patents or other rights of third parties that may
|
||||
// result from its use. No license is granted by implication or otherwise under any patent
|
||||
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
|
||||
// This code supersedes and replaces all information previously supplied.
|
||||
// NVIDIA Corporation products are not authorized for use as critical
|
||||
// components in life support devices or systems without express written approval of
|
||||
// NVIDIA Corporation.
|
||||
//
|
||||
// Copyright (c) 2008-2013 NVIDIA Corporation. All rights reserved.
|
||||
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
|
||||
|
||||
|
||||
#ifndef PX_PHYSICS_NX_CLIENT
|
||||
#define PX_PHYSICS_NX_CLIENT
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
namespace physx
|
||||
{
|
||||
#endif
|
||||
|
||||
/**
|
||||
\brief An ID to identify different clients for multiclient support.
|
||||
*/
|
||||
typedef PxU8 PxClientID;
|
||||
|
||||
/**
|
||||
\brief The predefined default PxClientID value.
|
||||
*/
|
||||
static const PxClientID PX_DEFAULT_CLIENT = 0;
|
||||
|
||||
/**
|
||||
\brief The maximum number of clients we support.
|
||||
*/
|
||||
static const PxClientID PX_MAX_CLIENTS = 128;
|
||||
|
||||
/**
|
||||
\brief Multiclient behavior bit flags for clients.
|
||||
*/
|
||||
struct PxClientBehaviorBit
|
||||
{
|
||||
enum Enum
|
||||
{
|
||||
eREPORT_FOREIGN_OBJECTS_TO_TRIGGER_NOTIFY = 1,
|
||||
eREPORT_FOREIGN_OBJECTS_TO_CONTACT_NOTIFY = 2,
|
||||
eREPORT_FOREIGN_OBJECTS_TO_CONSTRAINT_BREAK_NOTIFY = 4,
|
||||
eREPORT_FOREIGN_OBJECTS_TO_SCENE_QUERY = 8,
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
\brief Multiclient behavior bit flags for actors.
|
||||
*/
|
||||
struct PxActorClientBehaviorBit
|
||||
{
|
||||
enum Enum
|
||||
{
|
||||
eREPORT_TO_FOREIGN_CLIENTS_TRIGGER_NOTIFY = 1,
|
||||
eREPORT_TO_FOREIGN_CLIENTS_CONTACT_NOTIFY = 2,
|
||||
eREPORT_TO_FOREIGN_CLIENTS_CONSTRAINT_BREAK_NOTIFY = 4,
|
||||
eREPORT_TO_FOREIGN_CLIENTS_SCENE_QUERY = 8,
|
||||
};
|
||||
};
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
} // namespace physx
|
||||
#endif
|
||||
|
||||
#endif
|
211
Engine/ExtIncludes/physX3/windows/PxConstraint.h
Normal file
|
@ -0,0 +1,211 @@
|
|||
// This code contains NVIDIA Confidential Information and is disclosed to you
|
||||
// under a form of NVIDIA software license agreement provided separately to you.
|
||||
//
|
||||
// Notice
|
||||
// NVIDIA Corporation and its licensors retain all intellectual property and
|
||||
// proprietary rights in and to this software and related documentation and
|
||||
// any modifications thereto. Any use, reproduction, disclosure, or
|
||||
// distribution of this software and related documentation without an express
|
||||
// license agreement from NVIDIA Corporation is strictly prohibited.
|
||||
//
|
||||
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
|
||||
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
|
||||
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
|
||||
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// Information and code furnished is believed to be accurate and reliable.
|
||||
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
|
||||
// information or for any infringement of patents or other rights of third parties that may
|
||||
// result from its use. No license is granted by implication or otherwise under any patent
|
||||
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
|
||||
// This code supersedes and replaces all information previously supplied.
|
||||
// NVIDIA Corporation products are not authorized for use as critical
|
||||
// components in life support devices or systems without express written approval of
|
||||
// NVIDIA Corporation.
|
||||
//
|
||||
// Copyright (c) 2008-2013 NVIDIA Corporation. All rights reserved.
|
||||
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
|
||||
|
||||
|
||||
#ifndef PX_PHYSICS_NX_CONSTRAINT
|
||||
#define PX_PHYSICS_NX_CONSTRAINT
|
||||
|
||||
/** \addtogroup physics
|
||||
@{
|
||||
*/
|
||||
|
||||
#include "PxPhysX.h"
|
||||
#include "PxConstraintDesc.h"
|
||||
#include "common/PxSerialFramework.h"
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
namespace physx
|
||||
{
|
||||
#endif
|
||||
|
||||
class PxRigidActor;
|
||||
class PxScene;
|
||||
class PxConstraintConnector;
|
||||
|
||||
/**
|
||||
\brief a table of function pointers for a constraint
|
||||
|
||||
@see PxConstraint
|
||||
*/
|
||||
|
||||
struct PxConstraintShaderTable
|
||||
{
|
||||
enum
|
||||
{
|
||||
eMAX_SOLVERPREPSPU_BYTESIZE=19056
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
eMAX_SOLVERPRPEP_DATASIZE=364
|
||||
};
|
||||
|
||||
PxConstraintSolverPrep solverPrep; //< solver constraint generation function
|
||||
void* solverPrepSpu; //< spu-optimized solver constraint generation function
|
||||
PxU32 solverPrepSpuByteSize; //< code size of the spu-optimized solver constraint generation function
|
||||
PxConstraintProject project; //< constraint projection function
|
||||
PxConstraintVisualize visualize; //< constraint visualization function
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
\brief a plugin class for implementing constraints
|
||||
|
||||
@see PxConstraint
|
||||
*/
|
||||
|
||||
class PxConstraint : public PxSerializable
|
||||
{
|
||||
public:
|
||||
virtual void release() = 0;
|
||||
|
||||
/**
|
||||
\brief Retrieves the scene which this constraint belongs to.
|
||||
|
||||
\return Owner Scene. NULL if not part of a scene.
|
||||
|
||||
@see PxScene
|
||||
*/
|
||||
virtual PxScene* getScene() const = 0;
|
||||
|
||||
/**
|
||||
\brief Retrieves the actors for this constraint.
|
||||
|
||||
\param[out] actor0 a reference to the pointer for the first actor
|
||||
\param[out] actor1 a reference to the pointer for the second actor
|
||||
|
||||
@see PxActor
|
||||
*/
|
||||
|
||||
virtual void getActors(PxRigidActor*& actor0, PxRigidActor*& actor1) const = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief Sets the actors for this constraint.
|
||||
|
||||
\param[in] actor0 a reference to the pointer for the first actor
|
||||
\param[in] actor1 a reference to the pointer for the second actor
|
||||
|
||||
@see PxActor
|
||||
*/
|
||||
|
||||
virtual void setActors(PxRigidActor* actor0, PxRigidActor* actor1) = 0;
|
||||
|
||||
/**
|
||||
\brief Notify the scene that the constraint shader data has been updated by the application
|
||||
*/
|
||||
|
||||
virtual void markDirty() = 0;
|
||||
|
||||
/**
|
||||
\brief Set the flags for this constraint
|
||||
|
||||
\param[in] flags the new constraint flags
|
||||
@see PxConstraintFlags
|
||||
*/
|
||||
|
||||
virtual void setFlags(PxConstraintFlags flags) = 0;
|
||||
|
||||
/**
|
||||
\brief Retrieve the flags for this constraint
|
||||
|
||||
\return the constraint flags
|
||||
@see PxConstraintFlags
|
||||
*/
|
||||
|
||||
virtual PxConstraintFlags getFlags() const = 0;
|
||||
|
||||
/**
|
||||
\brief Retrieve the constraint force most recently applied to maintain this constraint.
|
||||
|
||||
\param[out] linear the constraint force
|
||||
\param[out] angular the constraint torque
|
||||
*/
|
||||
virtual void getForce(PxVec3& linear, PxVec3& angular) const = 0;
|
||||
|
||||
|
||||
/**
|
||||
\brief Set the break force and torque thresholds for this constraint.
|
||||
|
||||
If either the force or torque measured at the constraint exceed these thresholds the constraint will break.
|
||||
|
||||
\param[in] linear the linear break threshold
|
||||
\param[in] angular the angular break threshold
|
||||
*/
|
||||
|
||||
virtual void setBreakForce(PxReal linear, PxReal angular) = 0;
|
||||
|
||||
/**
|
||||
\brief Retrieve the constraint break force and torque thresholds
|
||||
|
||||
\param[out] linear the linear break threshold
|
||||
\param[out] angular the angular break threshold
|
||||
|
||||
*/
|
||||
virtual void getBreakForce(PxReal& linear, PxReal& angular) const = 0;
|
||||
|
||||
/**
|
||||
\brief Fetch external owner of the constraint.
|
||||
|
||||
Provides a reference to the external owner of a constraint and a unique owner type ID.
|
||||
|
||||
\param[out] typeID Unique type identifier of the external object.
|
||||
\return Reference to the external object which owns the constraint.
|
||||
|
||||
@see PxConstraintConnector.getExternalReference()
|
||||
*/
|
||||
virtual void* getExternalReference(PxU32& typeID) = 0;
|
||||
|
||||
/**
|
||||
\brief Set the constraint functions for this constraint
|
||||
|
||||
\param[in] connector the constraint connector object by which the SDK communicates with the constraint.
|
||||
\param[in] shaders the shader table for the constraint
|
||||
|
||||
@see PxConstraintConnector PxConstraintSolverPrep PxConstraintProject PxConstraintVisualize
|
||||
*/
|
||||
virtual void setConstraintFunctions(PxConstraintConnector& connector,
|
||||
const PxConstraintShaderTable& shaders) = 0;
|
||||
|
||||
virtual const char* getConcreteTypeName() const { return "PxConstraint"; }
|
||||
|
||||
protected:
|
||||
PxConstraint() {}
|
||||
PxConstraint(PxRefResolver& v) : PxSerializable(v) {}
|
||||
virtual ~PxConstraint() {}
|
||||
virtual bool isKindOf(const char* name) const { return !strcmp("PxConstraint", name) || PxSerializable::isKindOf(name); }
|
||||
|
||||
};
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
} // namespace physx
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif
|
332
Engine/ExtIncludes/physX3/windows/PxConstraintDesc.h
Normal file
|
@ -0,0 +1,332 @@
|
|||
// This code contains NVIDIA Confidential Information and is disclosed to you
|
||||
// under a form of NVIDIA software license agreement provided separately to you.
|
||||
//
|
||||
// Notice
|
||||
// NVIDIA Corporation and its licensors retain all intellectual property and
|
||||
// proprietary rights in and to this software and related documentation and
|
||||
// any modifications thereto. Any use, reproduction, disclosure, or
|
||||
// distribution of this software and related documentation without an express
|
||||
// license agreement from NVIDIA Corporation is strictly prohibited.
|
||||
//
|
||||
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
|
||||
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
|
||||
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
|
||||
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// Information and code furnished is believed to be accurate and reliable.
|
||||
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
|
||||
// information or for any infringement of patents or other rights of third parties that may
|
||||
// result from its use. No license is granted by implication or otherwise under any patent
|
||||
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
|
||||
// This code supersedes and replaces all information previously supplied.
|
||||
// NVIDIA Corporation products are not authorized for use as critical
|
||||
// components in life support devices or systems without express written approval of
|
||||
// NVIDIA Corporation.
|
||||
//
|
||||
// Copyright (c) 2008-2013 NVIDIA Corporation. All rights reserved.
|
||||
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
|
||||
|
||||
|
||||
#ifndef PX_PHYSICS_NX_CONSTRAINTDESC
|
||||
#define PX_PHYSICS_NX_CONSTRAINTDESC
|
||||
|
||||
/** \addtogroup physics
|
||||
@{
|
||||
*/
|
||||
|
||||
#include "PxPhysX.h"
|
||||
#include "foundation/PxFlags.h"
|
||||
#include "foundation/PxMath.h"
|
||||
#include "foundation/PxVec3.h"
|
||||
#include "common/PxSerialFramework.h"
|
||||
|
||||
namespace physx { namespace debugger { namespace comm {
|
||||
class PvdDataStream;
|
||||
}}}
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
namespace physx
|
||||
{
|
||||
#endif
|
||||
|
||||
class PxConstraintConnector;
|
||||
class PxRigidActor;
|
||||
class PxScene;
|
||||
class PxConstraintConnector;
|
||||
class PxRenderBuffer;
|
||||
|
||||
/**
|
||||
\brief constraint flags
|
||||
|
||||
\note eBROKEN is a read only flag
|
||||
*/
|
||||
|
||||
struct PxConstraintFlag
|
||||
{
|
||||
enum Type
|
||||
{
|
||||
eBROKEN = 1<<0, //< whether the constraint is broken
|
||||
ePROJECTION = 1<<1, //< whether projection is enabled for this constraint
|
||||
eCOLLISION_ENABLED = 1<<2, //< whether contacts should be generated between the objects this constraint constrains
|
||||
eREPORTING = 1<<3, //< whether this constraint should generate force reports
|
||||
eVISUALIZATION = 1<<4, //< whether this constraint should be visualized, if constraint visualization is turned on
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
\brief constraint flags
|
||||
@see PxConstraintFlag
|
||||
*/
|
||||
|
||||
typedef PxFlags<PxConstraintFlag::Type, PxU16> PxConstraintFlags;
|
||||
PX_FLAGS_OPERATORS(PxConstraintFlag::Type, PxU16);
|
||||
|
||||
|
||||
/**
|
||||
\brief constraint row flags
|
||||
|
||||
These flags configure the post-processing of constraint rows and the behavior of the solver while solving constraints
|
||||
*/
|
||||
|
||||
struct Px1DConstraintFlag
|
||||
{
|
||||
enum Type
|
||||
{
|
||||
eSPRING = 1<<0, //< whether the constraint is a spring
|
||||
eACCELERATION_SPRING = 1<<1, //< whether the constraint is a force or acceleration spring
|
||||
eRESTITUTION = 1<<2, //< whether the restitution model should be applied to generate the target velocity
|
||||
eKEEPBIAS = 1<<3, //< for hard constraints, whether to keep the error term when solving the error-free velocity equation
|
||||
eOUTPUT_FORCE = 1<<4 //< whether to accumulate the force value from this constraint for the reported constraint force.
|
||||
};
|
||||
};
|
||||
|
||||
typedef PxFlags<Px1DConstraintFlag::Type, PxU16> Px1DConstraintFlags;
|
||||
PX_FLAGS_OPERATORS(Px1DConstraintFlag::Type, PxU16);
|
||||
|
||||
/**
|
||||
\brief A constraint
|
||||
|
||||
A constraint is expressed as a set of 1-dimensional constraint rows which define the required constraint
|
||||
on the objects' velocities.
|
||||
|
||||
Given these definitions, the solver attempts to generate
|
||||
|
||||
1. a set of velocities for the objects which, when integrated, respect the constraint errors:
|
||||
body0vel.dot(lin0,ang0) - body1vel.dot(lin1, ang1) + (geometricError / timestep) = velocityTarget
|
||||
|
||||
2. a set of velocities for the objects which respect the constraints:
|
||||
body0vel.dot(lin0,ang0) - body1vel.dot(lin1, ang1) = velocityTarget
|
||||
|
||||
Alternatively, the solver can attempt to resolve the velocity constraint as an implicit spring:
|
||||
|
||||
F = spring * -geometricError + damping * (velocityTarget - body0vel.dot(lin0,ang0) + body1vel.dot(lin1, ang1))
|
||||
|
||||
where F is the constraint force, or as an acceleration spring where acceleration replaces force.
|
||||
*/
|
||||
|
||||
PX_ALIGN_PREFIX(16)
|
||||
struct Px1DConstraint
|
||||
{
|
||||
PxVec3 linear0; //< linear component of velocity jacobian in world space
|
||||
PxReal geometricError; //< geometric error of the constraint along this axis
|
||||
PxVec3 angular0; //< angular component of velocity jacobian in world space
|
||||
PxReal velocityTarget; //< velocity target for the constraint along this axis
|
||||
|
||||
PxVec3 linear1; //< linear component of velocity jacobian in world space
|
||||
PxReal minImpulse; //< minimum impulse the solver may apply to enforce this constraint
|
||||
PxVec3 angular1; //< angular component of velocity jacobian in world space
|
||||
PxReal maxImpulse; //< maximum impulse the solver may apply to enforce this constraint
|
||||
|
||||
PxReal spring; //< spring parameter, for spring constraints
|
||||
PxReal damping; //< damping parameter, for spring constraints
|
||||
|
||||
PxReal restitution; //< restitution parameter for determining additional "bounce"
|
||||
|
||||
Px1DConstraintFlags flags; //< a set of Px1DConstraintFlags
|
||||
PxU16 solveGroup; //< constraint optimization hint: make this 256 for hard constraints with unbounded force limits, 257 for hard unilateral constraints with [0, inf) force limits, and 0 otherwise
|
||||
}
|
||||
PX_ALIGN_SUFFIX(16);
|
||||
|
||||
|
||||
/** \brief flags for determining which components of the constraint should be visualized
|
||||
*/
|
||||
|
||||
struct PxConstraintVisualizationFlag
|
||||
{
|
||||
enum Enum
|
||||
{
|
||||
eLOCAL_FRAMES = 1, //< visualize constraint frames
|
||||
eLIMITS = 2 //< visualize constraint limits
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
/** solver constraint generation shader
|
||||
|
||||
This function is called by the constraint solver framework. The function must be reentrant, since it may be called simultaneously
|
||||
from multiple threads, and should access only the arguments passed into it, since on PS3 this function may execute on SPU.
|
||||
|
||||
Developers writing custom constraints are encouraged to read the implementation code in PhysXExtensions.
|
||||
|
||||
\param[out] constraints an array of solver constraint rows to be filled in
|
||||
\param[out] body0WorldOffset the origin point at which the constraint is resolved. This value does not affect how constraints are solved, but the
|
||||
force and torque reported for the constraint are resolved at this point
|
||||
\param[in] constantBlock the constant data block
|
||||
\param[in] maxConstraints the size of the constraint buffer. At most this many constraints rows may be written
|
||||
\param[in] bodyAToWorld The world transform of the first constrained body (the identity if the body is NULL)
|
||||
\param[in] bodyBToWorld The world transform of the second constrained body (the identity if the body is NULL)
|
||||
|
||||
\return the number of constraint rows written.
|
||||
*/
|
||||
|
||||
typedef PxU32 (*PxConstraintSolverPrep)(Px1DConstraint* constraints,
|
||||
PxVec3& body0WorldOffset,
|
||||
PxU32 maxConstraints,
|
||||
const void* constantBlock,
|
||||
const PxTransform& bodyAToWorld,
|
||||
const PxTransform& bodyBToWorld);
|
||||
|
||||
/** solver constraint projection shader
|
||||
|
||||
This function is called by the constraint post-solver framework. The function must be reentrant, since it may be called simultaneously
|
||||
from multiple threads and should access only the arguments passed into it, since on PS3 this function may execute on SPU.
|
||||
|
||||
\param[in] constantBlock the constant data block
|
||||
\param[out] bodyAToWorld The world transform of the first constrained body (the identity if the body is NULL)
|
||||
\param[out] bodyBToWorld The world transform of the second constrained body (the identity if the body is NULL)
|
||||
\param[in] true if the constraint should be projected by moving the second body towards the first, false if the converse
|
||||
*/
|
||||
|
||||
typedef void (*PxConstraintProject)(const void* constantBlock,
|
||||
PxTransform& bodyAToWorld,
|
||||
PxTransform& bodyBToWorld,
|
||||
bool projectToA);
|
||||
|
||||
/**
|
||||
API used to visualize details about a constraint.
|
||||
*/
|
||||
class PxConstraintVisualizer
|
||||
{
|
||||
protected:
|
||||
virtual ~PxConstraintVisualizer(){}
|
||||
public:
|
||||
virtual void visualizeJointFrames( const PxTransform& parent, const PxTransform& child ) = 0;
|
||||
|
||||
virtual void visualizeLinearLimit( const PxTransform& t0, const PxTransform& t1, PxReal value, bool active ) = 0;
|
||||
|
||||
virtual void visualizeAngularLimit( const PxTransform& t0, PxReal lower, PxReal upper, bool active) = 0;
|
||||
|
||||
virtual void visualizeLimitCone( const PxTransform& t, PxReal ySwing, PxReal zSwing, bool active) = 0;
|
||||
|
||||
virtual void visualizeDoubleCone( const PxTransform& t, PxReal angle, bool active) = 0;
|
||||
};
|
||||
|
||||
/** solver constraint visualization function
|
||||
|
||||
This function is called by the constraint post-solver framework to visualize the constraint
|
||||
|
||||
\param[out] out the render buffer to render to
|
||||
\param[in] constantBlock the constant data block
|
||||
\param[in] body0Transform The world transform of the first constrained body (the identity if the body is NULL)
|
||||
\param[in] body1Transform The world transform of the second constrained body (the identity if the body is NULL)
|
||||
\param[in] frameScale the visualization scale for the constraint frames
|
||||
\param[in] limitScale the visualization scale for the constraint limits
|
||||
\param[in] flags the visualization flags
|
||||
|
||||
@see PxRenderBuffer
|
||||
*/
|
||||
typedef void (*PxConstraintVisualize)( PxConstraintVisualizer& visualizer,
|
||||
const void* constantBlock,
|
||||
const PxTransform& body0Transform,
|
||||
const PxTransform& body1Transform,
|
||||
PxU32 flags );
|
||||
|
||||
|
||||
struct PxPvdUpdateType
|
||||
{
|
||||
enum Enum
|
||||
{
|
||||
CREATE_INSTANCE,
|
||||
RELEASE_INSTANCE,
|
||||
UPDATE_ALL_PROPERTIES,
|
||||
UPDATE_SIM_PROPERTIES,
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
\brief This class connects a custom constraint to the SDK
|
||||
|
||||
This class connects a custom constraint to the SDK, and functions are called by the SDK
|
||||
to query the custom implementation for specific information to pass on to the application
|
||||
or inform the constraint when the application makes calls into the SDK which will update
|
||||
the custom constraint's internal implementation
|
||||
*/
|
||||
|
||||
class PxConstraintConnector
|
||||
{
|
||||
public:
|
||||
/**
|
||||
when the constraint is marked dirty, this function is called at the start of the simulation
|
||||
step for the SDK to copy the constraint data block.
|
||||
*/
|
||||
|
||||
virtual void* prepareData() = 0;
|
||||
|
||||
/**
|
||||
this function is called by the SDK to update PVD's view of it
|
||||
*/
|
||||
|
||||
virtual bool updatePvdProperties(physx::debugger::comm::PvdDataStream& pvdConnection,
|
||||
const PxConstraint* c,
|
||||
PxPvdUpdateType::Enum updateType) const = 0;
|
||||
|
||||
/**
|
||||
When the SDK deletes a PxConstraint object this function is called by the SDK. In general
|
||||
custom constraints should not be deleted directly by applications: rather, the constraint
|
||||
should respond to a release() request by calling PxConstraint::release(), then wait for
|
||||
this call to release its own resources, so that even if the release() call occurs during
|
||||
a simulation step, the deletion of the constraint is buffered until that step completes.
|
||||
|
||||
This function is also called when a PxConstraint object is deleted on cleanup due to
|
||||
destruction of the PxPhysics object.
|
||||
*/
|
||||
|
||||
virtual void onConstraintRelease() = 0;
|
||||
|
||||
/**
|
||||
This function is called by the SDK when the CoM of one of the actors is moved. Since the
|
||||
API specifies constraint positions relative to actors, and the constraint shader functions
|
||||
are supplied with coordinates relative to bodies, some synchronization is usually required
|
||||
when the application moves an object's center of mass.
|
||||
*/
|
||||
|
||||
virtual void onComShift(PxU32 actor) = 0;
|
||||
|
||||
/**
|
||||
\brief Fetches external data for a constraint.
|
||||
|
||||
This function is used by the SDK to acquire a reference to the owner of a constraint and a unique
|
||||
owner type ID. This information will be passed on when a breakable constraint breaks or when
|
||||
#PxConstraint::getExternalReference() is called.
|
||||
|
||||
\param[out] typeID Unique type identifier of the external object. The value 0xffffffff is reserved and should not be used. Furthermore, if the PhysX extensions library is used, some other IDs are reserved already (see PxConstraintExtIDs)
|
||||
\return Reference to the external object which owns the constraint.
|
||||
|
||||
@see PxConstraintInfo PxSimulationEventCallback.onConstraintBreak()
|
||||
*/
|
||||
virtual void* getExternalReference(PxU32& typeID) = 0;
|
||||
|
||||
/**
|
||||
\brief virtual destructor
|
||||
*/
|
||||
virtual ~PxConstraintConnector() {};
|
||||
};
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
} // namespace physx
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif
|
91
Engine/ExtIncludes/physX3/windows/PxContact.h
Normal file
|
@ -0,0 +1,91 @@
|
|||
// This code contains NVIDIA Confidential Information and is disclosed to you
|
||||
// under a form of NVIDIA software license agreement provided separately to you.
|
||||
//
|
||||
// Notice
|
||||
// NVIDIA Corporation and its licensors retain all intellectual property and
|
||||
// proprietary rights in and to this software and related documentation and
|
||||
// any modifications thereto. Any use, reproduction, disclosure, or
|
||||
// distribution of this software and related documentation without an express
|
||||
// license agreement from NVIDIA Corporation is strictly prohibited.
|
||||
//
|
||||
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
|
||||
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
|
||||
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
|
||||
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// Information and code furnished is believed to be accurate and reliable.
|
||||
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
|
||||
// information or for any infringement of patents or other rights of third parties that may
|
||||
// result from its use. No license is granted by implication or otherwise under any patent
|
||||
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
|
||||
// This code supersedes and replaces all information previously supplied.
|
||||
// NVIDIA Corporation products are not authorized for use as critical
|
||||
// components in life support devices or systems without express written approval of
|
||||
// NVIDIA Corporation.
|
||||
//
|
||||
// Copyright (c) 2008-2013 NVIDIA Corporation. All rights reserved.
|
||||
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
|
||||
|
||||
|
||||
#ifndef PX_CONTACT_H
|
||||
#define PX_CONTACT_H
|
||||
|
||||
#include "foundation/PxVec3.h"
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
namespace physx
|
||||
{
|
||||
#endif
|
||||
|
||||
#ifdef PX_VC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4324) // Padding was added at the end of a structure because of a __declspec(align) value.
|
||||
#endif
|
||||
|
||||
/**
|
||||
\brief A contact point as used by contact modification
|
||||
*/
|
||||
struct PxContactPoint
|
||||
{
|
||||
/**
|
||||
\brief The normal of the contacting surfaces at the contact point.
|
||||
|
||||
For two shapes s0 and s1, the normal points in the direction that s0 needs to move in to resolve the contact with s1.
|
||||
*/
|
||||
PX_ALIGN(16, PxVec3 normal);
|
||||
|
||||
/**
|
||||
\brief The point of contact between the shapes, in world space.
|
||||
*/
|
||||
PX_ALIGN(16, PxVec3 point);
|
||||
|
||||
/**
|
||||
\brief The separation of the shapes at the contact point. A negative separation denotes a penetration.
|
||||
*/
|
||||
PxReal separation;
|
||||
|
||||
/**
|
||||
\brief The surface index of shape 0 at the contact point. This is used to identify the surface material.
|
||||
|
||||
\note This field is only supported by triangle meshes and heightfields, else it will be set to PXC_CONTACT_NO_FACE_INDEX.
|
||||
*/
|
||||
PxU32 internalFaceIndex0;
|
||||
|
||||
/**
|
||||
\brief The surface index of shape 1 at the contact point. This is used to identify the surface material.
|
||||
|
||||
\note This field is only supported by triangle meshes and heightfields, else it will be set to PXC_CONTACT_NO_FACE_INDEX.
|
||||
*/
|
||||
PxU32 internalFaceIndex1;
|
||||
};
|
||||
|
||||
#ifdef PX_VC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
} // namespace physx
|
||||
#endif
|
||||
|
||||
#endif
|
275
Engine/ExtIncludes/physX3/windows/PxContactModifyCallback.h
Normal file
|
@ -0,0 +1,275 @@
|
|||
// This code contains NVIDIA Confidential Information and is disclosed to you
|
||||
// under a form of NVIDIA software license agreement provided separately to you.
|
||||
//
|
||||
// Notice
|
||||
// NVIDIA Corporation and its licensors retain all intellectual property and
|
||||
// proprietary rights in and to this software and related documentation and
|
||||
// any modifications thereto. Any use, reproduction, disclosure, or
|
||||
// distribution of this software and related documentation without an express
|
||||
// license agreement from NVIDIA Corporation is strictly prohibited.
|
||||
//
|
||||
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
|
||||
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
|
||||
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
|
||||
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// Information and code furnished is believed to be accurate and reliable.
|
||||
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
|
||||
// information or for any infringement of patents or other rights of third parties that may
|
||||
// result from its use. No license is granted by implication or otherwise under any patent
|
||||
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
|
||||
// This code supersedes and replaces all information previously supplied.
|
||||
// NVIDIA Corporation products are not authorized for use as critical
|
||||
// components in life support devices or systems without express written approval of
|
||||
// NVIDIA Corporation.
|
||||
//
|
||||
// Copyright (c) 2008-2013 NVIDIA Corporation. All rights reserved.
|
||||
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
|
||||
|
||||
|
||||
#ifndef PX_CONTACT_MODIFY_CALLBACK
|
||||
#define PX_CONTACT_MODIFY_CALLBACK
|
||||
/** \addtogroup physics
|
||||
@{
|
||||
*/
|
||||
|
||||
#include "PxPhysX.h"
|
||||
#include "PxShape.h"
|
||||
#include "PxContact.h"
|
||||
#include "foundation/PxTransform.h"
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
namespace physx
|
||||
{
|
||||
#endif
|
||||
|
||||
class PxShape;
|
||||
|
||||
/**
|
||||
\brief per-ontact point solver inputs as used by contact modification
|
||||
*/
|
||||
|
||||
struct PxContactPointAux
|
||||
{
|
||||
/**
|
||||
\brief The desired target velocity at the contact point in the direction of the contact normal. For resting contact, this is zero, or positive
|
||||
to make the objects pop apart.
|
||||
|
||||
For a contact point between two bodies b0 and b1, the target velocity refers to the relative velocity of b0 with respect to b1 (in other words,
|
||||
the velocity of b0 if b1 was considered static). The target velocity is split into a component parallel to the contact normal and a component
|
||||
perpendicular to the contact normal. The force, resulting from the target velocity parallel to the contact normal, will only get applied if it
|
||||
is positive. Flipping the contact normal, for example, might thus cause colliding objects to penetrate further because the necessary force
|
||||
along the contact normal is negative.
|
||||
*/
|
||||
PxVec3 targetVelocity;
|
||||
|
||||
/**
|
||||
\brief The maximum impulse the solver is permitted to apply at the contact point in order to try to meet the
|
||||
targetVelocity requirement. If max impulse is zero, the solver is not able to apply any impulse at the contact, and as a result the contact will be ignored.
|
||||
*/
|
||||
PxReal maxImpulse;
|
||||
};
|
||||
|
||||
/**
|
||||
\brief An array of contact points, as passed to contact modification.
|
||||
|
||||
The word 'set' in the name does not imply that duplicates are filtered in any
|
||||
way. This initial set of contacts does potentially get reduced to a smaller
|
||||
set before being passed to the solver.
|
||||
|
||||
You can use the accessors to read and write contact properties. The number of
|
||||
contacts is immutable, other than being able to disable contacts using ignore().
|
||||
|
||||
@see PxContactModifyCallback, PxContactPoint, PxContactPointAux
|
||||
*/
|
||||
class PxContactSet
|
||||
{
|
||||
public:
|
||||
/**
|
||||
\brief Get the position of a specific contact point in the set.
|
||||
|
||||
@see PxContactPoint.PX_ALIGN(16, PxVec3 point)
|
||||
*/
|
||||
PX_FORCE_INLINE const PxVec3& getPoint(PxU32 i) const { return mContacts[i].point; }
|
||||
|
||||
/**
|
||||
\brief Alter the position of a specific contact point in the set.
|
||||
|
||||
@see PxContactPoint.PX_ALIGN(16, PxVec3 point)
|
||||
*/
|
||||
PX_FORCE_INLINE void setPoint(PxU32 i, const PxVec3& p) { mContacts[i].point = p; }
|
||||
|
||||
/**
|
||||
\brief Get the contact normal of a specific contact point in the set.
|
||||
|
||||
@see PxContactPoint.PX_ALIGN(16, PxVec3 normal)
|
||||
*/
|
||||
PX_FORCE_INLINE const PxVec3& getNormal(PxU32 i) const { return mContacts[i].normal; }
|
||||
|
||||
/**
|
||||
\brief Alter the contact normal of a specific contact point in the set.
|
||||
|
||||
\note Changing the normal can cause contact points to be ignored. Please read the documentation on #PxContactPointAux.targetVelocity for more details.
|
||||
|
||||
@see PxContactPoint.PX_ALIGN(16, PxVec3 normal)
|
||||
*/
|
||||
PX_FORCE_INLINE void setNormal(PxU32 i, const PxVec3& n) { mContacts[i].normal = n;}
|
||||
|
||||
/**
|
||||
\brief Get the separation of a specific contact point in the set.
|
||||
|
||||
@see PxContactPoint.separation
|
||||
*/
|
||||
PX_FORCE_INLINE PxReal getSeparation(PxU32 i) const { return mContacts[i].separation; }
|
||||
|
||||
/**
|
||||
\brief Alter the separation of a specific contact point in the set.
|
||||
|
||||
@see PxContactPoint.separation
|
||||
*/
|
||||
PX_FORCE_INLINE void setSeparation(PxU32 i, PxReal s) { mContacts[i].separation = s; }
|
||||
|
||||
/**
|
||||
\brief Get the target velocity of a specific contact point in the set.
|
||||
|
||||
@see PxContactPointAux.targetVelocity
|
||||
*/
|
||||
PX_FORCE_INLINE const PxVec3& getTargetVelocity(PxU32 i) const { return mAux[i].targetVelocity; }
|
||||
|
||||
/**
|
||||
\brief Alter the target velocity of a specific contact point in the set.
|
||||
|
||||
@see PxContactPointAux.targetVelocity
|
||||
*/
|
||||
PX_FORCE_INLINE void setTargetVelocity(PxU32 i, const PxVec3& v){ mAux[i].targetVelocity = v;}
|
||||
|
||||
/**
|
||||
\brief Get the face index with respect to the first shape of the pair for a specific contact point in the set.
|
||||
|
||||
@see PxContactPoint.internalFaceIndex0
|
||||
*/
|
||||
PX_FORCE_INLINE PxU32 getInternalFaceIndex0(PxU32 i) { return mContacts[i].internalFaceIndex0; }
|
||||
|
||||
/**
|
||||
\brief Get the face index with respect to the second shape of the pair for a specific contact point in the set.
|
||||
|
||||
@see PxContactPoint.internalFaceIndex1
|
||||
*/
|
||||
PX_FORCE_INLINE PxU32 getInternalFaceIndex1(PxU32 i) { return mContacts[i].internalFaceIndex1; }
|
||||
|
||||
/**
|
||||
\brief Get the maximum impulse for a specific contact point in the set.
|
||||
|
||||
@see PxContactPointAux.maxImpulse
|
||||
*/
|
||||
PX_FORCE_INLINE PxReal getMaxImpulse(PxU32 i) const { return mAux[i].maxImpulse; }
|
||||
|
||||
/**
|
||||
\brief Alter the maximum impulse for a specific contact point in the set.
|
||||
|
||||
\note Must be nonnegative. If set to zero, the contact point will be ignored
|
||||
|
||||
@see PxContactPointAux.maxImpulse
|
||||
*/
|
||||
PX_FORCE_INLINE void setMaxImpulse(PxU32 i, PxReal s) { mAux[i].maxImpulse = s; }
|
||||
|
||||
/**
|
||||
\brief Ignore the contact point.
|
||||
|
||||
If a contact point is ignored then no force will get applied at this point. This can be used to disable collision in certain areas of a shape, for example.
|
||||
*/
|
||||
PX_FORCE_INLINE void ignore(PxU32 i) { mAux[i].maxImpulse = 0; }
|
||||
|
||||
/**
|
||||
\brief The number of contact points in the set.
|
||||
*/
|
||||
PX_FORCE_INLINE PxU32 size() const { return mCount; }
|
||||
|
||||
protected:
|
||||
PxU32 mCount; //!< Number of contact points in the set
|
||||
PxContactPoint* mContacts; //!< The contact points of the set
|
||||
PxContactPointAux* mAux; //!< Additional data for each contact point of the set
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
\brief An array of instances of this class is passed to PxContactModifyCallback::onContactModify().
|
||||
|
||||
@see PxContactModifyCallback
|
||||
*/
|
||||
|
||||
class PxContactModifyPair
|
||||
{
|
||||
public:
|
||||
/**
|
||||
\brief The shapes which make up the pair in contact.
|
||||
|
||||
Note that these are the shapes as seen by the simulation, and may have been deleted since the simulation step started.
|
||||
*/
|
||||
|
||||
const PxShape* shape[2];
|
||||
|
||||
/**
|
||||
\brief The shape to world transforms of the two shapes.
|
||||
|
||||
These are the transforms as the simulation engine sees them, and may have been modified by the application
|
||||
since the simulation step started.
|
||||
|
||||
*/
|
||||
|
||||
PxTransform transform[2];
|
||||
|
||||
/**
|
||||
\brief An array of contact points between these two shapes.
|
||||
*/
|
||||
|
||||
PxContactSet contacts;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
\brief An interface class that the user can implement in order to modify contact constraints.
|
||||
|
||||
<b>Threading:</b> It is <b>necessary</b> to make this class thread safe as it will be called in the context of the
|
||||
simulation thread. It might also be necessary to make it reentrant, since some calls can be made by multi-threaded
|
||||
parts of the physics engine.
|
||||
|
||||
You can enable the use of this contact modification callback by raising the flag PxPairFlag::eMODIFY_CONTACTS in
|
||||
the filter shader/callback (see #PxSimulationFilterShader) for a pair of rigid body objects.
|
||||
|
||||
Please note:
|
||||
+ Raising the contact modification flag will not wake the actors up automatically.
|
||||
+ It is not possible to turn off the performance degradation by simply removing the callback from the scene, the
|
||||
filter shader/callback has to be used to clear the contact modification flag.
|
||||
+ The contacts will only be reported as long as the actors are awake. There will be no callbacks while the actors are sleeping.
|
||||
|
||||
@see PxScene.setContactModifyCallback() PxScene.getContactModifyCallback()
|
||||
*/
|
||||
class PxContactModifyCallback
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
\brief Passes modifiable arrays of contacts to the application.
|
||||
|
||||
The initial contacts are as determined fresh each frame by collision detection.
|
||||
|
||||
The number of contacts can not be changed, so you cannot add your own contacts. You may however
|
||||
disable contacts using PxContactSet::ignore().
|
||||
|
||||
@see PxContactModifyPair
|
||||
*/
|
||||
virtual void onContactModify(PxContactModifyPair* const pairs, PxU32 count) = 0;
|
||||
|
||||
protected:
|
||||
virtual ~PxContactModifyCallback(){}
|
||||
};
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
} // namespace physx
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif
|
587
Engine/ExtIncludes/physX3/windows/PxFiltering.h
Normal file
|
@ -0,0 +1,587 @@
|
|||
// This code contains NVIDIA Confidential Information and is disclosed to you
|
||||
// under a form of NVIDIA software license agreement provided separately to you.
|
||||
//
|
||||
// Notice
|
||||
// NVIDIA Corporation and its licensors retain all intellectual property and
|
||||
// proprietary rights in and to this software and related documentation and
|
||||
// any modifications thereto. Any use, reproduction, disclosure, or
|
||||
// distribution of this software and related documentation without an express
|
||||
// license agreement from NVIDIA Corporation is strictly prohibited.
|
||||
//
|
||||
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
|
||||
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
|
||||
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
|
||||
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// Information and code furnished is believed to be accurate and reliable.
|
||||
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
|
||||
// information or for any infringement of patents or other rights of third parties that may
|
||||
// result from its use. No license is granted by implication or otherwise under any patent
|
||||
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
|
||||
// This code supersedes and replaces all information previously supplied.
|
||||
// NVIDIA Corporation products are not authorized for use as critical
|
||||
// components in life support devices or systems without express written approval of
|
||||
// NVIDIA Corporation.
|
||||
//
|
||||
// Copyright (c) 2008-2013 NVIDIA Corporation. All rights reserved.
|
||||
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
|
||||
|
||||
|
||||
#ifndef PX_PHYSICS_NX_FILTERING
|
||||
#define PX_PHYSICS_NX_FILTERING
|
||||
/** \addtogroup physics
|
||||
@{
|
||||
*/
|
||||
|
||||
#include "PxPhysX.h"
|
||||
#include "foundation/PxFlags.h"
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
namespace physx
|
||||
{
|
||||
#endif
|
||||
|
||||
class PxActor;
|
||||
class PxShape;
|
||||
|
||||
|
||||
/**
|
||||
\brief Collection of flags describing the actions to take for a collision pair.
|
||||
|
||||
@see PxPairFlags PxSimulationFilterShader.filter() PxSimulationFilterCallback
|
||||
*/
|
||||
struct PxPairFlag
|
||||
{
|
||||
enum Enum
|
||||
{
|
||||
/**
|
||||
\brief Process the contacts of this collision pair in the dynamics solver.
|
||||
|
||||
\note Only takes effect if the colliding actors are rigid bodies.
|
||||
*/
|
||||
eRESOLVE_CONTACTS = (1<<0),
|
||||
|
||||
/**
|
||||
\brief Call contact modification callback for this collision pair
|
||||
|
||||
\note Only takes effect if the colliding actors are rigid bodies.
|
||||
|
||||
@see PxContactModifyCallback
|
||||
*/
|
||||
eMODIFY_CONTACTS = (1<<1),
|
||||
|
||||
/**
|
||||
\brief Call contact report callback or trigger callback when this collision pair starts to be in contact.
|
||||
|
||||
If one of the two collision objects is a trigger shape (see #PxShapeFlag::eTRIGGER_SHAPE)
|
||||
then the trigger callback will get called as soon as the other object enters the trigger volume.
|
||||
If none of the two collision objects is a trigger shape then the contact report callback will get
|
||||
called when the actors of this collision pair start to be in contact.
|
||||
|
||||
\note Only takes effect if the colliding actors are rigid bodies.
|
||||
|
||||
@see PxSimulationEventCallback.onContact() PxSimulationEventCallback.onTrigger()
|
||||
*/
|
||||
eNOTIFY_TOUCH_FOUND = (1<<2),
|
||||
|
||||
/**
|
||||
\brief Call contact report callback or trigger callback while this collision pair is in contact
|
||||
|
||||
If one of the two collision objects is a trigger shape (see #PxShapeFlag::eTRIGGER_SHAPE)
|
||||
then the trigger callback will get called as long as the other object stays within the trigger volume.
|
||||
If none of the two collision objects is a trigger shape then the contact report callback will get
|
||||
called while the actors of this collision pair are in contact.
|
||||
|
||||
\note For trigger reports, this functionality is deprecated and will be removed in the next release.
|
||||
|
||||
\note Only takes effect if the colliding actors are rigid bodies.
|
||||
|
||||
\note No report will get sent if the objects in contact are sleeping.
|
||||
|
||||
@see PxSimulationEventCallback.onContact() PxSimulationEventCallback.onTrigger()
|
||||
*/
|
||||
eNOTIFY_TOUCH_PERSISTS = (1<<3),
|
||||
|
||||
/**
|
||||
\brief Call contact report callback or trigger callback when this collision pair stops to be in contact
|
||||
|
||||
If one of the two collision objects is a trigger shape (see #PxShapeFlag::eTRIGGER_SHAPE)
|
||||
then the trigger callback will get called as soon as the other object leaves the trigger volume.
|
||||
If none of the two collision objects is a trigger shape then the contact report callback will get
|
||||
called when the actors of this collision pair stop to be in contact.
|
||||
|
||||
\note Only takes effect if the colliding actors are rigid bodies.
|
||||
|
||||
\note This event will also get triggered if one of the colliding objects gets deleted.
|
||||
|
||||
@see PxSimulationEventCallback.onContact() PxSimulationEventCallback.onTrigger()
|
||||
*/
|
||||
eNOTIFY_TOUCH_LOST = (1<<4),
|
||||
|
||||
/**
|
||||
\brief Call contact report callback when the contact force between the actors of this collision pair exceeds one of the actor-defined force thresholds.
|
||||
|
||||
\note Only takes effect if the colliding actors are rigid bodies.
|
||||
|
||||
@see PxSimulationEventCallback.onContact()
|
||||
*/
|
||||
eNOTIFY_THRESHOLD_FORCE_FOUND = (1<<5),
|
||||
|
||||
/**
|
||||
\brief Call contact report callback when the contact force between the actors of this collision pair continues to exceed one of the actor-defined force thresholds.
|
||||
|
||||
\note Only takes effect if the colliding actors are rigid bodies.
|
||||
|
||||
\note If a pair gets re-filtered and this flag has previously been disabled, then the report will not get fired in the same frame even if the force threshold has been reached in the
|
||||
previous one (unless #eNOTIFY_THRESHOLD_FORCE_FOUND has been set in the previous frame).
|
||||
|
||||
@see PxSimulationEventCallback.onContact()
|
||||
*/
|
||||
eNOTIFY_THRESHOLD_FORCE_PERSISTS = (1<<6),
|
||||
|
||||
/**
|
||||
\brief Call contact report callback when the contact force between the actors of this collision pair falls below one of the actor-defined force thresholds (includes the case where this collision pair stops being in contact).
|
||||
|
||||
\note Only takes effect if the colliding actors are rigid bodies.
|
||||
|
||||
\note If a pair gets re-filtered and this flag has previously been disabled, then the report will not get fired in the same frame even if the force threshold has been reached in the
|
||||
previous one (unless #eNOTIFY_THRESHOLD_FORCE_FOUND or #eNOTIFY_THRESHOLD_FORCE_PERSISTS has been set in the previous frame).
|
||||
|
||||
@see PxSimulationEventCallback.onContact()
|
||||
*/
|
||||
eNOTIFY_THRESHOLD_FORCE_LOST = (1<<7),
|
||||
|
||||
/**
|
||||
\brief Provide contact points in contact reports for this collision pair.
|
||||
|
||||
\note Only takes effect if the colliding actors are rigid bodies and if used in combination with the flags eNOTIFY_TOUCH_... or eNOTIFY_THRESHOLD_FORCE_...
|
||||
|
||||
@see PxSimulationEventCallback.onContact() PxConstContactStream PxContactStreamIterator PxContactStreamIterator.getPoint()
|
||||
*/
|
||||
eNOTIFY_CONTACT_POINTS = (1<<8),
|
||||
|
||||
/**
|
||||
\brief This flag is used to indicate that per-pair CCD is enabled. Currently only linear sweep is supported.
|
||||
|
||||
\note The scene must have PxSceneFlag::eENABLE_SWEPT_INTEGRATION enabled to use this feature.
|
||||
\note Non-static shapes of the pair should have PxShapeFlag::eUSE_SWEPT_BOUNDS specified for this feature to work correctly.
|
||||
|
||||
@see PxShapeFlag::eUSE_SWEPT_BOUNDS
|
||||
@see PxSceneFlag::eENABLE_SWEPT_INTEGRATION
|
||||
*/
|
||||
eSWEPT_INTEGRATION_LINEAR = (1<<9),
|
||||
|
||||
/**
|
||||
\brief Provided default flag to do simple contact processing for this collision pair.
|
||||
*/
|
||||
eCONTACT_DEFAULT = eRESOLVE_CONTACTS,
|
||||
|
||||
/**
|
||||
\brief Provided default flag to get commonly used trigger behavior for this collision pair.
|
||||
*/
|
||||
eTRIGGER_DEFAULT = eNOTIFY_TOUCH_FOUND | eNOTIFY_TOUCH_LOST
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
\brief Bitfield that contains a set of raised flags defined in PxPairFlag.
|
||||
|
||||
@see PxPairFlag
|
||||
*/
|
||||
typedef PxFlags<PxPairFlag::Enum, PxU16> PxPairFlags;
|
||||
PX_FLAGS_OPERATORS(PxPairFlag::Enum, PxU16);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
\brief Collection of flags describing the filter actions to take for a collision pair.
|
||||
|
||||
@see PxFilterFlags PxSimulationFilterShader PxSimulationFilterCallback
|
||||
*/
|
||||
struct PxFilterFlag
|
||||
{
|
||||
enum Enum
|
||||
{
|
||||
/**
|
||||
\brief Ignore the collision pair as long as the bounding volumes of the pair objects overlap.
|
||||
|
||||
Killed pairs will be ignored by the simulation and won't run through the filter again until one
|
||||
of the following occurs:
|
||||
|
||||
\li The bounding volumes of the two objects overlap again (after being separated)
|
||||
\li The user enforces a re-filtering (see #PxShape::resetFiltering(), #PxParticleSystem::resetFiltering())
|
||||
|
||||
@see PxShape::resetFiltering() PxParticleBase::resetFiltering()
|
||||
*/
|
||||
eKILL = (1<<0),
|
||||
|
||||
/**
|
||||
\brief Ignore the collision pair as long as the bounding volumes of the pair objects overlap or until filtering relevant data changes for one of the collision objects.
|
||||
|
||||
Suppressed pairs will be ignored by the simulation and won't make another filter request until one
|
||||
of the following occurs:
|
||||
|
||||
\li Same conditions as for killed pairs (see #eKILL)
|
||||
\li The filter data or the filter object attributes change for one of the collision objects
|
||||
|
||||
@see PxFilterData PxFilterObjectAttributes
|
||||
*/
|
||||
eSUPPRESS = (1<<1),
|
||||
|
||||
/**
|
||||
\brief Invoke the filter callback (#PxSimulationFilterCallback::pairFound()) for this collision pair.
|
||||
|
||||
@see PxSimulationFilterCallback
|
||||
*/
|
||||
eCALLBACK = (1<<2),
|
||||
|
||||
/**
|
||||
\brief Track this collision pair with the filter callback mechanism.
|
||||
|
||||
When the bounding volumes of the collision pair lose contact, the filter callback #PxSimulationFilterCallback::pairLost()
|
||||
will be invoked. Furthermore, the filter status of the collision pair can be adjusted through #PxSimulationFilterCallback::statusChange()
|
||||
once per frame (until a pairLost() notification occurs).
|
||||
|
||||
@see PxSimulationFilterCallback
|
||||
*/
|
||||
eNOTIFY = (1<<3) | eCALLBACK,
|
||||
|
||||
/**
|
||||
\brief Provided default to get standard behavior:
|
||||
|
||||
The application configure the pair's collision properties once when bounding volume overlap is found and
|
||||
doesn't get asked again about that pair until overlap status or filter properties changes, or re-filtering is requested.
|
||||
|
||||
No notification is provided when bounding volume overlap is lost
|
||||
|
||||
The pair will not be killed or suppressed, so collision detection will be processed
|
||||
*/
|
||||
|
||||
eDEFAULT = 0
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
\brief Bitfield that contains a set of raised flags defined in PxFilterFlag.
|
||||
|
||||
@see PxFilterFlag
|
||||
*/
|
||||
typedef PxFlags<PxFilterFlag::Enum, PxU16> PxFilterFlags;
|
||||
PX_FLAGS_OPERATORS(PxFilterFlag::Enum, PxU16);
|
||||
|
||||
|
||||
/**
|
||||
\brief PxFilterData is user-definable data which gets passed into the collision filtering shader and/or callback.
|
||||
|
||||
@see PxShape.setSimulationFilterData() PxShape.getSimulationFilterData() PxSimulationFilterShader PxSimulationFilterCallback
|
||||
*/
|
||||
struct PxFilterData
|
||||
{
|
||||
PX_INLINE PxFilterData(const PxEmpty&)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Default constructor.
|
||||
*/
|
||||
PX_INLINE PxFilterData()
|
||||
{
|
||||
word0 = word1 = word2 = word3 = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Constructor to set filter data initially.
|
||||
*/
|
||||
PX_INLINE PxFilterData(PxU32 w0, PxU32 w1, PxU32 w2, PxU32 w3) : word0(w0), word1(w1), word2(w2), word3(w3) {}
|
||||
|
||||
/**
|
||||
\brief (re)sets the structure to the default.
|
||||
*/
|
||||
PX_INLINE void setToDefault()
|
||||
{
|
||||
*this = PxFilterData();
|
||||
}
|
||||
|
||||
PxU32 word0;
|
||||
PxU32 word1;
|
||||
PxU32 word2;
|
||||
PxU32 word3;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
\brief Identifies each type of filter object.
|
||||
|
||||
@see PxGetFilterObjectType()
|
||||
*/
|
||||
struct PxFilterObjectType
|
||||
{
|
||||
enum Enum
|
||||
{
|
||||
/**
|
||||
\brief A static rigid body
|
||||
@see PxRigidStatic
|
||||
*/
|
||||
eRIGID_STATIC,
|
||||
|
||||
/**
|
||||
\brief A dynamic rigid body
|
||||
@see PxRigidDynamic
|
||||
*/
|
||||
eRIGID_DYNAMIC,
|
||||
|
||||
/**
|
||||
\brief A particle system
|
||||
@see PxParticleSystem
|
||||
*/
|
||||
ePARTICLE_SYSTEM,
|
||||
|
||||
/**
|
||||
\brief A particle fluid
|
||||
@see PxParticleFluid
|
||||
*/
|
||||
ePARTICLE_FLUID,
|
||||
|
||||
/**
|
||||
\brief An articulation
|
||||
@see PxArticulation
|
||||
*/
|
||||
eARTICULATION,
|
||||
|
||||
//brief internal use only!
|
||||
eMAX_TYPE_COUNT = 16,
|
||||
|
||||
//brief internal use only!
|
||||
eUNDEFINED = eMAX_TYPE_COUNT-1
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
// For internal use only
|
||||
struct PxFilterObjectFlags
|
||||
{
|
||||
enum Enum
|
||||
{
|
||||
eKINEMATIC = (1<<4),
|
||||
eTRIGGER = (1<<5)
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
\brief Structure which gets passed into the collision filtering shader and/or callback providing additional information on objects of a collision pair
|
||||
|
||||
@see PxSimulationFilterShader PxSimulationFilterCallback getActorType() PxFilterObjectIsKinematic() PxFilterObjectIsTrigger()
|
||||
*/
|
||||
typedef PxU32 PxFilterObjectAttributes;
|
||||
|
||||
|
||||
/**
|
||||
\brief Extract filter object type from the filter attributes of a collision pair object
|
||||
|
||||
\param[in] attr The filter attribute of a collision pair object
|
||||
\return The type of the collision pair object.
|
||||
|
||||
@see PxFilterObjectType
|
||||
*/
|
||||
PX_INLINE PxFilterObjectType::Enum PxGetFilterObjectType(PxFilterObjectAttributes attr)
|
||||
{
|
||||
return static_cast<PxFilterObjectType::Enum>( (attr & (PxFilterObjectType::eMAX_TYPE_COUNT-1)) );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
\brief Specifies whether the collision object belongs to a kinematic rigid body
|
||||
|
||||
\param[in] attr The filter attribute of a collision pair object
|
||||
\return True if the object belongs to a kinematic rigid body, else false
|
||||
|
||||
@see PxRigidDynamicFlag::eKINEMATIC
|
||||
*/
|
||||
PX_INLINE bool PxFilterObjectIsKinematic(PxFilterObjectAttributes attr)
|
||||
{
|
||||
return ((attr & PxFilterObjectFlags::eKINEMATIC) != 0);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
\brief Specifies whether the collision object is a trigger shape
|
||||
|
||||
\param[in] attr The filter attribute of a collision pair object
|
||||
\return True if the object is a trigger shape, else false
|
||||
|
||||
@see PxShapeFlag::eTRIGGER_SHAPE
|
||||
*/
|
||||
PX_INLINE bool PxFilterObjectIsTrigger(PxFilterObjectAttributes attr)
|
||||
{
|
||||
return ((attr & PxFilterObjectFlags::eTRIGGER) != 0);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
\brief Filter shader to specify handling of collision pairs.
|
||||
|
||||
Collision filtering is a mechanism to specify how a pair of potentially colliding objects should be processed by the
|
||||
simulation. A pair of objects is potentially colliding if the bounding volumes of the two objects overlap.
|
||||
In short, a collision filter decides whether a collision pair should get processed, temporarily ignored or discarded.
|
||||
If a collision pair should get processed, the filter can additionally specify how it should get processed, for instance,
|
||||
whether contacts should get resolved, which callbacks should get invoked or which reports should be sent etc.
|
||||
|
||||
\note A default implementation of a filter shader is provided in the PhysX extensions library, see #PxDefaultSimulationFilterShader.
|
||||
|
||||
@see PxSceneDesc.filterShader PxSimulationFilterCallback
|
||||
*/
|
||||
|
||||
/**
|
||||
\brief Filter method to specify how a pair of potentially colliding objects should be processed.
|
||||
|
||||
Return the PxFilterFlag flags and set the PxPairFlag flags to define what the simulation should do with the given collision pair.
|
||||
|
||||
This methods gets called when:
|
||||
\li The bounding volumes of two objects start to overlap.
|
||||
\li The bounding volumes of two objects overlap and the filter data or filter attributes of one of the objects changed
|
||||
\li A re-filtering was forced through resetFiltering() (see #PxShape::resetFiltering(), #PxParticleBase::resetFiltering())
|
||||
\li Filtering is requested in scene queries
|
||||
|
||||
\note Certain pairs of objects are always ignored and this method does not get called. This is the case for the
|
||||
following pairs:
|
||||
|
||||
\li Pair of static rigid actors
|
||||
\li A static rigid actor and a kinematic actor (unless one is a trigger or if explicitly enabled through #PxSceneFlag::eENABLE_KINEMATIC_STATIC_PAIRS)
|
||||
\li Two kinematic actors (unless one is a trigger or if explicitly enabled through #PxSceneFlag::eENABLE_KINEMATIC_PAIRS)
|
||||
\li Pair of particle systems
|
||||
\li Two jointed rigid bodies and the joint was defined to disable collision
|
||||
\li Two articulation links if connected through an articulation joint
|
||||
|
||||
\note This is a performance critical method and should be stateless. You should neither access external objects
|
||||
from within this method nor should you call external methods that are not inlined. If you need a more complex
|
||||
logic to filter a collision pair then use the filter callback mechanism for this pair (see #PxSimulationFilterCallback,
|
||||
#PxFilterFlag::eCALLBACK, #PxFilterFlag::eNOTIFY).
|
||||
|
||||
\param[in] attributes0 The filter attribute of the first object
|
||||
\param[in] filterData0 The custom filter data of the first object
|
||||
\param[in] attributes1 The filter attribute of the second object
|
||||
\param[in] filterData1 The custom filter data of the second object
|
||||
\param[out] pairFlags Flags giving additional information on how an accepted pair should get processed
|
||||
\param[in] constantBlock The constant global filter data (see #PxSceneDesc.filterShaderData)
|
||||
\param[in] constantBlockSize Size of the global filter data (see #PxSceneDesc.filterShaderDataSize)
|
||||
\return Filter flags defining whether the pair should be discarded, temporarily ignored, processed and whether the
|
||||
filter callback should get invoked for this pair.
|
||||
|
||||
@see PxSimulationFilterCallback PxFilterData PxFilterObjectAttributes PxFilterFlag PxFilterFlags PxPairFlag PxPairFlags
|
||||
*/
|
||||
|
||||
typedef PxFilterFlags (*PxSimulationFilterShader)
|
||||
(PxFilterObjectAttributes attributes0, PxFilterData filterData0,
|
||||
PxFilterObjectAttributes attributes1, PxFilterData filterData1,
|
||||
PxPairFlags& pairFlags, const void* constantBlock, PxU32 constantBlockSize);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
\brief Filter callback to specify handling of collision pairs.
|
||||
|
||||
This class is provided to implement more complex and flexible collision pair filtering logic, for instance, taking
|
||||
the state of the user application into account. Filter callbacks also give the user the opportunity to track collision
|
||||
pairs and update their filter state.
|
||||
|
||||
You might want to check the documentation on #PxSimulationFilterShader as well since it includes more general information
|
||||
on filtering.
|
||||
|
||||
\note The callbacks may execute in user threads or simulation threads, possibly simultaneously. The corresponding objects
|
||||
may have been deleted by the application earlier in the frame. It is the application's responsibility to prevent race conditions
|
||||
arising from using the SDK API in the callback while an application thread is making write calls to the scene, and to ensure that
|
||||
the callbacks are thread-safe. Return values which depend on when the callback is called during the frame will introduce nondeterminism
|
||||
into the simulation. On PS3 use of this callback may compromise simulation performance.
|
||||
|
||||
@see PxSceneDesc.filterCallback PxSimulationFilterShader
|
||||
*/
|
||||
class PxSimulationFilterCallback
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
\brief Filter method to specify how a pair of potentially colliding objects should be processed.
|
||||
|
||||
This method gets called when the filter flags returned by the filter shader (see #PxSimulationFilterShader)
|
||||
indicate that the filter callback should be invoked (#PxFilterFlag::eCALLBACK or #PxFilterFlag::eNOTIFY set).
|
||||
Return the PxFilterFlag flags and set the PxPairFlag flags to define what the simulation should do with the given
|
||||
collision pair.
|
||||
|
||||
\param[in] pairID Unique ID of the collision pair used to issue filter status changes for the pair (see #statusChange())
|
||||
\param[in] attributes0 The filter attribute of the first object
|
||||
\param[in] filterData0 The custom filter data of the first object
|
||||
\param[in] a0 Actor pointer of the first object
|
||||
\param[in] s0 Shape pointer of the first object (NULL if the object has no shapes, for example in the case of a particle system)
|
||||
\param[in] attributes1 The filter attribute of the second object
|
||||
\param[in] filterData1 The custom filter data of the second object
|
||||
\param[in] a1 Actor pointer of the second object
|
||||
\param[in] s1 Shape pointer of the second object (NULL if the object has no shapes, for example in the case of a particle system)
|
||||
\param[in,out] pairFlags In: Pair flags returned by the filter shader. Out: Additional information on how an accepted pair should get processed
|
||||
\return Filter flags defining whether the pair should be discarded, temporarily ignored or processed and whether the pair
|
||||
should be tracked and send a report on pair deletion through the filter callback
|
||||
|
||||
@see PxSimulationFilterShader PxFilterData PxFilterObjectAttributes PxFilterFlag PxPairFlag
|
||||
*/
|
||||
virtual PxFilterFlags pairFound( PxU32 pairID,
|
||||
PxFilterObjectAttributes attributes0, PxFilterData filterData0, PxActor* a0, PxShape* s0,
|
||||
PxFilterObjectAttributes attributes1, PxFilterData filterData1, PxActor* a1, PxShape* s1,
|
||||
PxPairFlags& pairFlags) = 0;
|
||||
|
||||
/**
|
||||
\brief Callback to inform that a tracked collision pair is gone.
|
||||
|
||||
This method gets called when a collision pair disappears or gets re-filtered. Only applies to
|
||||
collision pairs which have been marked as filter callback pairs (#PxFilterFlag::eNOTIFY set in #pairFound()).
|
||||
|
||||
\param[in] pairID Unique ID of the collision pair that disappeared
|
||||
\param[in] attributes0 The filter attribute of the first object
|
||||
\param[in] filterData0 The custom filter data of the first object
|
||||
\param[in] attributes1 The filter attribute of the second object
|
||||
\param[in] filterData1 The custom filter data of the second object
|
||||
\param[in] objectDeleted True if the pair was lost because one of the objects got deleted
|
||||
|
||||
@see pairFound() PxSimulationFilterShader PxFilterData PxFilterObjectAttributes
|
||||
*/
|
||||
virtual void pairLost( PxU32 pairID,
|
||||
PxFilterObjectAttributes attributes0,
|
||||
PxFilterData filterData0,
|
||||
PxFilterObjectAttributes attributes1,
|
||||
PxFilterData filterData1,
|
||||
bool objectDeleted) = 0;
|
||||
|
||||
/**
|
||||
\brief Callback to give the opportunity to change the filter state of a tracked collision pair.
|
||||
|
||||
This method gets called once per simulation step to let the application change the filter and pair
|
||||
flags of a collision pair that has been reported in #pairFound() and requested callbacks by
|
||||
setting #PxFilterFlag::eNOTIFY. To request a change of filter status, the target pair has to be
|
||||
specified by its ID, the new filter and pair flags have to be provided and the method should return true.
|
||||
|
||||
\note If this method changes the filter status of a collision pair and the pair should keep being tracked
|
||||
by the filter callbacks then #PxFilterFlag::eNOTIFY has to be set.
|
||||
|
||||
\note The application is responsible to ensure that this method does not get called for pairs that have been
|
||||
reported as lost, see #pairLost().
|
||||
|
||||
\param[out] pairID ID of the collision pair for which the filter status should be changed
|
||||
\param[out] pairFlags The new pairFlags to apply to the collision pair
|
||||
\param[out] filterFlags The new filterFlags to apply to the collision pair
|
||||
\return True if the changes should be applied. In this case the method will get called again. False if
|
||||
no more status changes should be done in the current simulation step. In that case the provided flags will be discarded.
|
||||
|
||||
@see pairFound() pairLost() PxFilterFlag PxPairFlag
|
||||
*/
|
||||
virtual bool statusChange(PxU32& pairID, PxPairFlags& pairFlags, PxFilterFlags& filterFlags) = 0;
|
||||
|
||||
protected:
|
||||
virtual ~PxSimulationFilterCallback() {}
|
||||
};
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
} // namespace physx
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif
|
64
Engine/ExtIncludes/physX3/windows/PxForceMode.h
Normal file
|
@ -0,0 +1,64 @@
|
|||
// This code contains NVIDIA Confidential Information and is disclosed to you
|
||||
// under a form of NVIDIA software license agreement provided separately to you.
|
||||
//
|
||||
// Notice
|
||||
// NVIDIA Corporation and its licensors retain all intellectual property and
|
||||
// proprietary rights in and to this software and related documentation and
|
||||
// any modifications thereto. Any use, reproduction, disclosure, or
|
||||
// distribution of this software and related documentation without an express
|
||||
// license agreement from NVIDIA Corporation is strictly prohibited.
|
||||
//
|
||||
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
|
||||
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
|
||||
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
|
||||
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// Information and code furnished is believed to be accurate and reliable.
|
||||
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
|
||||
// information or for any infringement of patents or other rights of third parties that may
|
||||
// result from its use. No license is granted by implication or otherwise under any patent
|
||||
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
|
||||
// This code supersedes and replaces all information previously supplied.
|
||||
// NVIDIA Corporation products are not authorized for use as critical
|
||||
// components in life support devices or systems without express written approval of
|
||||
// NVIDIA Corporation.
|
||||
//
|
||||
// Copyright (c) 2008-2013 NVIDIA Corporation. All rights reserved.
|
||||
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
|
||||
|
||||
|
||||
#ifndef PX_PHYSICS_NX_FORCE_MODE
|
||||
#define PX_PHYSICS_NX_FORCE_MODE
|
||||
|
||||
/** \addtogroup physics
|
||||
@{
|
||||
*/
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
namespace physx
|
||||
{
|
||||
#endif
|
||||
|
||||
/**
|
||||
\brief Parameter to addForce() and addTorque() calls, determines the exact operation that is carried out.
|
||||
|
||||
@see PxRigidBody.addForce() PxRigidBody.addTorque()
|
||||
*/
|
||||
struct PxForceMode
|
||||
{
|
||||
enum Enum
|
||||
{
|
||||
eFORCE, //!< parameter has unit of mass * distance/ time^2, i.e. a force
|
||||
eIMPULSE, //!< parameter has unit of mass * distance /time
|
||||
eVELOCITY_CHANGE, //!< parameter has unit of distance / time, i.e. the effect is mass independent: a velocity change.
|
||||
eACCELERATION //!< parameter has unit of distance/ time^2, i.e. an acceleration. It gets treated just like a force except the mass is not divided out before integration.
|
||||
};
|
||||
};
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
} // namespace physx
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif
|
92
Engine/ExtIncludes/physX3/windows/PxLockedData.h
Normal file
|
@ -0,0 +1,92 @@
|
|||
// This code contains NVIDIA Confidential Information and is disclosed to you
|
||||
// under a form of NVIDIA software license agreement provided separately to you.
|
||||
//
|
||||
// Notice
|
||||
// NVIDIA Corporation and its licensors retain all intellectual property and
|
||||
// proprietary rights in and to this software and related documentation and
|
||||
// any modifications thereto. Any use, reproduction, disclosure, or
|
||||
// distribution of this software and related documentation without an express
|
||||
// license agreement from NVIDIA Corporation is strictly prohibited.
|
||||
//
|
||||
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
|
||||
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
|
||||
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
|
||||
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// Information and code furnished is believed to be accurate and reliable.
|
||||
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
|
||||
// information or for any infringement of patents or other rights of third parties that may
|
||||
// result from its use. No license is granted by implication or otherwise under any patent
|
||||
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
|
||||
// This code supersedes and replaces all information previously supplied.
|
||||
// NVIDIA Corporation products are not authorized for use as critical
|
||||
// components in life support devices or systems without express written approval of
|
||||
// NVIDIA Corporation.
|
||||
//
|
||||
// Copyright (c) 2008-2013 NVIDIA Corporation. All rights reserved.
|
||||
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
|
||||
|
||||
|
||||
#ifndef PX_PHYSICS_NX_LOCKED_DATA
|
||||
#define PX_PHYSICS_NX_LOCKED_DATA
|
||||
/** \addtogroup physics
|
||||
@{
|
||||
*/
|
||||
|
||||
#include "PxPhysX.h"
|
||||
#include "foundation/PxFlags.h"
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
namespace physx
|
||||
{
|
||||
#endif
|
||||
|
||||
struct PxDataAccessFlag
|
||||
{
|
||||
enum Enum
|
||||
{
|
||||
eREADABLE = (1 << 0),
|
||||
eWRITABLE = (1 << 1),
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
\brief collection of set bits defined in PxDataAccessFlag.
|
||||
|
||||
@see PxDataAccessFlag
|
||||
*/
|
||||
typedef PxFlags<PxDataAccessFlag::Enum,PxU8> PxDataAccessFlags;
|
||||
PX_FLAGS_OPERATORS(PxDataAccessFlag::Enum,PxU8);
|
||||
|
||||
|
||||
/**
|
||||
\brief Parent class for bulk data that is shared between the SDK and the application.
|
||||
*/
|
||||
class PxLockedData
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
\brief Any combination of PxDataAccessFlag::eREADABLE and PxDataAccessFlag::eWRITABLE
|
||||
@see PxDataAccessFlag
|
||||
*/
|
||||
virtual PxDataAccessFlags getDataAccessFlags() = 0;
|
||||
|
||||
/**
|
||||
\brief Unlocks the bulk data.
|
||||
*/
|
||||
virtual void unlock() = 0;
|
||||
|
||||
/**
|
||||
\brief virtual destructor
|
||||
*/
|
||||
virtual ~PxLockedData() {};
|
||||
};
|
||||
|
||||
#ifndef PX_DOXYGEN
|
||||
} // namespace physx
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif
|