├── .gitignore ├── CPlusPlus_Common.h ├── Extensions.h ├── Info.plist ├── Names.h ├── README.md ├── Shaders.h ├── TOP_CPlusPlusBase.h ├── TensorFlowTOP.cpp ├── TensorFlowTOP.h ├── TensorFlowTOP.sln ├── TensorFlowTOP.vcxproj ├── gl ├── LICENSE.txt ├── glew.c ├── glew.h ├── glewinfo.c └── wglew.h └── touchdesigner ├── Inference.toe └── samples ├── AfricanElephant.jpg ├── Cougar.jpg └── Gorilla.jpg /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # Custom 7 | build/ 8 | libs/ 9 | models/ 10 | 11 | # User-specific files 12 | *.suo 13 | *.user 14 | *.userosscache 15 | *.sln.docstates 16 | 17 | # User-specific files (MonoDevelop/Xamarin Studio) 18 | *.userprefs 19 | 20 | # Build results 21 | [Dd]ebug/ 22 | [Dd]ebugPublic/ 23 | [Rr]elease/ 24 | [Rr]eleases/ 25 | x64/ 26 | x86/ 27 | bld/ 28 | [Bb]in/ 29 | [Oo]bj/ 30 | [Ll]og/ 31 | 32 | # Visual Studio 2015/2017 cache/options directory 33 | .vs/ 34 | # Uncomment if you have tasks that create the project's static files in wwwroot 35 | #wwwroot/ 36 | 37 | # Visual Studio 2017 auto generated files 38 | Generated\ Files/ 39 | 40 | # MSTest test Results 41 | [Tt]est[Rr]esult*/ 42 | [Bb]uild[Ll]og.* 43 | 44 | # NUNIT 45 | *.VisualState.xml 46 | TestResult.xml 47 | 48 | # Build Results of an ATL Project 49 | [Dd]ebugPS/ 50 | [Rr]eleasePS/ 51 | dlldata.c 52 | 53 | # Benchmark Results 54 | BenchmarkDotNet.Artifacts/ 55 | 56 | # .NET Core 57 | project.lock.json 58 | project.fragment.lock.json 59 | artifacts/ 60 | **/Properties/launchSettings.json 61 | 62 | # StyleCop 63 | StyleCopReport.xml 64 | 65 | # Files built by Visual Studio 66 | *_i.c 67 | *_p.c 68 | *_i.h 69 | *.ilk 70 | *.meta 71 | *.obj 72 | *.pch 73 | *.pdb 74 | *.pgc 75 | *.pgd 76 | *.rsp 77 | *.sbr 78 | *.tlb 79 | *.tli 80 | *.tlh 81 | *.tmp 82 | *.tmp_proj 83 | *.log 84 | *.vspscc 85 | *.vssscc 86 | .builds 87 | *.pidb 88 | *.svclog 89 | *.scc 90 | 91 | # Chutzpah Test files 92 | _Chutzpah* 93 | 94 | # Visual C++ cache files 95 | ipch/ 96 | *.aps 97 | *.ncb 98 | *.opendb 99 | *.opensdf 100 | *.sdf 101 | *.cachefile 102 | *.VC.db 103 | *.VC.VC.opendb 104 | 105 | # Visual Studio profiler 106 | *.psess 107 | *.vsp 108 | *.vspx 109 | *.sap 110 | 111 | # Visual Studio Trace Files 112 | *.e2e 113 | 114 | # TFS 2012 Local Workspace 115 | $tf/ 116 | 117 | # Guidance Automation Toolkit 118 | *.gpState 119 | 120 | # ReSharper is a .NET coding add-in 121 | _ReSharper*/ 122 | *.[Rr]e[Ss]harper 123 | *.DotSettings.user 124 | 125 | # JustCode is a .NET coding add-in 126 | .JustCode 127 | 128 | # TeamCity is a build add-in 129 | _TeamCity* 130 | 131 | # DotCover is a Code Coverage Tool 132 | *.dotCover 133 | 134 | # AxoCover is a Code Coverage Tool 135 | .axoCover/* 136 | !.axoCover/settings.json 137 | 138 | # Visual Studio code coverage results 139 | *.coverage 140 | *.coveragexml 141 | 142 | # NCrunch 143 | _NCrunch_* 144 | .*crunch*.local.xml 145 | nCrunchTemp_* 146 | 147 | # MightyMoose 148 | *.mm.* 149 | AutoTest.Net/ 150 | 151 | # Web workbench (sass) 152 | .sass-cache/ 153 | 154 | # Installshield output folder 155 | [Ee]xpress/ 156 | 157 | # DocProject is a documentation generator add-in 158 | DocProject/buildhelp/ 159 | DocProject/Help/*.HxT 160 | DocProject/Help/*.HxC 161 | DocProject/Help/*.hhc 162 | DocProject/Help/*.hhk 163 | DocProject/Help/*.hhp 164 | DocProject/Help/Html2 165 | DocProject/Help/html 166 | 167 | # Click-Once directory 168 | publish/ 169 | 170 | # Publish Web Output 171 | *.[Pp]ublish.xml 172 | *.azurePubxml 173 | # Note: Comment the next line if you want to checkin your web deploy settings, 174 | # but database connection strings (with potential passwords) will be unencrypted 175 | *.pubxml 176 | *.publishproj 177 | 178 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 179 | # checkin your Azure Web App publish settings, but sensitive information contained 180 | # in these scripts will be unencrypted 181 | PublishScripts/ 182 | 183 | # NuGet Packages 184 | *.nupkg 185 | # The packages folder can be ignored because of Package Restore 186 | **/[Pp]ackages/* 187 | # except build/, which is used as an MSBuild target. 188 | !**/[Pp]ackages/build/ 189 | # Uncomment if necessary however generally it will be regenerated when needed 190 | #!**/[Pp]ackages/repositories.config 191 | # NuGet v3's project.json files produces more ignorable files 192 | *.nuget.props 193 | *.nuget.targets 194 | 195 | # Microsoft Azure Build Output 196 | csx/ 197 | *.build.csdef 198 | 199 | # Microsoft Azure Emulator 200 | ecf/ 201 | rcf/ 202 | 203 | # Windows Store app package directories and files 204 | AppPackages/ 205 | BundleArtifacts/ 206 | Package.StoreAssociation.xml 207 | _pkginfo.txt 208 | *.appx 209 | 210 | # Visual Studio cache files 211 | # files ending in .cache can be ignored 212 | *.[Cc]ache 213 | # but keep track of directories ending in .cache 214 | !*.[Cc]ache/ 215 | 216 | # Others 217 | ClientBin/ 218 | ~$* 219 | *~ 220 | *.dbmdl 221 | *.dbproj.schemaview 222 | *.jfm 223 | *.pfx 224 | *.publishsettings 225 | orleans.codegen.cs 226 | 227 | # Including strong name files can present a security risk 228 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 229 | #*.snk 230 | 231 | # Since there are multiple workflows, uncomment next line to ignore bower_components 232 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 233 | #bower_components/ 234 | 235 | # RIA/Silverlight projects 236 | Generated_Code/ 237 | 238 | # Backup & report files from converting an old project file 239 | # to a newer Visual Studio version. Backup files are not needed, 240 | # because we have git ;-) 241 | _UpgradeReport_Files/ 242 | Backup*/ 243 | UpgradeLog*.XML 244 | UpgradeLog*.htm 245 | ServiceFabricBackup/ 246 | 247 | # SQL Server files 248 | *.mdf 249 | *.ldf 250 | *.ndf 251 | 252 | # Business Intelligence projects 253 | *.rdl.data 254 | *.bim.layout 255 | *.bim_*.settings 256 | *.rptproj.rsuser 257 | 258 | # Microsoft Fakes 259 | FakesAssemblies/ 260 | 261 | # GhostDoc plugin setting file 262 | *.GhostDoc.xml 263 | 264 | # Node.js Tools for Visual Studio 265 | .ntvs_analysis.dat 266 | node_modules/ 267 | 268 | # Visual Studio 6 build log 269 | *.plg 270 | 271 | # Visual Studio 6 workspace options file 272 | *.opt 273 | 274 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 275 | *.vbw 276 | 277 | # Visual Studio LightSwitch build output 278 | **/*.HTMLClient/GeneratedArtifacts 279 | **/*.DesktopClient/GeneratedArtifacts 280 | **/*.DesktopClient/ModelManifest.xml 281 | **/*.Server/GeneratedArtifacts 282 | **/*.Server/ModelManifest.xml 283 | _Pvt_Extensions 284 | 285 | # Paket dependency manager 286 | .paket/paket.exe 287 | paket-files/ 288 | 289 | # FAKE - F# Make 290 | .fake/ 291 | 292 | # JetBrains Rider 293 | .idea/ 294 | *.sln.iml 295 | 296 | # CodeRush 297 | .cr/ 298 | 299 | # Python Tools for Visual Studio (PTVS) 300 | __pycache__/ 301 | *.pyc 302 | 303 | # Cake - Uncomment if you are using it 304 | # tools/** 305 | # !tools/packages.config 306 | 307 | # Tabs Studio 308 | *.tss 309 | 310 | # Telerik's JustMock configuration file 311 | *.jmconfig 312 | 313 | # BizTalk build output 314 | *.btp.cs 315 | *.btm.cs 316 | *.odx.cs 317 | *.xsd.cs 318 | 319 | # OpenCover UI analysis results 320 | OpenCover/ 321 | 322 | # Azure Stream Analytics local run output 323 | ASALocalRun/ 324 | 325 | # MSBuild Binary and Structured Log 326 | *.binlog 327 | 328 | # NVidia Nsight GPU debugger configuration file 329 | *.nvuser -------------------------------------------------------------------------------- /CPlusPlus_Common.h: -------------------------------------------------------------------------------- 1 | /* Shared Use License: This file is owned by Derivative Inc. (Derivative) and 2 | * can only be used, and/or modified for use, in conjunction with 3 | * Derivative's TouchDesigner software, and only if you are a licensee who has 4 | * accepted Derivative's TouchDesigner license or assignment agreement (which 5 | * also govern the use of this file). You may share a modified version of this 6 | * file with another authorized licensee of Derivative's TouchDesigner software. 7 | * Otherwise, no redistribution or sharing of this file, with or without 8 | * modification, is permitted. 9 | */ 10 | 11 | /* 12 | * Produced by: 13 | * 14 | * Derivative Inc 15 | * 401 Richmond Street West, Unit 386 16 | * Toronto, Ontario 17 | * Canada M5V 3A8 18 | * 416-591-3555 19 | * 20 | * NAME: CPlusPlus_Common.h 21 | * 22 | */ 23 | 24 | /******* 25 | Derivative Developers:: Make sure the virtual function order 26 | stays the same, otherwise changes won't be backwards compatible 27 | ********/ 28 | 29 | 30 | #ifndef __CPlusPlus_Common 31 | #define __CPlusPlus_Common 32 | 33 | #define NOMINMAX 34 | 35 | #ifdef WIN32 36 | #include 37 | #include 38 | #include "Extensions.h" 39 | #define DLLEXPORT __declspec (dllexport) 40 | #else 41 | #include 42 | #define DLLEXPORT 43 | #endif 44 | 45 | #include 46 | 47 | struct cudaArray; 48 | 49 | enum class OP_CPUMemPixelType : int32_t 50 | { 51 | // 8-bit per color, BGRA pixels. This is preferred for 4 channel 8-bit data 52 | BGRA8Fixed = 0, 53 | // 8-bit per color, RGBA pixels. Only use this one if absolutely nesseary. 54 | RGBA8Fixed, 55 | // 32-bit float per color, RGBA pixels 56 | RGBA32Float, 57 | 58 | // Single and double channel options 59 | // Fixed 60 | R8Fixed, 61 | RG8Fixed, 62 | // Float 63 | R32Float, 64 | RG32Float, 65 | }; 66 | 67 | 68 | class OP_NodeInfo 69 | { 70 | public: 71 | // The full path to the operator 72 | 73 | const char* opPath; 74 | 75 | // A unique ID representing the operator, no two operators will ever 76 | // have the same ID in a single TouchDesigner instance. 77 | 78 | uint32_t opID; 79 | 80 | // This is the handle to the main TouchDesigner window. 81 | // It's possible this will be 0 the first few times the operator cooks, 82 | // incase it cooks while TouchDesigner is still loading up 83 | 84 | #ifdef WIN32 85 | HWND mainWindowHandle; 86 | #endif 87 | 88 | private: 89 | int32_t reserved[19]; 90 | }; 91 | 92 | 93 | class OP_DATInput 94 | { 95 | public: 96 | const char* opPath; 97 | uint32_t opId; 98 | 99 | int32_t numRows; 100 | int32_t numCols; 101 | bool isTable; 102 | 103 | // data, referenced by (row,col), which will be a const char* for the 104 | // contents of the cell 105 | // E.g getCell(1,2) will be the contents of the cell located at (1,2) 106 | 107 | const char* getCell(int32_t row, int32_t col) const 108 | { 109 | return cellData[row * numCols + col]; 110 | } 111 | 112 | protected: 113 | const char** cellData; 114 | 115 | private: 116 | int32_t reserved[20]; 117 | }; 118 | 119 | class OP_TOPInput 120 | { 121 | public: 122 | const char* opPath; 123 | uint32_t opId; 124 | 125 | int32_t width; 126 | int32_t height; 127 | 128 | 129 | // The OpenGL Texture index for this TOP. 130 | // This is only valid when accessed from C++ TOPs. 131 | // Other C++ OPs will have this value set to 0 (invalid). 132 | GLuint textureIndex; 133 | 134 | // The OpenGL Texture target for this TOP. 135 | // E.g GL_TEXTURE_2D, GL_TEXTURE_CUBE, 136 | // GL_TEXTURE_2D_ARRAY 137 | GLenum textureType; 138 | 139 | // Depth for 3D and 2D_ARRAY textures, undefined 140 | // for other texture types 141 | uint32_t depth; 142 | 143 | // contains the internalFormat for the texture 144 | // such as GL_RGBA8, GL_RGBA32F, GL_R16 145 | GLint pixelFormat; 146 | 147 | // reserved 148 | int32_t reserved1; 149 | 150 | // When the TOP_ExecuteMode is CUDA, this will be filled in 151 | cudaArray* cudaInput; 152 | 153 | private: 154 | int32_t reserved[16]; 155 | }; 156 | 157 | 158 | class OP_CHOPInput 159 | { 160 | public: 161 | 162 | const char* opPath; 163 | uint32_t opId; 164 | 165 | int32_t numChannels; 166 | int32_t numSamples; 167 | double sampleRate; 168 | double startIndex; 169 | 170 | 171 | 172 | // Retrieve a float array for a specific channel. 173 | // 'i' ranges from 0 to numChannels-1 174 | // The returned arrray contains 'numSamples' samples. 175 | // e.g: getChannelData(1)[10] will refer to the 11th sample in the 2nd channel 176 | 177 | const float* 178 | getChannelData(int32_t i) const 179 | { 180 | return channelData[i]; 181 | } 182 | 183 | 184 | // Retrieve the name of a specific channel. 185 | // 'i' ranges from 0 to numChannels-1 186 | // For example getChannelName(1) is the name of the 2nd channel 187 | 188 | const char* 189 | getChannelName(int32_t i) const 190 | { 191 | return nameData[i]; 192 | } 193 | 194 | protected: 195 | 196 | const float** channelData; 197 | const char** nameData; 198 | 199 | 200 | private: 201 | 202 | int32_t reserved[20]; 203 | }; 204 | 205 | class OP_ObjectInput 206 | { 207 | public: 208 | 209 | const char* opPath; 210 | uint32_t opId; 211 | 212 | // Use these methods to calculate object transforms 213 | double worldTransform[4][4]; 214 | double localTransform[4][4]; 215 | 216 | 217 | private: 218 | 219 | int32_t reserved[20]; 220 | }; 221 | 222 | 223 | enum class OP_TOPInputDownloadType : int32_t 224 | { 225 | // The texture data will be downloaded and and available on the next frame. 226 | // Except for the first time this is used, getTOPDataInCPUMemory() 227 | // will return the texture data on the CPU from the previous frame. 228 | // The first getTOPDataInCPUMemory() is called it will be nullptr. 229 | // ** This mode should be used is most cases for performance reasons ** 230 | Delayed = 0, 231 | 232 | // The texture data will be downloaded immediately and be available 233 | // this frame. This can cause a large stall though and should be avoided 234 | // in most cases 235 | Instant, 236 | }; 237 | 238 | class OP_TOPInputDownloadOptions 239 | { 240 | public: 241 | OP_TOPInputDownloadOptions() 242 | { 243 | downloadType = OP_TOPInputDownloadType::Delayed; 244 | verticalFlip = false; 245 | cpuMemPixelType = OP_CPUMemPixelType::BGRA8Fixed; 246 | } 247 | 248 | OP_TOPInputDownloadType downloadType; 249 | 250 | // Set this to true if you want the image vertically flipped in the 251 | // downloaded data 252 | bool verticalFlip; 253 | 254 | // Set this to how you want the pixel data to be give to you in CPU 255 | // memory. BGRA8Fixed should be used for 4 channel 8-bit data if possible 256 | OP_CPUMemPixelType cpuMemPixelType; 257 | 258 | }; 259 | 260 | 261 | class OP_Inputs 262 | { 263 | public: 264 | // NOTE: When writting a TOP, none of these functions should 265 | // be called inside a beginGLCommands()/endGLCommands() section 266 | // as they may require GL themselves to complete execution. 267 | 268 | // these are wired into the node 269 | virtual int32_t getNumInputs() = 0; 270 | 271 | // may return nullptr when invalid input 272 | virtual const OP_TOPInput* getInputTOP(int32_t index) = 0; // only valid for TOP operators 273 | virtual const OP_CHOPInput* getInputCHOP(int32_t index) = 0; // only valid for CHOP operators 274 | 275 | // these are defined by parameters. 276 | // may return nullptr when invalid input 277 | // this value is valid until the parameters are rebuilt or it is called with the same parameter name. 278 | virtual const OP_DATInput* getParDAT(const char *name) = 0; 279 | virtual const OP_TOPInput* getParTOP(const char *name) = 0; 280 | virtual const OP_CHOPInput* getParCHOP(const char *name) = 0; 281 | virtual const OP_ObjectInput* getParObject(const char *name) = 0; 282 | 283 | // these work on any type of parameter and can be interchanged 284 | // for menu types, int returns the menu selection index, string returns the item 285 | 286 | // returns the requested value, index may be 0 to 4. 287 | virtual double getParDouble(const char* name, int32_t index=0) = 0; 288 | 289 | // for multiple values: returns True on success/false otherwise 290 | virtual bool getParDouble2(const char* name, double &v0, double &v1) = 0; 291 | virtual bool getParDouble3(const char* name, double &v0, double &v1, double &v2) = 0; 292 | virtual bool getParDouble4(const char* name, double &v0, double &v1, double &v2, double &v3) = 0; 293 | 294 | 295 | // returns the requested value 296 | virtual int32_t getParInt(const char* name, int32_t index=0) = 0; 297 | 298 | // for multiple values: returns True on success/false otherwise 299 | virtual bool getParInt2(const char* name, int32_t &v0, int32_t &v1) = 0; 300 | virtual bool getParInt3(const char* name, int32_t &v0, int32_t &v1, int32_t &v2) = 0; 301 | virtual bool getParInt4(const char* name, int32_t &v0, int32_t &v1, int32_t &v2, int32_t &v3) = 0; 302 | 303 | // returns the requested value 304 | // this value is valid until the parameters are rebuilt or it is called with the same parameter name. 305 | virtual const char* getParString(const char* name) = 0; // return value usable for life of parameter 306 | 307 | // this is similar to getParString, but will return an absolute path if it exists, with 308 | // slash direction consistent with O/S requirements. 309 | // to get the original parameter value, use getParString 310 | virtual const char* getParFilePath(const char* name) = 0; // return value usable for life of parameter 311 | 312 | // returns true on success 313 | // from_name and to_name must be Object parameters 314 | virtual bool getRelativeTransform(const char* from_name, const char* to_name, double matrix[4][4]) = 0; 315 | 316 | 317 | // disable or enable updating of the parameter 318 | virtual void enablePar(const char* name, bool onoff) = 0; 319 | 320 | 321 | // these are defined by paths. 322 | // may return nullptr when invalid input 323 | // this value is valid until the parameters are rebuilt or it is called with the same parameter name. 324 | virtual const OP_DATInput* getDAT(const char *path) = 0; 325 | virtual const OP_TOPInput* getTOP(const char *path) = 0; 326 | virtual const OP_CHOPInput* getCHOP(const char *path) = 0; 327 | virtual const OP_ObjectInput* getObject(const char *path) = 0; 328 | 329 | 330 | // This function can be used to retrieve the TOPs texture data in CPU 331 | // memory. You must pass the OP_TOPInput object you get from 332 | // getParTOP/getInputTOP into this, not a copy you've made 333 | // 334 | // Fill in a OP_TOPIputDownloadOptions class with the desired options set 335 | // 336 | // Returns the data, which will be valid until the end of execute() 337 | // Returned value may be nullptr in some cases, such as the first call 338 | // to this with options->downloadType == OP_TOP_DOWNLOAD_DELAYED. 339 | virtual void* getTOPDataInCPUMemory(const OP_TOPInput *top, 340 | const OP_TOPInputDownloadOptions *options) = 0; 341 | 342 | }; 343 | 344 | class OP_InfoCHOPChan 345 | { 346 | public: 347 | const char* name; 348 | float value; 349 | private: 350 | int32_t reserved[10]; 351 | }; 352 | 353 | class OP_InfoDATSize 354 | { 355 | public: 356 | 357 | // Set this to the size you want the table to be 358 | 359 | int32_t rows; 360 | int32_t cols; 361 | 362 | // Set this to true if you want to return DAT entries on a column 363 | // by column basis. 364 | // Otherwise set to false, and you'll be expected to set them on 365 | // a row by row basis. 366 | // DEFAULT : false 367 | 368 | bool byColumn; 369 | 370 | 371 | private: 372 | int32_t reserved[10]; 373 | }; 374 | 375 | class OP_InfoDATEntries 376 | { 377 | public: 378 | 379 | // This is an array of char* pointers which you are expected to assign 380 | // The start off as NULL, you need to allocate or assign constant/statis 381 | // strings to them 382 | // e.g values[1] = "myColumnName"; 383 | 384 | char** values; 385 | 386 | private: 387 | int32_t reserved[10]; 388 | }; 389 | 390 | 391 | 392 | class OP_NumericParameter 393 | { 394 | public: 395 | 396 | OP_NumericParameter(const char* iname=nullptr) 397 | { 398 | name = iname; 399 | label = page = nullptr; 400 | 401 | for (int i=0; i<4; i++) 402 | { 403 | defaultValues[i] = 0.0; 404 | 405 | minSliders[i] = 0.0; 406 | maxSliders[i] = 1.0; 407 | 408 | minValues[i] = 0.0; 409 | maxValues[i] = 1.0; 410 | 411 | clampMins[i] = false; 412 | clampMaxes[i] = false; 413 | } 414 | } 415 | 416 | // Any char* values passed are copied immediately by the append parameter functions, 417 | // and do not need to be retained by the calling function. 418 | const char* name; // Must begin with capital letter, and contain no spaces 419 | const char* label; 420 | const char* page; 421 | 422 | double defaultValues[4]; 423 | double minValues[4]; 424 | double maxValues[4]; 425 | 426 | bool clampMins[4]; 427 | bool clampMaxes[4]; 428 | 429 | double minSliders[4]; 430 | double maxSliders[4]; 431 | 432 | private: 433 | 434 | int32_t reserved[20]; 435 | 436 | }; 437 | 438 | class OP_StringParameter 439 | { 440 | public: 441 | 442 | OP_StringParameter(const char* iname=nullptr) 443 | { 444 | name = iname; 445 | label = page = nullptr; 446 | defaultValue = nullptr; 447 | } 448 | 449 | // Any char* values passed are copied immediately by the append parameter functions, 450 | // and do not need to be retained by the calling function. 451 | 452 | const char* name; // Must begin with capital letter, and contain no spaces 453 | const char* label; 454 | const char* page; 455 | 456 | const char* defaultValue; 457 | 458 | private: 459 | 460 | int32_t reserved[20]; 461 | }; 462 | 463 | 464 | enum class OP_ParAppendResult : int32_t 465 | { 466 | Success = 0, 467 | InvalidName, // invalid or duplicate name 468 | InvalidSize, // size out of range 469 | }; 470 | 471 | 472 | class OP_ParameterManager 473 | { 474 | 475 | public: 476 | 477 | // Returns PARAMETER_APPEND_SUCCESS on succesful 478 | 479 | virtual OP_ParAppendResult appendFloat(const OP_NumericParameter &np, int32_t size=1) = 0; 480 | virtual OP_ParAppendResult appendInt(const OP_NumericParameter &np, int32_t size=1) = 0; 481 | 482 | virtual OP_ParAppendResult appendXY(const OP_NumericParameter &np) = 0; 483 | virtual OP_ParAppendResult appendXYZ(const OP_NumericParameter &np) = 0; 484 | 485 | virtual OP_ParAppendResult appendUV(const OP_NumericParameter &np) = 0; 486 | virtual OP_ParAppendResult appendUVW(const OP_NumericParameter &np) = 0; 487 | 488 | virtual OP_ParAppendResult appendRGB(const OP_NumericParameter &np) = 0; 489 | virtual OP_ParAppendResult appendRGBA(const OP_NumericParameter &np) = 0; 490 | 491 | virtual OP_ParAppendResult appendToggle(const OP_NumericParameter &np) = 0; 492 | virtual OP_ParAppendResult appendPulse(const OP_NumericParameter &np) = 0; 493 | 494 | virtual OP_ParAppendResult appendString(const OP_StringParameter &sp) = 0; 495 | virtual OP_ParAppendResult appendFile(const OP_StringParameter &sp) = 0; 496 | virtual OP_ParAppendResult appendFolder(const OP_StringParameter &sp) = 0; 497 | 498 | virtual OP_ParAppendResult appendDAT(const OP_StringParameter &sp) = 0; 499 | virtual OP_ParAppendResult appendCHOP(const OP_StringParameter &sp) = 0; 500 | virtual OP_ParAppendResult appendTOP(const OP_StringParameter &sp) = 0; 501 | virtual OP_ParAppendResult appendObject(const OP_StringParameter &sp) = 0; 502 | 503 | // Any char* values passed are copied immediately by the append parameter functions, 504 | // and do not need to be retained by the calling function. 505 | virtual OP_ParAppendResult appendMenu(const OP_StringParameter &sp, 506 | int32_t nitems, const char **names, 507 | const char **labels) = 0; 508 | 509 | // Any char* values passed are copied immediately by the append parameter functions, 510 | // and do not need to be retained by the calling function. 511 | virtual OP_ParAppendResult appendStringMenu(const OP_StringParameter &sp, 512 | int32_t nitems, const char **names, 513 | const char **labels) = 0; 514 | 515 | private: 516 | 517 | 518 | }; 519 | 520 | #endif 521 | -------------------------------------------------------------------------------- /Extensions.h: -------------------------------------------------------------------------------- 1 | /* Shared Use License: This file is owned by Derivative Inc. (Derivative) and 2 | * can only be used, and/or modified for use, in conjunction with 3 | * Derivative's TouchDesigner software, and only if you are a licensee who has 4 | * accepted Derivative's TouchDesigner license or assignment agreement (which 5 | * also govern the use of this file). You may share a modified version of this 6 | * file with another authorized licensee of Derivative's TouchDesigner software. 7 | * Otherwise, no redistribution or sharing of this file, with or without 8 | * modification, is permitted. 9 | */ 10 | 11 | #ifndef GL_Extensions_h 12 | #define GL_Extensions_h 13 | #ifdef WIN32 14 | #include "gl/glew.h" 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | NSHumanReadableCopyright 22 | Copyright © 2016 Derivative. All rights reserved. 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Names.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | const std::string classNames[1001] = 6 | { 7 | "dummy", 8 | "kit fox", 9 | "English setter", 10 | "Siberian husky", 11 | "Australian terrier", 12 | "English springer", 13 | "grey whale", 14 | "lesser panda", 15 | "Egyptian cat", 16 | "ibex", 17 | "Persian cat", 18 | "cougar", 19 | "gazelle", 20 | "porcupine", 21 | "sea lion", 22 | "malamute", 23 | "badger", 24 | "Great Dane", 25 | "Walker hound", 26 | "Welsh springer spaniel", 27 | "whippet", 28 | "Scottish deerhound", 29 | "killer whale", 30 | "mink", 31 | "African elephant", 32 | "Weimaraner", 33 | "soft-coated wheaten terrier", 34 | "Dandie Dinmont", 35 | "red wolf", 36 | "Old English sheepdog", 37 | "jaguar", 38 | "otterhound", 39 | "bloodhound", 40 | "Airedale", 41 | "hyena", 42 | "meerkat", 43 | "giant schnauzer", 44 | "titi", 45 | "three-toed sloth", 46 | "sorrel", 47 | "black-footed ferret", 48 | "dalmatian", 49 | "black-and-tan coonhound", 50 | "papillon", 51 | "skunk", 52 | "Staffordshire bullterrier", 53 | "Mexican hairless", 54 | "Bouvier des Flandres", 55 | "weasel", 56 | "miniature poodle", 57 | "Cardigan", 58 | "malinois", 59 | "bighorn", 60 | "fox squirrel", 61 | "colobus", 62 | "tiger cat", 63 | "Lhasa", 64 | "impala", 65 | "coyote", 66 | "Yorkshire terrier", 67 | "Newfoundland", 68 | "brown bear", 69 | "red fox", 70 | "Norwegian elkhound", 71 | "Rottweiler", 72 | "hartebeest", 73 | "Saluki", 74 | "grey fox", 75 | "schipperke", 76 | "Pekinese", 77 | "Brabancon griffon", 78 | "West Highland white terrier", 79 | "Sealyham terrier", 80 | "guenon", 81 | "mongoose", 82 | "indri", 83 | "tiger", 84 | "Irish wolfhound", 85 | "wild boar", 86 | "EntleBucher", 87 | "zebra", 88 | "ram", 89 | "French bulldog", 90 | "orangutan", 91 | "basenji", 92 | "leopard", 93 | "Bernese mountain dog", 94 | "Maltese dog", 95 | "Norfolk terrier", 96 | "toy terrier", 97 | "vizsla", 98 | "cairn", 99 | "squirrel monkey", 100 | "groenendael", 101 | "clumber", 102 | "Siamese cat", 103 | "chimpanzee", 104 | "komondor", 105 | "Afghan hound", 106 | "Japanese spaniel", 107 | "proboscis monkey", 108 | "guinea pig", 109 | "white wolf", 110 | "ice bear", 111 | "gorilla", 112 | "borzoi", 113 | "toy poodle", 114 | "Kerry blue terrier", 115 | "ox", 116 | "Scotch terrier", 117 | "Tibetan mastiff", 118 | "spider monkey", 119 | "Doberman", 120 | "Boston bull", 121 | "Greater Swiss Mountain dog", 122 | "Appenzeller", 123 | "Shih-Tzu", 124 | "Irish water spaniel", 125 | "Pomeranian", 126 | "Bedlington terrier", 127 | "warthog", 128 | "Arabian camel", 129 | "siamang", 130 | "miniature schnauzer", 131 | "collie", 132 | "golden retriever", 133 | "Irish terrier", 134 | "affenpinscher", 135 | "Border collie", 136 | "hare", 137 | "boxer", 138 | "silky terrier", 139 | "beagle", 140 | "Leonberg", 141 | "German short-haired pointer", 142 | "patas", 143 | "dhole", 144 | "baboon", 145 | "macaque", 146 | "Chesapeake Bay retriever", 147 | "bull mastiff", 148 | "kuvasz", 149 | "capuchin", 150 | "pug", 151 | "curly-coated retriever", 152 | "Norwich terrier", 153 | "flat-coated retriever", 154 | "hog", 155 | "keeshond", 156 | "Eskimo dog", 157 | "Brittany spaniel", 158 | "standard poodle", 159 | "Lakeland terrier", 160 | "snow leopard", 161 | "Gordon setter", 162 | "dingo", 163 | "standard schnauzer", 164 | "hamster", 165 | "Tibetan terrier", 166 | "Arctic fox", 167 | "wire-haired fox terrier", 168 | "basset", 169 | "water buffalo", 170 | "American black bear", 171 | "Angora", 172 | "bison", 173 | "howler monkey", 174 | "hippopotamus", 175 | "chow", 176 | "giant panda", 177 | "American Staffordshire terrier", 178 | "Shetland sheepdog", 179 | "Great Pyrenees", 180 | "Chihuahua", 181 | "tabby", 182 | "marmoset", 183 | "Labrador retriever", 184 | "Saint Bernard", 185 | "armadillo", 186 | "Samoyed", 187 | "bluetick", 188 | "redbone", 189 | "polecat", 190 | "marmot", 191 | "kelpie", 192 | "gibbon", 193 | "llama", 194 | "miniature pinscher", 195 | "wood rabbit", 196 | "Italian greyhound", 197 | "lion", 198 | "cocker spaniel", 199 | "Irish setter", 200 | "dugong", 201 | "Indian elephant", 202 | "beaver", 203 | "Sussex spaniel", 204 | "Pembroke", 205 | "Blenheim spaniel", 206 | "Madagascar cat", 207 | "Rhodesian ridgeback", 208 | "lynx", 209 | "African hunting dog", 210 | "langur", 211 | "Ibizan hound", 212 | "timber wolf", 213 | "cheetah", 214 | "English foxhound", 215 | "briard", 216 | "sloth bear", 217 | "Border terrier", 218 | "German shepherd", 219 | "otter", 220 | "koala", 221 | "tusker", 222 | "echidna", 223 | "wallaby", 224 | "platypus", 225 | "wombat", 226 | "revolver", 227 | "umbrella", 228 | "schooner", 229 | "soccer ball", 230 | "accordion", 231 | "ant", 232 | "starfish", 233 | "chambered nautilus", 234 | "grand piano", 235 | "laptop", 236 | "strawberry", 237 | "airliner", 238 | "warplane", 239 | "airship", 240 | "balloon", 241 | "space shuttle", 242 | "fireboat", 243 | "gondola", 244 | "speedboat", 245 | "lifeboat", 246 | "canoe", 247 | "yawl", 248 | "catamaran", 249 | "trimaran", 250 | "container ship", 251 | "liner", 252 | "pirate", 253 | "aircraft carrier", 254 | "submarine", 255 | "wreck", 256 | "half track", 257 | "tank", 258 | "missile", 259 | "bobsled", 260 | "dogsled", 261 | "bicycle-built-for-two", 262 | "mountain bike", 263 | "freight car", 264 | "passenger car", 265 | "barrow", 266 | "shopping cart", 267 | "motor scooter", 268 | "forklift", 269 | "electric locomotive", 270 | "steam locomotive", 271 | "amphibian", 272 | "ambulance", 273 | "beach wagon", 274 | "cab", 275 | "convertible", 276 | "jeep", 277 | "limousine", 278 | "minivan", 279 | "Model T", 280 | "racer", 281 | "sports car", 282 | "go-kart", 283 | "golfcart", 284 | "moped", 285 | "snowplow", 286 | "fire engine", 287 | "garbage truck", 288 | "pickup", 289 | "tow truck", 290 | "trailer truck", 291 | "moving van", 292 | "police van", 293 | "recreational vehicle", 294 | "streetcar", 295 | "snowmobile", 296 | "tractor", 297 | "mobile home", 298 | "tricycle", 299 | "unicycle", 300 | "horse cart", 301 | "jinrikisha", 302 | "oxcart", 303 | "bassinet", 304 | "cradle", 305 | "crib", 306 | "four-poster", 307 | "bookcase", 308 | "china cabinet", 309 | "medicine chest", 310 | "chiffonier", 311 | "table lamp", 312 | "file", 313 | "park bench", 314 | "barber chair", 315 | "throne", 316 | "folding chair", 317 | "rocking chair", 318 | "studio couch", 319 | "toilet seat", 320 | "desk", 321 | "pool table", 322 | "dining table", 323 | "entertainment center", 324 | "wardrobe", 325 | "Granny Smith", 326 | "orange", 327 | "lemon", 328 | "fig", 329 | "pineapple", 330 | "banana", 331 | "jackfruit", 332 | "custard apple", 333 | "pomegranate", 334 | "acorn", 335 | "hip", 336 | "ear", 337 | "rapeseed", 338 | "corn", 339 | "buckeye", 340 | "organ", 341 | "upright", 342 | "chime", 343 | "drum", 344 | "gong", 345 | "maraca", 346 | "marimba", 347 | "steel drum", 348 | "banjo", 349 | "cello", 350 | "violin", 351 | "harp", 352 | "acoustic guitar", 353 | "electric guitar", 354 | "cornet", 355 | "French horn", 356 | "trombone", 357 | "harmonica", 358 | "ocarina", 359 | "panpipe", 360 | "bassoon", 361 | "oboe", 362 | "sax", 363 | "flute", 364 | "daisy", 365 | "yellow lady's slipper", 366 | "cliff", 367 | "valley", 368 | "alp", 369 | "volcano", 370 | "promontory", 371 | "sandbar", 372 | "coral reef", 373 | "lakeside", 374 | "seashore", 375 | "geyser", 376 | "hatchet", 377 | "cleaver", 378 | "letter opener", 379 | "plane", 380 | "power drill", 381 | "lawn mower", 382 | "hammer", 383 | "corkscrew", 384 | "can opener", 385 | "plunger", 386 | "screwdriver", 387 | "shovel", 388 | "plow", 389 | "chain saw", 390 | "cock", 391 | "hen", 392 | "ostrich", 393 | "brambling", 394 | "goldfinch", 395 | "house finch", 396 | "junco", 397 | "indigo bunting", 398 | "robin", 399 | "bulbul", 400 | "jay", 401 | "magpie", 402 | "chickadee", 403 | "water ouzel", 404 | "kite", 405 | "bald eagle", 406 | "vulture", 407 | "great grey owl", 408 | "black grouse", 409 | "ptarmigan", 410 | "ruffed grouse", 411 | "prairie chicken", 412 | "peacock", 413 | "quail", 414 | "partridge", 415 | "African grey", 416 | "macaw", 417 | "sulphur-crested cockatoo", 418 | "lorikeet", 419 | "coucal", 420 | "bee eater", 421 | "hornbill", 422 | "hummingbird", 423 | "jacamar", 424 | "toucan", 425 | "drake", 426 | "red-breasted merganser", 427 | "goose", 428 | "black swan", 429 | "white stork", 430 | "black stork", 431 | "spoonbill", 432 | "flamingo", 433 | "American egret", 434 | "little blue heron", 435 | "bittern", 436 | "crane", 437 | "limpkin", 438 | "American coot", 439 | "bustard", 440 | "ruddy turnstone", 441 | "red-backed sandpiper", 442 | "redshank", 443 | "dowitcher", 444 | "oystercatcher", 445 | "European gallinule", 446 | "pelican", 447 | "king penguin", 448 | "albatross", 449 | "great white shark", 450 | "tiger shark", 451 | "hammerhead", 452 | "electric ray", 453 | "stingray", 454 | "barracouta", 455 | "coho", 456 | "tench", 457 | "goldfish", 458 | "eel", 459 | "rock beauty", 460 | "anemone fish", 461 | "lionfish", 462 | "puffer", 463 | "sturgeon", 464 | "gar", 465 | "loggerhead", 466 | "leatherback turtle", 467 | "mud turtle", 468 | "terrapin", 469 | "box turtle", 470 | "banded gecko", 471 | "common iguana", 472 | "American chameleon", 473 | "whiptail", 474 | "agama", 475 | "frilled lizard", 476 | "alligator lizard", 477 | "Gila monster", 478 | "green lizard", 479 | "African chameleon", 480 | "Komodo dragon", 481 | "triceratops", 482 | "African crocodile", 483 | "American alligator", 484 | "thunder snake", 485 | "ringneck snake", 486 | "hognose snake", 487 | "green snake", 488 | "king snake", 489 | "garter snake", 490 | "water snake", 491 | "vine snake", 492 | "night snake", 493 | "boa constrictor", 494 | "rock python", 495 | "Indian cobra", 496 | "green mamba", 497 | "sea snake", 498 | "horned viper", 499 | "diamondback", 500 | "sidewinder", 501 | "European fire salamander", 502 | "common newt", 503 | "eft", 504 | "spotted salamander", 505 | "axolotl", 506 | "bullfrog", 507 | "tree frog", 508 | "tailed frog", 509 | "whistle", 510 | "wing", 511 | "paintbrush", 512 | "hand blower", 513 | "oxygen mask", 514 | "snorkel", 515 | "loudspeaker", 516 | "microphone", 517 | "screen", 518 | "mouse", 519 | "electric fan", 520 | "oil filter", 521 | "strainer", 522 | "space heater", 523 | "stove", 524 | "guillotine", 525 | "barometer", 526 | "rule", 527 | "odometer", 528 | "scale", 529 | "analog clock", 530 | "digital clock", 531 | "wall clock", 532 | "hourglass", 533 | "sundial", 534 | "parking meter", 535 | "stopwatch", 536 | "digital watch", 537 | "stethoscope", 538 | "syringe", 539 | "magnetic compass", 540 | "binoculars", 541 | "projector", 542 | "sunglasses", 543 | "loupe", 544 | "radio telescope", 545 | "bow", 546 | "cannon [ground]", 547 | "assault rifle", 548 | "rifle", 549 | "projectile", 550 | "computer keyboard", 551 | "typewriter keyboard", 552 | "crane", 553 | "lighter", 554 | "abacus", 555 | "cash machine", 556 | "slide rule", 557 | "desktop computer", 558 | "hand-held computer", 559 | "notebook", 560 | "web site", 561 | "harvester", 562 | "thresher", 563 | "printer", 564 | "slot", 565 | "vending machine", 566 | "sewing machine", 567 | "joystick", 568 | "switch", 569 | "hook", 570 | "car wheel", 571 | "paddlewheel", 572 | "pinwheel", 573 | "potter's wheel", 574 | "gas pump", 575 | "carousel", 576 | "swing", 577 | "reel", 578 | "radiator", 579 | "puck", 580 | "hard disc", 581 | "sunglass", 582 | "pick", 583 | "car mirror", 584 | "solar dish", 585 | "remote control", 586 | "disk brake", 587 | "buckle", 588 | "hair slide", 589 | "knot", 590 | "combination lock", 591 | "padlock", 592 | "nail", 593 | "safety pin", 594 | "screw", 595 | "muzzle", 596 | "seat belt", 597 | "ski", 598 | "candle", 599 | "jack-o'-lantern", 600 | "spotlight", 601 | "torch", 602 | "neck brace", 603 | "pier", 604 | "tripod", 605 | "maypole", 606 | "mousetrap", 607 | "spider web", 608 | "trilobite", 609 | "harvestman", 610 | "scorpion", 611 | "black and gold garden spider", 612 | "barn spider", 613 | "garden spider", 614 | "black widow", 615 | "tarantula", 616 | "wolf spider", 617 | "tick", 618 | "centipede", 619 | "isopod", 620 | "Dungeness crab", 621 | "rock crab", 622 | "fiddler crab", 623 | "king crab", 624 | "American lobster", 625 | "spiny lobster", 626 | "crayfish", 627 | "hermit crab", 628 | "tiger beetle", 629 | "ladybug", 630 | "ground beetle", 631 | "long-horned beetle", 632 | "leaf beetle", 633 | "dung beetle", 634 | "rhinoceros beetle", 635 | "weevil", 636 | "fly", 637 | "bee", 638 | "grasshopper", 639 | "cricket", 640 | "walking stick", 641 | "cockroach", 642 | "mantis", 643 | "cicada", 644 | "leafhopper", 645 | "lacewing", 646 | "dragonfly", 647 | "damselfly", 648 | "admiral", 649 | "ringlet", 650 | "monarch", 651 | "cabbage butterfly", 652 | "sulphur butterfly", 653 | "lycaenid", 654 | "jellyfish", 655 | "sea anemone", 656 | "brain coral", 657 | "flatworm", 658 | "nematode", 659 | "conch", 660 | "snail", 661 | "slug", 662 | "sea slug", 663 | "chiton", 664 | "sea urchin", 665 | "sea cucumber", 666 | "iron", 667 | "espresso maker", 668 | "microwave", 669 | "Dutch oven", 670 | "rotisserie", 671 | "toaster", 672 | "waffle iron", 673 | "vacuum", 674 | "dishwasher", 675 | "refrigerator", 676 | "washer", 677 | "Crock Pot", 678 | "frying pan", 679 | "wok", 680 | "caldron", 681 | "coffeepot", 682 | "teapot", 683 | "spatula", 684 | "altar", 685 | "triumphal arch", 686 | "patio", 687 | "steel arch bridge", 688 | "suspension bridge", 689 | "viaduct", 690 | "barn", 691 | "greenhouse", 692 | "palace", 693 | "monastery", 694 | "library", 695 | "apiary", 696 | "boathouse", 697 | "church", 698 | "mosque", 699 | "stupa", 700 | "planetarium", 701 | "restaurant", 702 | "cinema", 703 | "home theater", 704 | "lumbermill", 705 | "coil", 706 | "obelisk", 707 | "totem pole", 708 | "castle", 709 | "prison", 710 | "grocery store", 711 | "bakery", 712 | "barbershop", 713 | "bookshop", 714 | "butcher shop", 715 | "confectionery", 716 | "shoe shop", 717 | "tobacco shop", 718 | "toyshop", 719 | "fountain", 720 | "cliff dwelling", 721 | "yurt", 722 | "dock", 723 | "brass", 724 | "megalith", 725 | "bannister", 726 | "breakwater", 727 | "dam", 728 | "chainlink fence", 729 | "picket fence", 730 | "worm fence", 731 | "stone wall", 732 | "grille", 733 | "sliding door", 734 | "turnstile", 735 | "mountain tent", 736 | "scoreboard", 737 | "honeycomb", 738 | "plate rack", 739 | "pedestal", 740 | "beacon", 741 | "mashed potato", 742 | "bell pepper", 743 | "head cabbage", 744 | "broccoli", 745 | "cauliflower", 746 | "zucchini", 747 | "spaghetti squash", 748 | "acorn squash", 749 | "butternut squash", 750 | "cucumber", 751 | "artichoke", 752 | "cardoon", 753 | "mushroom", 754 | "shower curtain", 755 | "jean", 756 | "carton", 757 | "handkerchief", 758 | "sandal", 759 | "ashcan", 760 | "safe", 761 | "plate", 762 | "necklace", 763 | "croquet ball", 764 | "fur coat", 765 | "thimble", 766 | "pajama", 767 | "running shoe", 768 | "cocktail shaker", 769 | "chest", 770 | "manhole cover", 771 | "modem", 772 | "tub", 773 | "tray", 774 | "balance beam", 775 | "bagel", 776 | "prayer rug", 777 | "kimono", 778 | "hot pot", 779 | "whiskey jug", 780 | "knee pad", 781 | "book jacket", 782 | "spindle", 783 | "ski mask", 784 | "beer bottle", 785 | "crash helmet", 786 | "bottlecap", 787 | "tile roof", 788 | "mask", 789 | "maillot", 790 | "Petri dish", 791 | "football helmet", 792 | "bathing cap", 793 | "teddy bear", 794 | "holster", 795 | "pop bottle", 796 | "photocopier", 797 | "vestment", 798 | "crossword puzzle", 799 | "golf ball", 800 | "trifle", 801 | "suit", 802 | "water tower", 803 | "feather boa", 804 | "cloak", 805 | "red wine", 806 | "drumstick", 807 | "shield", 808 | "Christmas stocking", 809 | "hoopskirt", 810 | "menu", 811 | "stage", 812 | "bonnet", 813 | "meat loaf", 814 | "baseball", 815 | "face powder", 816 | "scabbard", 817 | "sunscreen", 818 | "beer glass", 819 | "hen-of-the-woods", 820 | "guacamole", 821 | "lampshade", 822 | "wool", 823 | "hay", 824 | "bow tie", 825 | "mailbag", 826 | "water jug", 827 | "bucket", 828 | "dishrag", 829 | "soup bowl", 830 | "eggnog", 831 | "mortar", 832 | "trench coat", 833 | "paddle", 834 | "chain", 835 | "swab", 836 | "mixing bowl", 837 | "potpie", 838 | "wine bottle", 839 | "shoji", 840 | "bulletproof vest", 841 | "drilling platform", 842 | "binder", 843 | "cardigan", 844 | "sweatshirt", 845 | "pot", 846 | "birdhouse", 847 | "hamper", 848 | "ping-pong ball", 849 | "pencil box", 850 | "pay-phone", 851 | "consomme", 852 | "apron", 853 | "punching bag", 854 | "backpack", 855 | "groom", 856 | "bearskin", 857 | "pencil sharpener", 858 | "broom", 859 | "mosquito net", 860 | "abaya", 861 | "mortarboard", 862 | "poncho", 863 | "crutch", 864 | "Polaroid camera", 865 | "space bar", 866 | "cup", 867 | "racket", 868 | "traffic light", 869 | "quill", 870 | "radio", 871 | "dough", 872 | "cuirass", 873 | "military uniform", 874 | "lipstick", 875 | "shower cap", 876 | "monitor", 877 | "oscilloscope", 878 | "mitten", 879 | "brassiere", 880 | "French loaf", 881 | "vase", 882 | "milk can", 883 | "rugby ball", 884 | "paper towel", 885 | "earthstar", 886 | "envelope", 887 | "miniskirt", 888 | "cowboy hat", 889 | "trolleybus", 890 | "perfume", 891 | "bathtub", 892 | "hotdog", 893 | "coral fungus", 894 | "bullet train", 895 | "pillow", 896 | "toilet tissue", 897 | "cassette", 898 | "carpenter's kit", 899 | "ladle", 900 | "stinkhorn", 901 | "lotion", 902 | "hair spray", 903 | "academic gown", 904 | "dome", 905 | "crate", 906 | "wig", 907 | "burrito", 908 | "pill bottle", 909 | "chain mail", 910 | "theater curtain", 911 | "window shade", 912 | "barrel", 913 | "washbasin", 914 | "ballpoint", 915 | "basketball", 916 | "bath towel", 917 | "cowboy boot", 918 | "gown", 919 | "window screen", 920 | "agaric", 921 | "cellular telephone", 922 | "nipple", 923 | "barbell", 924 | "mailbox", 925 | "lab coat", 926 | "fire screen", 927 | "minibus", 928 | "packet", 929 | "maze", 930 | "pole", 931 | "horizontal bar", 932 | "sombrero", 933 | "pickelhaube", 934 | "rain barrel", 935 | "wallet", 936 | "cassette player", 937 | "comic book", 938 | "piggy bank", 939 | "street sign", 940 | "bell cote", 941 | "fountain pen", 942 | "Windsor tie", 943 | "volleyball", 944 | "overskirt", 945 | "sarong", 946 | "purse", 947 | "bolo tie", 948 | "bib", 949 | "parachute", 950 | "sleeping bag", 951 | "television", 952 | "swimming trunks", 953 | "measuring cup", 954 | "espresso", 955 | "pizza", 956 | "breastplate", 957 | "shopping basket", 958 | "wooden spoon", 959 | "saltshaker", 960 | "chocolate sauce", 961 | "ballplayer", 962 | "goblet", 963 | "gyromitra", 964 | "stretcher", 965 | "water bottle", 966 | "dial telephone", 967 | "soap dispenser", 968 | "jersey", 969 | "school bus", 970 | "jigsaw puzzle", 971 | "plastic bag", 972 | "reflex camera", 973 | "diaper", 974 | "Band Aid", 975 | "ice lolly", 976 | "velvet", 977 | "tennis ball", 978 | "gasmask", 979 | "doormat", 980 | "Loafer", 981 | "ice cream", 982 | "pretzel", 983 | "quilt", 984 | "maillot", 985 | "tape player", 986 | "clog", 987 | "iPod", 988 | "bolete", 989 | "scuba diver", 990 | "pitcher", 991 | "matchstick", 992 | "bikini", 993 | "sock", 994 | "CD player", 995 | "lens cap", 996 | "thatch", 997 | "vault", 998 | "beaker", 999 | "bubble", 1000 | "cheeseburger", 1001 | "parallel bars", 1002 | "flagpole", 1003 | "coffee mug", 1004 | "rubber eraser", 1005 | "stole", 1006 | "carbonara", 1007 | "dumbbell", 1008 | }; -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TensorFlowTOP 2 | 3 | A highly experimental TensorFlow plugin for TouchDesigner. 4 | 5 | This will be updated. 6 | 7 | ## Setup 8 | 1. Clone this repository. 9 | 2. Create a folder inside called `libs`. 10 | 3. Clone the TensorFlow repository inside of `libs`. 11 | 4. Follow the instructions below to build TensorFlow. 12 | 13 | ## Building TensorFlow from Source 14 | 15 | 1. Install `Visual Studio 2015`. 16 | 2. Install `CUDA 8.0` and `cuDNN 5.1`. 17 | 3. Install `Anaconda` for Windows. 18 | 4. Run `conda install python=3.5` to install the proper version of Python (you can 19 | verify that the correct version of Python is installed by opening a new `cmd` 20 | prompt and running the command `python`: you should see text like `Python 3.5.4 ...` 21 | before the interpreter is launched). 22 | 5. Install `SWIG` (latest `.exe` for Windows x64). 23 | 6. Add the `SWIG` folder location to your `PATH`, as it is referenced during the build. 24 | 7. Navigative to `libs\tensorflow\tensorflow\contrib\cmake\`. 25 | 8. Create a folder here called `build`. 26 | 9. Navigative inside this folder. 27 | 10. Run the command: `cmake .. -A x64 -DCMAKE_BUILD_TYPE=Release`: this will generate a 28 | `Visual Studio 2015` solution file called `tensorflow.sln`. 29 | 11. Open this file in `Visual Studio 2015`. 30 | 12. By default, the project named `ALL_BUILD` will be selected. 31 | 13. Make sure that your configuration is set to `Release` and `x64`. 32 | 14. Right-click `ALL_BUILD` in the solution explorer and click `build`. 33 | 15. Wait about 2 hours... 34 | 16. Finally, if the build succeeds, create an **environment variable** `$TENSORFLOW_BUILD` 35 | pointing to the `build` directory. 36 | 37 | ## Creating an Example C++ Project 38 | 39 | 1. Create a new `Visual Studio 2015` project. 40 | 2. Add a new file named `main.cpp`. 41 | 3. Under `C/C++ -> General -> Additional Include Directories`, add: 42 | ``` 43 | $(TENSORFLOW_BUILD); 44 | $(TENSORFLOW_BUILD)\..\..\..\..\; 45 | $(TENSORFLOW_BUILD)\..\..\..\..\third_party\eigen3; 46 | $(TENSORFLOW_BUILD)\external\zlib_archive; 47 | $(TENSORFLOW_BUILD)\external\gif_archive\giflib-5.1.4; 48 | $(TENSORFLOW_BUILD)\external\png_archive; 49 | $(TENSORFLOW_BUILD)\external\jpeg_archive; 50 | $(TENSORFLOW_BUILD)\external\lmdb; 51 | $(TENSORFLOW_BUILD)\external\eigen_archive; 52 | $(TENSORFLOW_BUILD)\gemmlowp\src\gemmlowp; 53 | $(TENSORFLOW_BUILD)\jsoncpp\src\jsoncpp; 54 | $(TENSORFLOW_BUILD)\external\farmhash_archive; 55 | $(TENSORFLOW_BUILD)\external\farmhash_archive\util; 56 | $(TENSORFLOW_BUILD)\external\highwayhash; 57 | $(TENSORFLOW_BUILD)\cub\src\cub; 58 | $(TENSORFLOW_BUILD)\external\nsync\public; 59 | $(TENSORFLOW_BUILD)\protobuf\src\protobuf\src; 60 | $(TENSORFLOW_BUILD)\re2\install\include; 61 | $(TENSORFLOW_BUILD)\external\sqlite; 62 | $(TENSORFLOW_BUILD)\grpc\src\grpc\include; 63 | $(TENSORFLOW_BUILD)\snappy\src\snappy; 64 | ``` 65 | 3. Under `C/C++ -> Preprocessor -> Preprocessor Definitions`, add: 66 | ``` 67 | COMPILER_MSVC; 68 | PLATFORM_WINDOWS; 69 | ``` 70 | 4. Under `Linker -> General -> Additional Library Directories`, add `$(TENSORFLOW_BUILD)`. 71 | 5. Under `Linker -> Input -> Additional Dependencies`, add the following libraries: 72 | ``` 73 | re2\src\re2\$(Configuration)\re2.lib; 74 | grpc\src\grpc\Release\grpc++_unsecure.lib; 75 | grpc\src\grpc\Release\grpc_unsecure.lib; 76 | grpc\src\grpc\Release\gpr.lib; 77 | zlib\install\lib\zlibstatic.lib; 78 | gif\install\lib\giflib.lib; 79 | png\install\lib\libpng12_static.lib; 80 | jpeg\install\lib\libjpeg.lib; 81 | lmdb\install\lib\lmdb.lib; 82 | jsoncpp\src\jsoncpp\src\lib_json\$(Configuration)\jsoncpp.lib; 83 | farmhash\install\lib\farmhash.lib; 84 | fft2d\src\lib\fft2d.lib; 85 | highwayhash\install\lib\highwayhash.lib; 86 | nsync\install\lib\nsync.lib; 87 | snappy\src\snappy\Release\snappy.lib; 88 | protobuf\src\protobuf\Release\libprotobuf.lib; 89 | tf_cc.dir\Release\tf_cc.lib; 90 | tf_cc_ops.dir\Release\tf_cc_ops.lib; 91 | tf_cc_framework.dir\Release\tf_cc_framework.lib; 92 | tf_core_cpu.dir\Release\tf_core_cpu.lib; 93 | tf_core_direct_session.dir\Release\tf_core_direct_session.lib; 94 | tf_core_framework.dir\Release\tf_core_framework.lib; 95 | tf_core_kernels.dir\Release\tf_core_kernels.lib; 96 | tf_core_lib.dir\Release\tf_core_lib.lib; 97 | tf_core_ops.dir\Release\tf_core_ops.lib; 98 | tf_cc_while_loop.dir\Release\tf_cc_while_loop.lib; 99 | Release\tf_protos_cc.lib; 100 | sqlite\install\lib\sqlite.lib 101 | ``` 102 | which are all relative to the `$(TENSORFLOW_BUILD)` path. 103 | 6. Under `Linker -> Command Line -> Additional Options`, add: 104 | ``` 105 | /machine:x64 106 | /ignore:4049 107 | /ignore:4197 108 | /ignore:4217 109 | /ignore:4221 110 | /WHOLEARCHIVE:tf_cc.lib 111 | /WHOLEARCHIVE:tf_cc_framework.lib 112 | /WHOLEARCHIVE:tf_cc_ops.lib 113 | /WHOLEARCHIVE:tf_core_cpu.lib 114 | /WHOLEARCHIVE:tf_core_direct_session.lib 115 | /WHOLEARCHIVE:tf_core_framework.lib 116 | /WHOLEARCHIVE:tf_core_kernels.lib 117 | /WHOLEARCHIVE:tf_core_lib.lib 118 | /WHOLEARCHIVE:tf_core_ops.lib 119 | /WHOLEARCHIVE:libjpeg.lib 120 | ``` 121 | to the text field 122 | 7. Back in `main.cpp`, add the following `include` directives: 123 | ``` 124 | #include "tensorflow/cc/ops/const_op.h" 125 | #include "tensorflow/cc/ops/image_ops.h" 126 | #include "tensorflow/cc/ops/standard_ops.h" 127 | #include "tensorflow/core/framework/graph.pb.h" 128 | #include "tensorflow/core/framework/tensor.h" 129 | #include "tensorflow/core/graph/default_device.h" 130 | #include "tensorflow/core/graph/graph_def_builder.h" 131 | #include "tensorflow/core/lib/core/errors.h" 132 | #include "tensorflow/core/lib/core/stringpiece.h" 133 | #include "tensorflow/core/lib/core/threadpool.h" 134 | #include "tensorflow/core/lib/io/path.h" 135 | #include "tensorflow/core/lib/strings/stringprintf.h" 136 | #include "tensorflow/core/platform/init_main.h" 137 | #include "tensorflow/core/platform/logging.h" 138 | #include "tensorflow/core/platform/types.h" 139 | #include "tensorflow/core/public/session.h" 140 | #include "tensorflow/core/util/command_line_flags.h" 141 | ``` 142 | 8. Generate the model with `export_model.py`. 143 | 144 | # References 145 | - `https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/cmake/README.md` 146 | - `https://joe-antognini.github.io/machine-learning/build-windows-tf` 147 | - `http://anonimousindonesian.blogspot.com/2017/12/tutorial-how-to-build-tensorflow.html` 148 | - `https://github.com/jhjin/tensorflow-cpp` 149 | - `https://gist.github.com/kyrs/9adf86366e9e4f04addb` 150 | -------------------------------------------------------------------------------- /Shaders.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | static const char* vertShaderSrc = 4 | R"(#version 430 core 5 | 6 | vec2 positions[6] = vec2[]( vec2(-1.0, -1.0), // lower-left 7 | vec2( 1.0, -1.0), // lower-right 8 | vec2( 1.0, 1.0), // upper-right 9 | 10 | vec2(-1.0, -1.0), // lower-left 11 | vec2( 1.0, 1.0), // upper-right 12 | vec2(-1.0, 1.0)); // upper-left 13 | 14 | out VS_OUT 15 | { 16 | vec2 uv; 17 | } vs_out; 18 | 19 | void main() 20 | { 21 | vs_out.uv = positions[gl_VertexID] * 0.5 + 0.5; 22 | 23 | gl_Position = vec4(positions[gl_VertexID], 0.0, 1.0); 24 | })"; 25 | 26 | static const char* fragShaderSrc = 27 | R"(#version 430 core 28 | 29 | layout(binding = 0) uniform sampler2D u_input; 30 | 31 | in VS_OUT 32 | { 33 | vec2 uv; 34 | } fs_in; 35 | 36 | layout(location = 0) out vec4 o_color; 37 | 38 | void main() 39 | { 40 | o_color = texture(u_input, fs_in.uv); 41 | })"; -------------------------------------------------------------------------------- /TOP_CPlusPlusBase.h: -------------------------------------------------------------------------------- 1 | /* Shared Use License: This file is owned by Derivative Inc. (Derivative) and 2 | * can only be used, and/or modified for use, in conjunction with 3 | * Derivative's TouchDesigner software, and only if you are a licensee who has 4 | * accepted Derivative's TouchDesigner license or assignment agreement (which 5 | * also govern the use of this file). You may share a modified version of this 6 | * file with another authorized licensee of Derivative's TouchDesigner software. 7 | * Otherwise, no redistribution or sharing of this file, with or without 8 | * modification, is permitted. 9 | */ 10 | 11 | /* 12 | * Produced by: 13 | * 14 | * Derivative Inc 15 | * 401 Richmond Street West, Unit 386 16 | * Toronto, Ontario 17 | * Canada M5V 3A8 18 | * 416-591-3555 19 | * 20 | * NAME: TOP_CPlusPlusBase.h 21 | * 22 | */ 23 | 24 | /******* 25 | Do not edit this file directly! 26 | Make a subclass of TOP_CPlusPlusBase instead, and add your own data/function 27 | 28 | Derivative Developers:: Make sure the virtual function order 29 | stays the same, otherwise changes won't be backwards compatible 30 | ********/ 31 | 32 | 33 | #ifndef __TOP_CPlusPlusBase__ 34 | #define __TOP_CPlusPlusBase__ 35 | 36 | #include "CPlusPlus_Common.h" 37 | 38 | class TOP_CPlusPlusBase; 39 | class TOP_Context; 40 | 41 | enum class TOP_ExecuteMode : int32_t 42 | { 43 | // Rendering is done using OpenGL into a FBO/RenderBuffers 44 | // that is provided for you. 45 | OpenGL_FBO = 0, 46 | 47 | 48 | // *NOTE* - Do not use OpenGL calls when using a CPUMem*/CUDA executeMode. 49 | 50 | 51 | // CPU memory is filled with data directly. No OpenGL calls can be 52 | // made when using this mode. Doing so will likely result in 53 | // rendering issues within TD. 54 | 55 | // cpuPixelData[0] and cpupixelData[1] are width by height array of pixels. 56 | // to access pixel (x,y) you would need to offset the memory location by bytesperpixel * ( y * width + x). 57 | // all pixels should be set, pixels that was not set will have an undefined value. 58 | 59 | // "CPUMemWriteOnly" - cpuPixelData* will be provided that you fill in with pixel data. This will automatically be uploaded to the GPU as a texture for you. Reading from the memory will result in very poor performance. 60 | CPUMemWriteOnly, 61 | 62 | // "CPUmemReadWrite - same as CPU_MEM_WRITEONLY but reading from the memory won't result in a large performance pentalty. The initial contents of the memory is undefined still. 63 | CPUMemReadWrite, 64 | 65 | // Using CUDA. Textures will be given using cudaArray*, registered with 66 | // cudaGraphicsRegisterFlagsSurfaceLoadStore flag set. The output 67 | // texture will be written using a provided cudaArray* as well 68 | CUDA, 69 | }; 70 | 71 | // Define for the current API version that this sample code is made for. 72 | // To upgrade to a newer version, replace the files 73 | // TOP_CPlusPlusBase.h 74 | // CPlusPlus_Common.h 75 | // from the samples folder in a newer TouchDesigner installation. 76 | // You may need to upgrade your plugin code in that case, to match 77 | // the new API requirements 78 | const int TOPCPlusPlusAPIVersion = 8; 79 | 80 | struct TOP_PluginInfo 81 | { 82 | int32_t apiVersion; 83 | 84 | // Set this to control the execution mode for this plugin 85 | // See the documention atin TOP_ExecuteMode for more information 86 | TOP_ExecuteMode executeMode; 87 | 88 | int32_t reserved[40]; 89 | 90 | }; 91 | 92 | // These are the definitions for the C-functions that are used to 93 | // load the library and create instances of the object you define 94 | typedef TOP_PluginInfo (__cdecl *GETTOPPLUGININFO)(void); 95 | typedef TOP_CPlusPlusBase* (__cdecl *CREATETOPINSTANCE)(const OP_NodeInfo*, 96 | TOP_Context*); 97 | typedef void (__cdecl *DESTROYTOPINSTANCE)(TOP_CPlusPlusBase*, TOP_Context*); 98 | 99 | // These classes are used to pass data to/from the functions you will define 100 | 101 | 102 | 103 | // TouchDesigner will select the best pixel format based on the options you give 104 | // Not all possible combinations of channels/bit depth are possible, 105 | // so you get the best choice supported by your card 106 | 107 | class TOP_OutputFormat 108 | { 109 | public: 110 | int32_t width; 111 | int32_t height; 112 | 113 | 114 | // The aspect ratio of the TOP's output 115 | 116 | float aspectX; 117 | float aspectY; 118 | 119 | 120 | // The anti-alias level. 121 | // 1 means no anti-alaising 122 | // 2 means '2x', etc., up to 32 right now 123 | // Only used when executeMode == TOP_ExecuteMode::OpenGL_FBO 124 | 125 | int32_t antiAlias; 126 | 127 | 128 | // Set true if you want this channel, false otherwise 129 | // The channel may still be present if the combination you select 130 | // isn't supported by the card (blue only for example) 131 | 132 | bool redChannel; 133 | bool greenChannel; 134 | bool blueChannel; 135 | bool alphaChannel; 136 | 137 | 138 | // The number of bits per channel. 139 | // TouchDesigner will select the closest supported number of bits based on 140 | // your cards capabilities 141 | 142 | int32_t bitsPerChannel; 143 | 144 | // Set to true if you want a floating point format. 145 | // Some bit precisions don't support floating point (8-bit for example) 146 | // while others require it (32-bit) 147 | 148 | bool floatPrecision; 149 | 150 | 151 | // If you want to use multiple render targets, you can set this 152 | // greater than one 153 | // Only used when executeMode == TOP_ExecuteMode::OpenGL_FBO 154 | 155 | int32_t numColorBuffers; 156 | 157 | 158 | // The number of bits in the depth buffer. 159 | // 0 for no depth buffer 160 | // Only used when executeMode == TOP_ExecuteMode::OpenGL_FBO 161 | 162 | int32_t depthBits; 163 | 164 | 165 | // The number of bits in the stencil buffer 166 | // 0 for no stencil buffer, if this is > 0 then 167 | // it will also cause a depth buffer to be created 168 | // even if you have depthBits == 0 169 | // Only used when executeMode == TOP_ExecuteMode::OpenGL_FBO 170 | 171 | int32_t stencilBits; 172 | 173 | private: 174 | int32_t reserved[20]; 175 | }; 176 | 177 | 178 | // This class will tell you the actual output format 179 | // that was chosen. 180 | class TOP_OutputFormatSpecs 181 | { 182 | public: 183 | int32_t width; 184 | int32_t height; 185 | float aspectX; 186 | float aspectY; 187 | 188 | int32_t antiAlias; 189 | 190 | int32_t redBits; 191 | int32_t blueBits; 192 | int32_t greenBits; 193 | int32_t alphaBits; 194 | bool floatPrecision; 195 | 196 | /*** BEGIN: TOP_ExcuteMode::OpenGL_FBO and CUDA executeMode specific ***/ 197 | int32_t numColorBuffers; 198 | 199 | int32_t depthBits; 200 | int32_t stencilBits; 201 | 202 | 203 | // The OpenGL internal format of the output texture. E.g GL_RGBA8, GL_RGBA32F 204 | GLint pixelFormat; 205 | /*** END: TOP_ExecuteMode::OpenGL_FBO and CUDA executeMode specific ***/ 206 | 207 | 208 | 209 | 210 | /*** BEGIN: CPU_MEM_* executeMode specific ***/ 211 | 212 | // if the 'executeMode' is set to CPU_MEM_* 213 | // then cpuPixelData will point to three blocks of memory of size 214 | // width * height * bytesPerPixel 215 | // and one may be uploaded as a texture after the execute call. 216 | // All of these pointers will stay valid until the next execute() call 217 | // unless you set newCPUPixelDataLocation to 0, 1 or 2. In that case 218 | // the location you specified will become invalid as soon as execute() 219 | // returns. The pointers for the locations you don't specify stays 220 | // valid though. 221 | // This means you can hold onto these pointers by default and use them 222 | // after execute() returns, such as filling them in another thread. 223 | void* cpuPixelData[3]; 224 | 225 | // setting this to 0 will upload memory from cpuPixelData[0], 226 | // setting this to 1 will upload memory from cpuPixelData[1] 227 | // setting this to 2 will upload memory from cpuPixelData[2] 228 | // uploading from a memory location will invalidate it and a new memory location will be provided next execute call. 229 | // setting this to -1 will not upload any memory and retain previously uploaded texture 230 | // setting this to any other value will result in an error being displayed in the CPlusPlus TOP. 231 | // defaults to -1 232 | mutable int32_t newCPUPixelDataLocation; 233 | 234 | /*** END: CPU_MEM_* executeMode specific ***/ 235 | 236 | 237 | 238 | /*** BEGIN: New TOP_ExecuteMode::OpenGL_FBO execudeMode specific data ***/ 239 | 240 | // The first color can either be a GL_TEXTURE_2D or a GL_RENDERBUFFER 241 | // depending on the settings. This will be set to either 242 | // GL_TEXTURE_2D or GL_RENDERBUFFER accordingly 243 | GLenum colorBuffer0Type; 244 | 245 | // The indices for the renderBuffers for the color buffers that are attached to the FBO, except for possibly index 0 (see colorBuffer0Type) 246 | // these are all GL_RENDERBUFFER GL objects, or 0 if not present 247 | GLuint colorBufferRB[32]; 248 | 249 | // The renderBuffer for the depth buffer that is attached to the FBO 250 | // This is always a GL_RENDERBUFFER GL object 251 | GLuint depthBufferRB; 252 | 253 | /*** END: TOP_ExecuteMode::OpenGL_FBO executeMode specific ***/ 254 | 255 | /*** BEGIN: TOP_ExecuteMode::CUDA specific ***/ 256 | // Write to this CUDA memory to fill the output textures 257 | cudaArray* cudaOutput[32]; 258 | 259 | /*** END: TOP_ExecuteMode::CUDA specific ***/ 260 | private: 261 | int32_t reserved[10]; 262 | }; 263 | 264 | class TOP_GeneralInfo 265 | { 266 | public: 267 | // Set this to true if you want the TOP to cook every frame, even 268 | // if none of it's inputs/parameters are changing 269 | 270 | bool cookEveryFrame; 271 | 272 | 273 | // TouchDesigner will clear the color/depth buffers before calling 274 | // execute(), as an optimization you can disable this, if you know 275 | // you'll be overwriting all the data or calling clear yourself 276 | 277 | bool clearBuffers; 278 | 279 | 280 | // Set this to true if you want TouchDesigner to create mipmaps for all the 281 | // TOPs that are passed into execute() function 282 | 283 | bool mipmapAllTOPs; 284 | 285 | // Set this to true if you want the CHOP to cook every frame, if asked 286 | // (someone uses it's output) 287 | // This is different from 'cookEveryFrame', which causes the node to cook 288 | // every frame no matter what 289 | 290 | bool cookEveryFrameIfAsked; 291 | 292 | // When setting the output texture size using the node's common page 293 | // if using 'Input' or 'Half' options for example, it uses the first input 294 | // by default. You can use a different input by assigning a value 295 | // to inputSizeIndex. 296 | 297 | int32_t inputSizeIndex; 298 | 299 | // Unused by current API Version, but remains for backwards compatibility 300 | int32_t reservedForLegacy1; 301 | 302 | // determines the datatype of each pixel in CPU memory. This will determin 303 | // the size of the CPU memory buffers that are given to you 304 | // in TOP_OutputFormatSpecs 305 | // "BGRA8Fixed" - each pixel will hold 4 fixed-point values of size 8 bits (use 'unsigned char' in the code). They will be ordered BGRA. This is the preferred ordering for better performance. 306 | // "RGBA8Fixed" - each pixel will hold 4 fixed-point values of size 8 bits (use 'unsigned char' in the code). They will be ordered RGBA 307 | // "RGBA32Float" - each pixel will hold 4 floating-point values of size 32 bits (use 'float' in the code). They will be ordered RGBA 308 | // 309 | // Other cases are listed in the CPUMemPixelType enumeration 310 | OP_CPUMemPixelType memPixelType; 311 | 312 | private: 313 | int32_t reserved[18]; 314 | }; 315 | 316 | 317 | // This class is passed into the Create and Destroy methods as well 318 | // as into execute() 319 | // You should use it to signify when you want to do GL work and when you are 320 | // done to avoid GL state conflicts with TouchDesigner's GL context. 321 | class TOP_Context 322 | { 323 | public: 324 | virtual ~TOP_Context() {} 325 | 326 | /*** BEGIN: New TOP_ExecuteMode::OpenGL_FBO execudeMode specific functions ***/ 327 | 328 | // This function will make a GL context that is unique to this 329 | // TOP active. Call this before issuing any GL commands. 330 | // During execute() it will also bind a FBO to the GL_DRAW_FRAMEBUFFER 331 | // target and attach textures/renderbuffers to the attachment points 332 | // as required. It will also call glDrawBuffersARB() with the correct 333 | // active draw buffers depending on the number of color buffers in use 334 | // All other GL state will be left as it was from the previous time 335 | // execute() was called for this TOP. 336 | // 337 | // NOTE: No functions on the OP_Inputs class should be called 338 | // between a beginGLCommands() and endGLCommands() block, as they 339 | // may require GL to complete properly due to node cooking 340 | virtual void beginGLCommands() = 0; 341 | 342 | // Call this when you are done issuing GL commands and need to do other 343 | virtual void endGLCommands() = 0; 344 | 345 | // Returns the index of the FBO that TouchDesigner has setup for you. 346 | // Only valid during execute(), between beginGLCommands() and endGLCommands() 347 | // calls. 348 | virtual GLuint getFBOIndex() = 0; 349 | 350 | /*** END: New TOP_ExecuteMode::OpenGL_FBO execudeMode specific functions ***/ 351 | }; 352 | 353 | 354 | /***** FUNCTION CALL ORDER DURING INITIALIZATION ******/ 355 | /* 356 | When the TOP loads the dll the functions will be called in this order 357 | 358 | setupParameters(OP_ParameterManager* m); 359 | 360 | */ 361 | 362 | 363 | /***** FUNCTION CALL ORDER DURING A COOK ******/ 364 | /* 365 | When the TOP cooks the functions will be called in this order 366 | 367 | getGeneralInfo() 368 | getOutputFormat() 369 | 370 | execute() 371 | getNumInfoCHOPChans() 372 | for the number of chans returned getNumInfoCHOPChans() 373 | { 374 | getInfoCHOPChan() 375 | } 376 | getInfoDATSize() 377 | for the number of rows/cols returned by getInfoDATSize() 378 | { 379 | getInfoDATEntries() 380 | } 381 | getWarningString() 382 | getErrorString() 383 | getInfoPopupString() 384 | 385 | */ 386 | 387 | 388 | /*** DO NOT EDIT THIS CLASS, MAKE A SUBCLASS OF IT INSTEAD ***/ 389 | class TOP_CPlusPlusBase 390 | { 391 | protected: 392 | TOP_CPlusPlusBase() 393 | { 394 | } 395 | 396 | 397 | public: 398 | 399 | virtual ~TOP_CPlusPlusBase() 400 | { 401 | } 402 | 403 | // BEGIN PUBLIC INTERFACE 404 | 405 | // Some general settings can be assigned here by setting memebers of 406 | // the TOP_GeneralInfo class that is passed in 407 | virtual void getGeneralInfo(TOP_GeneralInfo*) 408 | { 409 | } 410 | 411 | 412 | // This function is called so the class can tell the TOP what 413 | // kind of buffer it wants to output into. 414 | // TouchDesigner will try to find the best match based on the specifications 415 | // given. 416 | // Return true if you specify the output here 417 | // Return false if you want the output to be set by the TOP's parameters 418 | // The TOP_OutputFormat class is pre-filled with what the TOP would 419 | // output if you return false, so you can just tweak a few settings 420 | // and return true if you want 421 | 422 | virtual bool getOutputFormat(TOP_OutputFormat*) 423 | { 424 | return false; 425 | } 426 | 427 | // In this function you do whatever you want to fill the framebuffer 428 | // 429 | // See the OP_Inputs class definition for more details on it's 430 | // contents 431 | 432 | virtual void execute(const TOP_OutputFormatSpecs*, 433 | OP_Inputs* , 434 | TOP_Context* context) = 0; 435 | 436 | 437 | // Override these methods if you want to output values to the Info CHOP/DAT 438 | // returning 0 means you dont plan to output any Info CHOP channels 439 | 440 | virtual int32_t getNumInfoCHOPChans() 441 | { 442 | return 0; 443 | } 444 | 445 | // Specify the name and value for CHOP 'index', 446 | // by assigning something to 'name' and 'value' members of the 447 | // OP_InfoCHOPChan class pointer that is passed (it points 448 | // to a valid instance of the class already. 449 | // the 'name' pointer will initially point to nullptr 450 | // you must allocate memory or assign a constant string 451 | // to it. 452 | 453 | virtual void getInfoCHOPChan(int32_t index, 454 | OP_InfoCHOPChan* chan) 455 | { 456 | } 457 | 458 | 459 | // Return false if you arn't returning data for an Info DAT 460 | // Return true if you are. 461 | // Fill in members of the OP_InfoDATSize class to specify the size 462 | 463 | virtual bool getInfoDATSize(OP_InfoDATSize* infoSize) 464 | { 465 | return false; 466 | } 467 | 468 | // You are asked to assign values to the Info DAT 1 row or column at a time 469 | // The 'byColumn' variable in 'getInfoDATSize' is how you specify 470 | // if it is by column or by row. 471 | // 'index' is the row/column index 472 | // 'nEntries' is the number of entries in the row/column 473 | 474 | virtual void getInfoDATEntries(int32_t index, 475 | int32_t nEntries, 476 | OP_InfoDATEntries* entries) 477 | { 478 | } 479 | 480 | // You can use this function to put the node into a warning state 481 | // with the returned string as the message. 482 | // Return nullptr if you don't want it to be in a warning state. 483 | virtual const char* getWarningString() 484 | { 485 | return nullptr; 486 | } 487 | 488 | // You can use this function to put the node into a error state 489 | // with the returned string as the message. 490 | // Return nullptr if you don't want it to be in a error state. 491 | virtual const char* getErrorString() 492 | { 493 | return nullptr; 494 | } 495 | 496 | // Use this function to return some text that will show up in the 497 | // info popup (when you middle click on a node) 498 | // Return nullptr if you don't want to return anything. 499 | virtual const char* getInfoPopupString() 500 | { 501 | return nullptr; 502 | } 503 | 504 | 505 | 506 | // Override these methods if you want to define specfic parameters 507 | virtual void setupParameters(OP_ParameterManager* manager) 508 | { 509 | } 510 | 511 | 512 | // This is called whenever a pulse parameter is pressed 513 | virtual void pulsePressed(const char* name) 514 | { 515 | } 516 | 517 | 518 | // END PUBLIC INTERFACE 519 | 520 | 521 | private: 522 | 523 | // Reserved for future features 524 | virtual int32_t reservedFunc6() { return 0; } 525 | virtual int32_t reservedFunc7() { return 0; } 526 | virtual int32_t reservedFunc8() { return 0; } 527 | virtual int32_t reservedFunc9() { return 0; } 528 | virtual int32_t reservedFunc10() { return 0; } 529 | virtual int32_t reservedFunc11() { return 0; } 530 | virtual int32_t reservedFunc12() { return 0; } 531 | virtual int32_t reservedFunc13() { return 0; } 532 | virtual int32_t reservedFunc14() { return 0; } 533 | virtual int32_t reservedFunc15() { return 0; } 534 | virtual int32_t reservedFunc16() { return 0; } 535 | virtual int32_t reservedFunc17() { return 0; } 536 | virtual int32_t reservedFunc18() { return 0; } 537 | virtual int32_t reservedFunc19() { return 0; } 538 | virtual int32_t reservedFunc20() { return 0; } 539 | 540 | int32_t reserved[400]; 541 | 542 | }; 543 | 544 | #endif 545 | -------------------------------------------------------------------------------- /TensorFlowTOP.cpp: -------------------------------------------------------------------------------- 1 | /* Shared Use License: This file is owned by Derivative Inc. (Derivative) and 2 | * can only be used, and/or modified for use, in conjunction with 3 | * Derivative's TouchDesigner software, and only if you are a licensee who has 4 | * accepted Derivative's TouchDesigner license or assignment agreement (which 5 | * also govern the use of this file). You may share a modified version of this 6 | * file with another authorized licensee of Derivative's TouchDesigner software. 7 | * Otherwise, no redistribution or sharing of this file, with or without 8 | * modification, is permitted. 9 | */ 10 | 11 | #include "TensorFlowTOP.h" 12 | 13 | extern "C" 14 | { 15 | DLLEXPORT TOP_PluginInfo GetTOPPluginInfo(void) 16 | { 17 | TOP_PluginInfo info; 18 | info.apiVersion = TOPCPlusPlusAPIVersion; 19 | info.executeMode = TOP_ExecuteMode::OpenGL_FBO; 20 | return info; 21 | } 22 | 23 | DLLEXPORT TOP_CPlusPlusBase* CreateTOPInstance(const OP_NodeInfo* info, TOP_Context* context) 24 | { 25 | return new TensorFlowTOP(info, context); 26 | } 27 | 28 | DLLEXPORT void DestroyTOPInstance(TOP_CPlusPlusBase* instance, TOP_Context *context) 29 | { 30 | delete (TensorFlowTOP*)instance; 31 | } 32 | }; 33 | 34 | Status TensorFlowTOP::convertPixelsToTensor(std::vector* out_tensors, 35 | uint8_t* pixels, 36 | int pixels_width, 37 | int pixels_height, 38 | int pixels_channels, 39 | const int expected_height, 40 | const int expected_width, 41 | const int expected_channels, 42 | const float expected_mean, 43 | const float expected_standard_dev) 44 | { 45 | auto root = tensorflow::Scope::NewRootScope(); 46 | using namespace ::tensorflow::ops; 47 | 48 | // Create the input tensor. 49 | tensorflow::Tensor input_tensor(tensorflow::DT_FLOAT, tensorflow::TensorShape({pixels_height, pixels_width, expected_channels})); 50 | auto input_tensor_mapped = input_tensor.tensor(); 51 | 52 | // Copying the pixel data into the tensor. 53 | for (int y = 0; y < pixels_height; ++y) 54 | { 55 | const uint8_t* source_row = pixels + (y * pixels_width * pixels_channels); 56 | for (int x = 0; x < pixels_width; ++x) 57 | { 58 | const uint8_t* source_pixel = source_row + (x * pixels_channels); 59 | 60 | // OpenGL texture data is read as BGRA, so we want to 61 | // ignore the alpha channel and reorder the other 3 62 | // color channels 63 | for (int c = 0; c < expected_channels; ++c) 64 | { 65 | const uint8_t* source_value = source_pixel + ((expected_channels - 1) - c); 66 | float pixel = static_cast(*source_value); 67 | 68 | input_tensor_mapped(y, x, c) = pixel; 69 | } 70 | } 71 | } 72 | 73 | const std::string output_name = "normalized"; 74 | auto float_caster = Cast(root.WithOpName("float_caster"), input_tensor, tensorflow::DT_FLOAT); 75 | auto dims_expander = ExpandDims(root, float_caster, 0); 76 | auto resized = ResizeBilinear(root, dims_expander, Const(root.WithOpName("size"), {expected_height, expected_width})); 77 | Div(root.WithOpName(output_name), Sub(root, resized, {expected_mean}), {expected_standard_dev}); 78 | 79 | // Run the graph. 80 | tensorflow::GraphDef graph; 81 | TF_RETURN_IF_ERROR(root.ToGraphDef(&graph)); 82 | 83 | std::unique_ptr session(tensorflow::NewSession(tensorflow::SessionOptions())); 84 | TF_RETURN_IF_ERROR(session->Create(graph)); 85 | TF_RETURN_IF_ERROR(session->Run({}, {output_name}, {}, out_tensors)); 86 | 87 | return Status::OK(); 88 | } 89 | 90 | GLuint TensorFlowTOP::createGlslProgram(const std::string& vertSrc, const std::string& fragSrc) 91 | { 92 | // Vertex shader 93 | GLuint vertexShader = glCreateShader(GL_VERTEX_SHADER); 94 | const char* vertSrcPtr = vertSrc.c_str(); 95 | glShaderSource(vertexShader, 1, &vertSrcPtr, nullptr); 96 | glCompileShader(vertexShader); 97 | 98 | // Check for compile time errors 99 | GLint success; 100 | GLchar infoLog[512]; 101 | glGetShaderiv(vertexShader, GL_COMPILE_STATUS, &success); 102 | if (!success) 103 | { 104 | glGetShaderInfoLog(vertexShader, 512, NULL, infoLog); 105 | std::cout << "Error compiling vertex shader:\n" << infoLog << std::endl; 106 | } 107 | 108 | // Fragment shader 109 | GLuint fragmentShader = glCreateShader(GL_FRAGMENT_SHADER); 110 | const char* fragSrcPtr = fragSrc.c_str(); 111 | glShaderSource(fragmentShader, 1, &fragSrcPtr, NULL); 112 | glCompileShader(fragmentShader); 113 | 114 | // Check for compile time errors 115 | glGetShaderiv(fragmentShader, GL_COMPILE_STATUS, &success); 116 | if (!success) 117 | { 118 | glGetShaderInfoLog(fragmentShader, 512, NULL, infoLog); 119 | std::cout << "Error compiling fragment shader:\n" << infoLog << std::endl; 120 | } 121 | 122 | // Link shaders 123 | GLuint program = glCreateProgram(); 124 | glAttachShader(program, vertexShader); 125 | glAttachShader(program, fragmentShader); 126 | glLinkProgram(program); 127 | 128 | // Check for linking errors 129 | glGetProgramiv(program, GL_LINK_STATUS, &success); 130 | if (!success) 131 | { 132 | glGetProgramInfoLog(program, 512, NULL, infoLog); 133 | std::cout << "Error linking program:\n" << infoLog << std::endl; 134 | } 135 | 136 | glDeleteShader(vertexShader); 137 | glDeleteShader(fragmentShader); 138 | 139 | return program; 140 | } 141 | 142 | void TensorFlowTOP::loadModel(const std::string& graphPath) 143 | { 144 | std::cout << "Attempting to load graph file...\n"; 145 | 146 | tensorflow::GraphDef graphDefinition; 147 | if (!ReadBinaryProto(tensorflow::Env::Default(), graphPath, &graphDefinition).ok()) 148 | { 149 | error = "Failed to read .pb file - check that the path and file format are correct."; 150 | } 151 | 152 | // Print some information about this graph: 153 | // `graphDefinition.node_size()` -> prints something like `1004` 154 | for (size_t i = 0; i < 3; ++i) 155 | { 156 | auto node = graphDefinition.node(i); 157 | std::cout << "Node at index " << i << " has name: " << node.name() << ", input size: " << node.input_size() << "\n"; 158 | for (const auto& pair : node.attr()) 159 | { 160 | const auto& shape = pair.second.shape(); 161 | std::cout << " " << pair.first << shape.DebugString() << "\n"; 162 | } 163 | } 164 | std::cout << "Attempting to start session...\n"; 165 | 166 | tensorflow::SessionOptions options; 167 | options.config.mutable_gpu_options()->set_allow_growth(true); 168 | 169 | (&session)->reset(tensorflow::NewSession(options)); 170 | 171 | if (!session->Create(graphDefinition).ok()) 172 | { 173 | error = "Failed to create graph from .pb file."; 174 | } 175 | } 176 | 177 | void TensorFlowTOP::allocateFbo() 178 | { 179 | glCreateFramebuffers(1, &fbo); 180 | glNamedFramebufferTexture(fbo, GL_COLOR_ATTACHMENT0, inputTexture, 0); 181 | 182 | if (glCheckNamedFramebufferStatus(fbo, GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) 183 | { 184 | error = "Framebuffer incomplete."; 185 | } 186 | } 187 | 188 | void TensorFlowTOP::allocateTextures() 189 | { 190 | glCreateTextures(GL_TEXTURE_2D, 1, &inputTexture); 191 | glTextureParameteri(inputTexture, GL_TEXTURE_WRAP_S, GL_CLAMP); 192 | glTextureParameteri(inputTexture, GL_TEXTURE_WRAP_T, GL_CLAMP); 193 | glTextureParameteri(inputTexture, GL_TEXTURE_MIN_FILTER, GL_NEAREST); 194 | glTextureParameteri(inputTexture, GL_TEXTURE_MAG_FILTER, GL_NEAREST); 195 | glTextureStorage2D(inputTexture, 1, GL_RGBA8, 1000, 1); 196 | 197 | glCreateTextures(GL_TEXTURE_2D, 1, &outputTexture); 198 | glTextureParameteri(outputTexture, GL_TEXTURE_WRAP_S, GL_CLAMP); 199 | glTextureParameteri(outputTexture, GL_TEXTURE_WRAP_T, GL_CLAMP); 200 | glTextureParameteri(outputTexture, GL_TEXTURE_MIN_FILTER, GL_NEAREST); 201 | glTextureParameteri(outputTexture, GL_TEXTURE_MAG_FILTER, GL_NEAREST); 202 | glTextureStorage2D(outputTexture, 1, GL_R8, 1000, 1); 203 | } 204 | 205 | TensorFlowTOP::TensorFlowTOP(const OP_NodeInfo* info, TOP_Context* context) : 206 | runGraph(false), 207 | inputWidth(1280), 208 | inputHeight(720) 209 | { 210 | #ifdef WIN32 211 | static bool needGLEWInit = true; 212 | if (needGLEWInit) 213 | { 214 | needGLEWInit = false; 215 | context->beginGLCommands(); 216 | glewInit(); 217 | context->endGLCommands(); 218 | } 219 | #endif 220 | 221 | program = createGlslProgram(vertShaderSrc, fragShaderSrc); 222 | 223 | glCreateVertexArrays(1, &vao); 224 | 225 | loadModel("C:/Users/michael.walczyk/Desktop/tensorflow_top/models/inception.pb"); 226 | allocateTextures(); 227 | allocateFbo(); 228 | } 229 | 230 | TensorFlowTOP::~TensorFlowTOP() 231 | { 232 | } 233 | 234 | void TensorFlowTOP::getGeneralInfo(TOP_GeneralInfo* ginfo) 235 | { 236 | ginfo->cookEveryFrame = false; 237 | ginfo->cookEveryFrameIfAsked = false; 238 | } 239 | 240 | bool TensorFlowTOP::getOutputFormat(TOP_OutputFormat* format) 241 | { 242 | //format->width = 1000; 243 | //format->height = 1; 244 | return false; 245 | } 246 | 247 | void TensorFlowTOP::execute(const TOP_OutputFormatSpecs* outputFormat, OP_Inputs* inputs, TOP_Context *context) 248 | { 249 | auto topInput = inputs->getInputTOP(0); 250 | if (topInput) 251 | { 252 | if (inputWidth != topInput->width || inputHeight != topInput->height) 253 | { 254 | allocateTextures(); 255 | inputWidth = topInput->width; 256 | inputHeight = topInput->height; 257 | } 258 | 259 | // Draw the input texture into this TOP's FBO. 260 | context->beginGLCommands(); 261 | { 262 | glViewport(0, 0, topInput->width, topInput->height); 263 | glClearColor(0.0, 0.0, 0.0, 0.0); 264 | glClear(GL_COLOR_BUFFER_BIT); 265 | 266 | glBindTextureUnit(0, topInput->textureIndex); 267 | 268 | glUseProgram(program); 269 | glBindVertexArray(vao); 270 | glDrawArrays(GL_TRIANGLES, 0, 6); 271 | } 272 | context->endGLCommands(); 273 | 274 | // Tensors are interpretted top-down, so we need to flip the pixels here. 275 | OP_TOPInputDownloadOptions options; 276 | options.verticalFlip = true; 277 | options.downloadType = OP_TOPInputDownloadType::Instant; 278 | 279 | // Read pixels from GPU -> CPU. 280 | uint8_t* pixels = static_cast(inputs->getTOPDataInCPUMemory(topInput, &options)); 281 | 282 | // Per the TouchDesigner documentation, the pointer returned above might be `null` sometimes... 283 | if (pixels != nullptr) 284 | { 285 | // This is specific to the `inception` network and will need to be determined automatically 286 | // in the future. 287 | const int32 expected_dims = 299; 288 | 289 | std::vector inputs; 290 | 291 | if (!convertPixelsToTensor(&inputs, pixels, outputFormat->width, outputFormat->height, 4, expected_dims, expected_dims).ok()) 292 | { 293 | error = "Failed to convert pixels to tensor - check input and output dimensions."; 294 | } 295 | 296 | // Run the session and collect output tensors. 297 | std::vector outputs; 298 | string input_layer = "Mul"; 299 | string output_layer = "softmax"; 300 | if (!session->Run({{input_layer, inputs[0]}}, {output_layer}, {}, &outputs).ok()) 301 | { 302 | error = "Failed to run model on provided input."; 303 | } 304 | 305 | auto tensor = outputs[0]; 306 | auto number_of_dimensions = tensor.dims(); 307 | std::cout << "Output tensor has " << number_of_dimensions << " dimensions\n"; 308 | for (size_t i = 0; i < number_of_dimensions; i++) 309 | { 310 | std::cout << " dimension " << i << ": " << tensor.dim_size(i) << "\n"; 311 | } 312 | if (number_of_dimensions > 3) 313 | { 314 | 315 | // TODO: how do we interpret this? 316 | } 317 | 318 | // Upload the output tensor's data store to a OpenGL texture. 319 | /*auto tensor = outputs[0].flat(); 320 | auto length = outputs[0].NumElements(); 321 | std::cout << "Uploading " << length << " elements\n"; 322 | context->beginGLCommands(); 323 | { 324 | glTextureSubImage2D(texture, 0, 0, 0, length, 1, GL_RED, GL_UNSIGNED_BYTE, pixels); 325 | 326 | glViewport(0, 0, outputFormat->width, outputFormat->height); 327 | glClearColor(0.0, 0.0, 0.0, 0.0); 328 | glClear(GL_COLOR_BUFFER_BIT); 329 | 330 | glBindTextureUnit(0, texture); 331 | 332 | glUseProgram(program); 333 | glBindVertexArray(vao); 334 | glDrawArrays(GL_TRIANGLES, 0, 6); 335 | } 336 | context->endGLCommands();*/ 337 | 338 | // Grab the index of the class with the highest score. 339 | Eigen::Map pred(outputs[0].flat().data(), outputs[0].NumElements()); 340 | int maxIndex; 341 | float maxValue = pred.maxCoeff(&maxIndex); 342 | 343 | std::cout << "Class with highest probability: " << classNames[maxIndex] << ", " << maxValue << "\n"; 344 | } 345 | } 346 | } 347 | 348 | int32_t TensorFlowTOP::getNumInfoCHOPChans() 349 | { 350 | return 0; 351 | } 352 | 353 | void TensorFlowTOP::getInfoCHOPChan(int32_t index, OP_InfoCHOPChan* chan) 354 | { 355 | } 356 | 357 | bool TensorFlowTOP::getInfoDATSize(OP_InfoDATSize* infoSize) 358 | { 359 | return true; 360 | } 361 | 362 | void TensorFlowTOP::getInfoDATEntries(int32_t index, int32_t nEntries, OP_InfoDATEntries* entries) 363 | { 364 | } 365 | 366 | void TensorFlowTOP::setupParameters(OP_ParameterManager* manager) 367 | { 368 | // A filepath parameter for loading custom models. 369 | { 370 | OP_StringParameter sp; 371 | sp.defaultValue = "models/inception.pb"; 372 | sp.name = "Modelpath"; 373 | sp.label = "Model Path"; 374 | 375 | OP_ParAppendResult res = manager->appendFile(sp); 376 | assert(res == OP_ParAppendResult::Success); 377 | } 378 | } 379 | 380 | void TensorFlowTOP::pulsePressed(const char* name) 381 | { 382 | } 383 | 384 | //const char* TensorFlowTOP::getErrorString() 385 | //{ 386 | // return error; 387 | //} -------------------------------------------------------------------------------- /TensorFlowTOP.h: -------------------------------------------------------------------------------- 1 | /* Shared Use License: This file is owned by Derivative Inc. (Derivative) and 2 | * can only be used, and/or modified for use, in conjunction with 3 | * Derivative's TouchDesigner software, and only if you are a licensee who has 4 | * accepted Derivative's TouchDesigner license or assignment agreement (which 5 | * also govern the use of this file). You may share a modified version of this 6 | * file with another authorized licensee of Derivative's TouchDesigner software. 7 | * Otherwise, no redistribution or sharing of this file, with or without 8 | * modification, is permitted. 9 | */ 10 | 11 | #include "TOP_CPlusPlusBase.h" 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "Names.h" 19 | #include "Shaders.h" 20 | 21 | #include "tensorflow/cc/ops/const_op.h" 22 | #include "tensorflow/cc/ops/image_ops.h" 23 | #include "tensorflow/cc/ops/standard_ops.h" 24 | #include "tensorflow/core/framework/graph.pb.h" 25 | #include "tensorflow/core/framework/tensor.h" 26 | #include "tensorflow/core/graph/default_device.h" 27 | #include "tensorflow/core/graph/graph_def_builder.h" 28 | #include "tensorflow/core/lib/core/errors.h" 29 | #include "tensorflow/core/lib/core/stringpiece.h" 30 | #include "tensorflow/core/lib/core/threadpool.h" 31 | #include "tensorflow/core/lib/io/path.h" 32 | #include "tensorflow/core/lib/strings/stringprintf.h" 33 | #include "tensorflow/core/platform/init_main.h" 34 | #include "tensorflow/core/platform/logging.h" 35 | #include "tensorflow/core/platform/types.h" 36 | #include "tensorflow/core/public/session.h" 37 | #include "tensorflow/core/util/command_line_flags.h" 38 | 39 | using tensorflow::Flag; 40 | using tensorflow::Tensor; 41 | using tensorflow::Status; 42 | using tensorflow::string; 43 | using tensorflow::int32; 44 | 45 | class TensorFlowTOP : public TOP_CPlusPlusBase 46 | { 47 | public: 48 | TensorFlowTOP(const OP_NodeInfo *info, TOP_Context *context); 49 | virtual ~TensorFlowTOP(); 50 | 51 | virtual void getGeneralInfo(TOP_GeneralInfo *) override; 52 | virtual bool getOutputFormat(TOP_OutputFormat*) override; 53 | virtual void execute(const TOP_OutputFormatSpecs*, OP_Inputs*, TOP_Context *context) override; 54 | virtual int32_t getNumInfoCHOPChans() override; 55 | virtual void getInfoCHOPChan(int32_t index, OP_InfoCHOPChan *chan) override; 56 | virtual bool getInfoDATSize(OP_InfoDATSize *infoSize) override; 57 | virtual void getInfoDATEntries(int32_t index, int32_t nEntries, OP_InfoDATEntries *entries) override; 58 | virtual void setupParameters(OP_ParameterManager *manager) override; 59 | virtual void pulsePressed(const char *name) override; 60 | //virtual const char* getErrorString() override; 61 | 62 | private: 63 | 64 | Status convertPixelsToTensor(std::vector* out_tensors, 65 | uint8_t* pixels, 66 | int pixels_width, 67 | int pixels_height, 68 | int pixels_channels, 69 | const int expected_height, 70 | const int expected_width, 71 | const int expected_channels = 3, 72 | const float expected_mean = 128, 73 | const float expected_standard_dev = 128); 74 | 75 | GLuint createGlslProgram(const std::string& vertSrc, const std::string& fragSrc); 76 | void loadModel(const std::string& path); 77 | void allocateFbo(); 78 | void allocateTextures(); 79 | 80 | std::unique_ptr session; 81 | GLuint program; 82 | GLuint vao; 83 | GLuint fbo; 84 | GLuint inputTexture; 85 | GLuint outputTexture; 86 | size_t inputWidth; 87 | size_t inputHeight; 88 | const char* error; 89 | bool runGraph; 90 | }; 91 | -------------------------------------------------------------------------------- /TensorFlowTOP.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TensorFlowTOP", "TensorFlowTOP.vcxproj", "{3F5BEECD-FA36-459F-91B8-BB481A67EF44}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {3F5BEECD-FA36-459F-91B8-BB481A67EF44}.Debug|x64.ActiveCfg = Debug|x64 17 | {3F5BEECD-FA36-459F-91B8-BB481A67EF44}.Debug|x64.Build.0 = Debug|x64 18 | {3F5BEECD-FA36-459F-91B8-BB481A67EF44}.Debug|x86.ActiveCfg = Debug|Win32 19 | {3F5BEECD-FA36-459F-91B8-BB481A67EF44}.Debug|x86.Build.0 = Debug|Win32 20 | {3F5BEECD-FA36-459F-91B8-BB481A67EF44}.Release|x64.ActiveCfg = Release|x64 21 | {3F5BEECD-FA36-459F-91B8-BB481A67EF44}.Release|x64.Build.0 = Release|x64 22 | {3F5BEECD-FA36-459F-91B8-BB481A67EF44}.Release|x86.ActiveCfg = Release|Win32 23 | {3F5BEECD-FA36-459F-91B8-BB481A67EF44}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /TensorFlowTOP.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Debug 10 | x64 11 | 12 | 13 | Release 14 | Win32 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | {3F5BEECD-FA36-459F-91B8-BB481A67EF44} 23 | CPlusPlusTOPExample 24 | Win32Proj 25 | TensorFlowTOP 26 | 8.1 27 | 28 | 29 | 30 | DynamicLibrary 31 | NotSet 32 | true 33 | v140 34 | 35 | 36 | DynamicLibrary 37 | NotSet 38 | true 39 | v140 40 | 41 | 42 | DynamicLibrary 43 | NotSet 44 | v140 45 | 46 | 47 | DynamicLibrary 48 | NotSet 49 | v140 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | <_ProjectFileVersion>10.0.40219.1 69 | $(SolutionDir)build\$(Configuration)\$(Platform)\ 70 | $(SolutionDir)build\$(Configuration)\$(Platform)\ 71 | $(SolutionDir)build\$(Configuration)\$(Platform)\ 72 | $(SolutionDir)build\$(Configuration)\$(Platform)\ 73 | false 74 | false 75 | $(SolutionDir)build\$(Configuration)\$(Platform)\ 76 | $(SolutionDir)build\$(Configuration)\$(Platform)\ 77 | $(SolutionDir)build\$(Configuration)\$(Platform)\ 78 | $(SolutionDir)build\$(Configuration)\$(Platform)\ 79 | false 80 | false 81 | 82 | 83 | 84 | Disabled 85 | WIN32;NDEBUG;_WINDOWS;_USRDLL;COMPILER_MSVC;PLATFORM_WINDOWS 86 | true 87 | EnableFastChecks 88 | MultiThreadedDebugDLL 89 | 90 | 91 | Level3 92 | ProgramDatabase 93 | $(SolutionDir);$(TENSORFLOW_BUILD);$(TENSORFLOW_BUILD)\..\..\..\..\;$(TENSORFLOW_BUILD)\external\zlib_archive;$(TENSORFLOW_BUILD)\external\gif_archive\giflib-5.1.4;$(TENSORFLOW_BUILD)\external\png_archive;$(TENSORFLOW_BUILD)\external\jpeg_archive;$(TENSORFLOW_BUILD)\external\lmdb;$(TENSORFLOW_BUILD)\external\eigen_archive;$(TENSORFLOW_BUILD)\..\..\..\..\third_party\eigen3;$(TENSORFLOW_BUILD)\gemmlowp\src\gemmlowp;$(TENSORFLOW_BUILD)\jsoncpp\src\jsoncpp;$(TENSORFLOW_BUILD)\external\farmhash_archive;$(TENSORFLOW_BUILD)\external\farmhash_archive\util;$(TENSORFLOW_BUILD)\external\highwayhash;$(TENSORFLOW_BUILD)\cub\src\cub;$(TENSORFLOW_BUILD)\external\nsync\public;$(TENSORFLOW_BUILD)\protobuf\src\protobuf\src;$(TENSORFLOW_BUILD)\re2\install\include;$(TENSORFLOW_BUILD)\external\sqlite;$(TENSORFLOW_BUILD)\grpc\src\grpc\include;$(TENSORFLOW_BUILD)\snappy\src\snappy 94 | 4267;4244;4800;4503;4554;4996;4348;4018;4099;4146;4267;4305;4307;4715;4722;4723;4838;4309;4334;4003;4244;4267;4503;4506;4800;4996 95 | 96 | 97 | OpenGL32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib;re2\src\re2\$(Configuration)\re2.lib;grpc\src\grpc\Release\grpc++_unsecure.lib;grpc\src\grpc\Release\grpc_unsecure.lib;grpc\src\grpc\Release\gpr.lib;zlib\install\lib\zlibstatic.lib;gif\install\lib\giflib.lib;png\install\lib\libpng12_static.lib;jpeg\install\lib\libjpeg.lib;lmdb\install\lib\lmdb.lib;jsoncpp\src\jsoncpp\src\lib_json\$(Configuration)\jsoncpp.lib;farmhash\install\lib\farmhash.lib;fft2d\\src\lib\fft2d.lib;highwayhash\install\lib\highwayhash.lib;nsync\install\lib\nsync.lib;snappy\src\snappy\Release\snappy.lib;protobuf\src\protobuf\Release\libprotobuf.lib;tf_cc.dir\Release\tf_cc.lib;tf_cc_ops.dir\Release\tf_cc_ops.lib;tf_cc_framework.dir\Release\tf_cc_framework.lib;tf_core_cpu.dir\Release\tf_core_cpu.lib;tf_core_direct_session.dir\Release\tf_core_direct_session.lib;tf_core_framework.dir\Release\tf_core_framework.lib;tf_core_kernels.dir\Release\tf_core_kernels.lib;tf_core_lib.dir\Release\tf_core_lib.lib;tf_core_ops.dir\Release\tf_core_ops.lib;tf_cc_while_loop.dir\Release\tf_cc_while_loop.lib;Release\tf_protos_cc.lib;sqlite\install\lib\sqlite.lib;%(AdditionalDependencies) 98 | true 99 | Windows 100 | MachineX86 101 | /machine:x64 /ignore:4049 /ignore:4197 /ignore:4217 /ignore:4221 102 | /WHOLEARCHIVE:tf_cc.lib 103 | /WHOLEARCHIVE:tf_cc_framework.lib 104 | /WHOLEARCHIVE:tf_cc_ops.lib 105 | /WHOLEARCHIVE:tf_core_cpu.lib 106 | /WHOLEARCHIVE:tf_core_direct_session.lib 107 | /WHOLEARCHIVE:tf_core_framework.lib 108 | /WHOLEARCHIVE:tf_core_kernels.lib 109 | /WHOLEARCHIVE:tf_core_lib.lib 110 | /WHOLEARCHIVE:tf_core_ops.lib 111 | /WHOLEARCHIVE:libjpeg.lib %(AdditionalOptions) 112 | $(TENSORFLOW_BUILD) 113 | 114 | 115 | 116 | 117 | Disabled 118 | WIN32;NDEBUG;_WINDOWS;_USRDLL;COMPILER_MSVC;PLATFORM_WINDOWS 119 | EnableFastChecks 120 | MultiThreadedDebugDLL 121 | 122 | 123 | Level3 124 | ProgramDatabase 125 | $(SolutionDir);$(TENSORFLOW_BUILD);$(TENSORFLOW_BUILD)\..\..\..\..\;$(TENSORFLOW_BUILD)\external\zlib_archive;$(TENSORFLOW_BUILD)\external\gif_archive\giflib-5.1.4;$(TENSORFLOW_BUILD)\external\png_archive;$(TENSORFLOW_BUILD)\external\jpeg_archive;$(TENSORFLOW_BUILD)\external\lmdb;$(TENSORFLOW_BUILD)\external\eigen_archive;$(TENSORFLOW_BUILD)\..\..\..\..\third_party\eigen3;$(TENSORFLOW_BUILD)\gemmlowp\src\gemmlowp;$(TENSORFLOW_BUILD)\jsoncpp\src\jsoncpp;$(TENSORFLOW_BUILD)\external\farmhash_archive;$(TENSORFLOW_BUILD)\external\farmhash_archive\util;$(TENSORFLOW_BUILD)\external\highwayhash;$(TENSORFLOW_BUILD)\cub\src\cub;$(TENSORFLOW_BUILD)\external\nsync\public;$(TENSORFLOW_BUILD)\protobuf\src\protobuf\src;$(TENSORFLOW_BUILD)\re2\install\include;$(TENSORFLOW_BUILD)\external\sqlite;$(TENSORFLOW_BUILD)\grpc\src\grpc\include;$(TENSORFLOW_BUILD)\snappy\src\snappy 126 | 4267;4244;4800;4503;4554;4996;4348;4018;4099;4146;4267;4305;4307;4715;4722;4723;4838;4309;4334;4003;4244;4267;4503;4506;4800;4996 127 | 128 | 129 | OpenGL32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib;re2\src\re2\$(Configuration)\re2.lib;grpc\src\grpc\Release\grpc++_unsecure.lib;grpc\src\grpc\Release\grpc_unsecure.lib;grpc\src\grpc\Release\gpr.lib;zlib\install\lib\zlibstatic.lib;gif\install\lib\giflib.lib;png\install\lib\libpng12_static.lib;jpeg\install\lib\libjpeg.lib;lmdb\install\lib\lmdb.lib;jsoncpp\src\jsoncpp\src\lib_json\$(Configuration)\jsoncpp.lib;farmhash\install\lib\farmhash.lib;fft2d\\src\lib\fft2d.lib;highwayhash\install\lib\highwayhash.lib;nsync\install\lib\nsync.lib;snappy\src\snappy\Release\snappy.lib;protobuf\src\protobuf\Release\libprotobuf.lib;tf_cc.dir\Release\tf_cc.lib;tf_cc_ops.dir\Release\tf_cc_ops.lib;tf_cc_framework.dir\Release\tf_cc_framework.lib;tf_core_cpu.dir\Release\tf_core_cpu.lib;tf_core_direct_session.dir\Release\tf_core_direct_session.lib;tf_core_framework.dir\Release\tf_core_framework.lib;tf_core_kernels.dir\Release\tf_core_kernels.lib;tf_core_lib.dir\Release\tf_core_lib.lib;tf_core_ops.dir\Release\tf_core_ops.lib;tf_cc_while_loop.dir\Release\tf_cc_while_loop.lib;Release\tf_protos_cc.lib;sqlite\install\lib\sqlite.lib;%(AdditionalDependencies) 130 | true 131 | Windows 132 | /machine:x64 /ignore:4049 /ignore:4197 /ignore:4217 /ignore:4221 133 | /WHOLEARCHIVE:tf_cc.lib 134 | /WHOLEARCHIVE:tf_cc_framework.lib 135 | /WHOLEARCHIVE:tf_cc_ops.lib 136 | /WHOLEARCHIVE:tf_core_cpu.lib 137 | /WHOLEARCHIVE:tf_core_direct_session.lib 138 | /WHOLEARCHIVE:tf_core_framework.lib 139 | /WHOLEARCHIVE:tf_core_kernels.lib 140 | /WHOLEARCHIVE:tf_core_lib.lib 141 | /WHOLEARCHIVE:tf_core_ops.lib 142 | /WHOLEARCHIVE:libjpeg.lib %(AdditionalOptions) 143 | $(TENSORFLOW_BUILD) 144 | 145 | 146 | 147 | 148 | WIN32;NDEBUG;_WINDOWS;_USRDLL;COMPILER_MSVC;PLATFORM_WINDOWS 149 | MultiThreadedDLL 150 | 151 | 152 | Level3 153 | ProgramDatabase 154 | $(SolutionDir);$(TENSORFLOW_BUILD);$(TENSORFLOW_BUILD)\..\..\..\..\;$(TENSORFLOW_BUILD)\external\zlib_archive;$(TENSORFLOW_BUILD)\external\gif_archive\giflib-5.1.4;$(TENSORFLOW_BUILD)\external\png_archive;$(TENSORFLOW_BUILD)\external\jpeg_archive;$(TENSORFLOW_BUILD)\external\lmdb;$(TENSORFLOW_BUILD)\external\eigen_archive;$(TENSORFLOW_BUILD)\..\..\..\..\third_party\eigen3;$(TENSORFLOW_BUILD)\gemmlowp\src\gemmlowp;$(TENSORFLOW_BUILD)\jsoncpp\src\jsoncpp;$(TENSORFLOW_BUILD)\external\farmhash_archive;$(TENSORFLOW_BUILD)\external\farmhash_archive\util;$(TENSORFLOW_BUILD)\external\highwayhash;$(TENSORFLOW_BUILD)\cub\src\cub;$(TENSORFLOW_BUILD)\external\nsync\public;$(TENSORFLOW_BUILD)\protobuf\src\protobuf\src;$(TENSORFLOW_BUILD)\re2\install\include;$(TENSORFLOW_BUILD)\external\sqlite;$(TENSORFLOW_BUILD)\grpc\src\grpc\include;$(TENSORFLOW_BUILD)\snappy\src\snappy 155 | 4267;4244;4800;4503;4554;4996;4348;4018;4099;4146;4267;4305;4307;4715;4722;4723;4838;4309;4334;4003;4244;4267;4503;4506;4800;4996 156 | 157 | 158 | OpenGL32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib;re2\src\re2\$(Configuration)\re2.lib;grpc\src\grpc\Release\grpc++_unsecure.lib;grpc\src\grpc\Release\grpc_unsecure.lib;grpc\src\grpc\Release\gpr.lib;zlib\install\lib\zlibstatic.lib;gif\install\lib\giflib.lib;png\install\lib\libpng12_static.lib;jpeg\install\lib\libjpeg.lib;lmdb\install\lib\lmdb.lib;jsoncpp\src\jsoncpp\src\lib_json\$(Configuration)\jsoncpp.lib;farmhash\install\lib\farmhash.lib;fft2d\\src\lib\fft2d.lib;highwayhash\install\lib\highwayhash.lib;nsync\install\lib\nsync.lib;snappy\src\snappy\Release\snappy.lib;protobuf\src\protobuf\Release\libprotobuf.lib;tf_cc.dir\Release\tf_cc.lib;tf_cc_ops.dir\Release\tf_cc_ops.lib;tf_cc_framework.dir\Release\tf_cc_framework.lib;tf_core_cpu.dir\Release\tf_core_cpu.lib;tf_core_direct_session.dir\Release\tf_core_direct_session.lib;tf_core_framework.dir\Release\tf_core_framework.lib;tf_core_kernels.dir\Release\tf_core_kernels.lib;tf_core_lib.dir\Release\tf_core_lib.lib;tf_core_ops.dir\Release\tf_core_ops.lib;tf_cc_while_loop.dir\Release\tf_cc_while_loop.lib;Release\tf_protos_cc.lib;sqlite\install\lib\sqlite.lib;%(AdditionalDependencies) 159 | true 160 | Windows 161 | true 162 | true 163 | MachineX86 164 | /machine:x64 /ignore:4049 /ignore:4197 /ignore:4217 /ignore:4221 165 | /WHOLEARCHIVE:tf_cc.lib 166 | /WHOLEARCHIVE:tf_cc_framework.lib 167 | /WHOLEARCHIVE:tf_cc_ops.lib 168 | /WHOLEARCHIVE:tf_core_cpu.lib 169 | /WHOLEARCHIVE:tf_core_direct_session.lib 170 | /WHOLEARCHIVE:tf_core_framework.lib 171 | /WHOLEARCHIVE:tf_core_kernels.lib 172 | /WHOLEARCHIVE:tf_core_lib.lib 173 | /WHOLEARCHIVE:tf_core_ops.lib 174 | /WHOLEARCHIVE:libjpeg.lib %(AdditionalOptions) 175 | $(TENSORFLOW_BUILD) 176 | 177 | 178 | 179 | 180 | WIN32;NDEBUG;_WINDOWS;_USRDLL;COMPILER_MSVC;PLATFORM_WINDOWS 181 | MultiThreadedDLL 182 | 183 | 184 | Level3 185 | ProgramDatabase 186 | $(SolutionDir);$(TENSORFLOW_BUILD);$(TENSORFLOW_BUILD)\..\..\..\..\;$(TENSORFLOW_BUILD)\external\zlib_archive;$(TENSORFLOW_BUILD)\external\gif_archive\giflib-5.1.4;$(TENSORFLOW_BUILD)\external\png_archive;$(TENSORFLOW_BUILD)\external\jpeg_archive;$(TENSORFLOW_BUILD)\external\lmdb;$(TENSORFLOW_BUILD)\external\eigen_archive;$(TENSORFLOW_BUILD)\..\..\..\..\third_party\eigen3;$(TENSORFLOW_BUILD)\gemmlowp\src\gemmlowp;$(TENSORFLOW_BUILD)\jsoncpp\src\jsoncpp;$(TENSORFLOW_BUILD)\external\farmhash_archive;$(TENSORFLOW_BUILD)\external\farmhash_archive\util;$(TENSORFLOW_BUILD)\external\highwayhash;$(TENSORFLOW_BUILD)\cub\src\cub;$(TENSORFLOW_BUILD)\external\nsync\public;$(TENSORFLOW_BUILD)\protobuf\src\protobuf\src;$(TENSORFLOW_BUILD)\re2\install\include;$(TENSORFLOW_BUILD)\external\sqlite;$(TENSORFLOW_BUILD)\grpc\src\grpc\include;$(TENSORFLOW_BUILD)\snappy\src\snappy 187 | 4267;4244;4800;4503;4554;4996;4348;4018;4099;4146;4267;4305;4307;4715;4722;4723;4838;4309;4334;4003;4244;4267;4503;4506;4800;4996 188 | 189 | 190 | OpenGL32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib;re2\src\re2\$(Configuration)\re2.lib;grpc\src\grpc\Release\grpc++_unsecure.lib;grpc\src\grpc\Release\grpc_unsecure.lib;grpc\src\grpc\Release\gpr.lib;zlib\install\lib\zlibstatic.lib;gif\install\lib\giflib.lib;png\install\lib\libpng12_static.lib;jpeg\install\lib\libjpeg.lib;lmdb\install\lib\lmdb.lib;jsoncpp\src\jsoncpp\src\lib_json\$(Configuration)\jsoncpp.lib;farmhash\install\lib\farmhash.lib;fft2d\\src\lib\fft2d.lib;highwayhash\install\lib\highwayhash.lib;nsync\install\lib\nsync.lib;snappy\src\snappy\Release\snappy.lib;protobuf\src\protobuf\Release\libprotobuf.lib;tf_cc.dir\Release\tf_cc.lib;tf_cc_ops.dir\Release\tf_cc_ops.lib;tf_cc_framework.dir\Release\tf_cc_framework.lib;tf_core_cpu.dir\Release\tf_core_cpu.lib;tf_core_direct_session.dir\Release\tf_core_direct_session.lib;tf_core_framework.dir\Release\tf_core_framework.lib;tf_core_kernels.dir\Release\tf_core_kernels.lib;tf_core_lib.dir\Release\tf_core_lib.lib;tf_core_ops.dir\Release\tf_core_ops.lib;tf_cc_while_loop.dir\Release\tf_cc_while_loop.lib;Release\tf_protos_cc.lib;sqlite\install\lib\sqlite.lib;%(AdditionalDependencies) 191 | true 192 | Windows 193 | true 194 | true 195 | /machine:x64 /ignore:4049 /ignore:4197 /ignore:4217 /ignore:4221 196 | /WHOLEARCHIVE:tf_cc.lib 197 | /WHOLEARCHIVE:tf_cc_framework.lib 198 | /WHOLEARCHIVE:tf_cc_ops.lib 199 | /WHOLEARCHIVE:tf_core_cpu.lib 200 | /WHOLEARCHIVE:tf_core_direct_session.lib 201 | /WHOLEARCHIVE:tf_core_framework.lib 202 | /WHOLEARCHIVE:tf_core_kernels.lib 203 | /WHOLEARCHIVE:tf_core_lib.lib 204 | /WHOLEARCHIVE:tf_core_ops.lib 205 | /WHOLEARCHIVE:libjpeg.lib %(AdditionalOptions) 206 | $(TENSORFLOW_BUILD) 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | -------------------------------------------------------------------------------- /gl/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The OpenGL Extension Wrangler Library 2 | Copyright (C) 2002-2007, Milan Ikits 3 | Copyright (C) 2002-2007, Marcelo E. Magallon 4 | Copyright (C) 2002, Lev Povalahev 5 | All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | 10 | * Redistributions of source code must retain the above copyright notice, 11 | this list of conditions and the following disclaimer. 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | * The name of the author may be used to endorse or promote products 16 | derived from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 22 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 28 | THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | 31 | Mesa 3-D graphics library 32 | Version: 7.0 33 | 34 | Copyright (C) 1999-2007 Brian Paul All Rights Reserved. 35 | 36 | Permission is hereby granted, free of charge, to any person obtaining a 37 | copy of this software and associated documentation files (the "Software"), 38 | to deal in the Software without restriction, including without limitation 39 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 40 | and/or sell copies of the Software, and to permit persons to whom the 41 | Software is furnished to do so, subject to the following conditions: 42 | 43 | The above copyright notice and this permission notice shall be included 44 | in all copies or substantial portions of the Software. 45 | 46 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 47 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 48 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 49 | BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 50 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 51 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 52 | 53 | 54 | Copyright (c) 2007 The Khronos Group Inc. 55 | 56 | Permission is hereby granted, free of charge, to any person obtaining a 57 | copy of this software and/or associated documentation files (the 58 | "Materials"), to deal in the Materials without restriction, including 59 | without limitation the rights to use, copy, modify, merge, publish, 60 | distribute, sublicense, and/or sell copies of the Materials, and to 61 | permit persons to whom the Materials are furnished to do so, subject to 62 | the following conditions: 63 | 64 | The above copyright notice and this permission notice shall be included 65 | in all copies or substantial portions of the Materials. 66 | 67 | THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 68 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 69 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 70 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 71 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 72 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 73 | MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. 74 | -------------------------------------------------------------------------------- /gl/wglew.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** The OpenGL Extension Wrangler Library 3 | ** Copyright (C) 2008-2015, Nigel Stewart 4 | ** Copyright (C) 2002-2008, Milan Ikits 5 | ** Copyright (C) 2002-2008, Marcelo E. Magallon 6 | ** Copyright (C) 2002, Lev Povalahev 7 | ** All rights reserved. 8 | ** 9 | ** Redistribution and use in source and binary forms, with or without 10 | ** modification, are permitted provided that the following conditions are met: 11 | ** 12 | ** * Redistributions of source code must retain the above copyright notice, 13 | ** this list of conditions and the following disclaimer. 14 | ** * Redistributions in binary form must reproduce the above copyright notice, 15 | ** this list of conditions and the following disclaimer in the documentation 16 | ** and/or other materials provided with the distribution. 17 | ** * The name of the author may be used to endorse or promote products 18 | ** derived from this software without specific prior written permission. 19 | ** 20 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | ** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | ** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | ** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 24 | ** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 | ** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 | ** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 | ** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 | ** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | ** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 | ** THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | /* 34 | ** Copyright (c) 2007 The Khronos Group Inc. 35 | ** 36 | ** Permission is hereby granted, free of charge, to any person obtaining a 37 | ** copy of this software and/or associated documentation files (the 38 | ** "Materials"), to deal in the Materials without restriction, including 39 | ** without limitation the rights to use, copy, modify, merge, publish, 40 | ** distribute, sublicense, and/or sell copies of the Materials, and to 41 | ** permit persons to whom the Materials are furnished to do so, subject to 42 | ** the following conditions: 43 | ** 44 | ** The above copyright notice and this permission notice shall be included 45 | ** in all copies or substantial portions of the Materials. 46 | ** 47 | ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 48 | ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 49 | ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 50 | ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 51 | ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 52 | ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 53 | ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. 54 | */ 55 | 56 | #ifndef __wglew_h__ 57 | #define __wglew_h__ 58 | #define __WGLEW_H__ 59 | 60 | #ifdef __wglext_h_ 61 | #error wglext.h included before wglew.h 62 | #endif 63 | 64 | #define __wglext_h_ 65 | 66 | #if !defined(WINAPI) 67 | # ifndef WIN32_LEAN_AND_MEAN 68 | # define WIN32_LEAN_AND_MEAN 1 69 | # endif 70 | #include 71 | # undef WIN32_LEAN_AND_MEAN 72 | #endif 73 | 74 | /* 75 | * GLEW_STATIC needs to be set when using the static version. 76 | * GLEW_BUILD is set when building the DLL version. 77 | */ 78 | #ifdef GLEW_STATIC 79 | # define GLEWAPI extern 80 | #else 81 | # ifdef GLEW_BUILD 82 | # define GLEWAPI extern __declspec(dllexport) 83 | # else 84 | # define GLEWAPI extern __declspec(dllimport) 85 | # endif 86 | #endif 87 | 88 | #ifdef __cplusplus 89 | extern "C" { 90 | #endif 91 | 92 | /* -------------------------- WGL_3DFX_multisample ------------------------- */ 93 | 94 | #ifndef WGL_3DFX_multisample 95 | #define WGL_3DFX_multisample 1 96 | 97 | #define WGL_SAMPLE_BUFFERS_3DFX 0x2060 98 | #define WGL_SAMPLES_3DFX 0x2061 99 | 100 | #define WGLEW_3DFX_multisample WGLEW_GET_VAR(__WGLEW_3DFX_multisample) 101 | 102 | #endif /* WGL_3DFX_multisample */ 103 | 104 | /* ------------------------- WGL_3DL_stereo_control ------------------------ */ 105 | 106 | #ifndef WGL_3DL_stereo_control 107 | #define WGL_3DL_stereo_control 1 108 | 109 | #define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055 110 | #define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056 111 | #define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057 112 | #define WGL_STEREO_POLARITY_INVERT_3DL 0x2058 113 | 114 | typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState); 115 | 116 | #define wglSetStereoEmitterState3DL WGLEW_GET_FUN(__wglewSetStereoEmitterState3DL) 117 | 118 | #define WGLEW_3DL_stereo_control WGLEW_GET_VAR(__WGLEW_3DL_stereo_control) 119 | 120 | #endif /* WGL_3DL_stereo_control */ 121 | 122 | /* ------------------------ WGL_AMD_gpu_association ------------------------ */ 123 | 124 | #ifndef WGL_AMD_gpu_association 125 | #define WGL_AMD_gpu_association 1 126 | 127 | #define WGL_GPU_VENDOR_AMD 0x1F00 128 | #define WGL_GPU_RENDERER_STRING_AMD 0x1F01 129 | #define WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02 130 | #define WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2 131 | #define WGL_GPU_RAM_AMD 0x21A3 132 | #define WGL_GPU_CLOCK_AMD 0x21A4 133 | #define WGL_GPU_NUM_PIPES_AMD 0x21A5 134 | #define WGL_GPU_NUM_SIMD_AMD 0x21A6 135 | #define WGL_GPU_NUM_RB_AMD 0x21A7 136 | #define WGL_GPU_NUM_SPI_AMD 0x21A8 137 | 138 | typedef VOID (WINAPI * PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC) (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); 139 | typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC) (UINT id); 140 | typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (UINT id, HGLRC hShareContext, const int* attribList); 141 | typedef BOOL (WINAPI * PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC) (HGLRC hglrc); 142 | typedef UINT (WINAPI * PFNWGLGETCONTEXTGPUIDAMDPROC) (HGLRC hglrc); 143 | typedef HGLRC (WINAPI * PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void); 144 | typedef UINT (WINAPI * PFNWGLGETGPUIDSAMDPROC) (UINT maxCount, UINT* ids); 145 | typedef INT (WINAPI * PFNWGLGETGPUINFOAMDPROC) (UINT id, INT property, GLenum dataType, UINT size, void* data); 146 | typedef BOOL (WINAPI * PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (HGLRC hglrc); 147 | 148 | #define wglBlitContextFramebufferAMD WGLEW_GET_FUN(__wglewBlitContextFramebufferAMD) 149 | #define wglCreateAssociatedContextAMD WGLEW_GET_FUN(__wglewCreateAssociatedContextAMD) 150 | #define wglCreateAssociatedContextAttribsAMD WGLEW_GET_FUN(__wglewCreateAssociatedContextAttribsAMD) 151 | #define wglDeleteAssociatedContextAMD WGLEW_GET_FUN(__wglewDeleteAssociatedContextAMD) 152 | #define wglGetContextGPUIDAMD WGLEW_GET_FUN(__wglewGetContextGPUIDAMD) 153 | #define wglGetCurrentAssociatedContextAMD WGLEW_GET_FUN(__wglewGetCurrentAssociatedContextAMD) 154 | #define wglGetGPUIDsAMD WGLEW_GET_FUN(__wglewGetGPUIDsAMD) 155 | #define wglGetGPUInfoAMD WGLEW_GET_FUN(__wglewGetGPUInfoAMD) 156 | #define wglMakeAssociatedContextCurrentAMD WGLEW_GET_FUN(__wglewMakeAssociatedContextCurrentAMD) 157 | 158 | #define WGLEW_AMD_gpu_association WGLEW_GET_VAR(__WGLEW_AMD_gpu_association) 159 | 160 | #endif /* WGL_AMD_gpu_association */ 161 | 162 | /* ------------------------- WGL_ARB_buffer_region ------------------------- */ 163 | 164 | #ifndef WGL_ARB_buffer_region 165 | #define WGL_ARB_buffer_region 1 166 | 167 | #define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001 168 | #define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002 169 | #define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004 170 | #define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008 171 | 172 | typedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType); 173 | typedef VOID (WINAPI * PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion); 174 | typedef BOOL (WINAPI * PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc); 175 | typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height); 176 | 177 | #define wglCreateBufferRegionARB WGLEW_GET_FUN(__wglewCreateBufferRegionARB) 178 | #define wglDeleteBufferRegionARB WGLEW_GET_FUN(__wglewDeleteBufferRegionARB) 179 | #define wglRestoreBufferRegionARB WGLEW_GET_FUN(__wglewRestoreBufferRegionARB) 180 | #define wglSaveBufferRegionARB WGLEW_GET_FUN(__wglewSaveBufferRegionARB) 181 | 182 | #define WGLEW_ARB_buffer_region WGLEW_GET_VAR(__WGLEW_ARB_buffer_region) 183 | 184 | #endif /* WGL_ARB_buffer_region */ 185 | 186 | /* --------------------- WGL_ARB_context_flush_control --------------------- */ 187 | 188 | #ifndef WGL_ARB_context_flush_control 189 | #define WGL_ARB_context_flush_control 1 190 | 191 | #define WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0x0000 192 | #define WGL_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097 193 | #define WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098 194 | 195 | #define WGLEW_ARB_context_flush_control WGLEW_GET_VAR(__WGLEW_ARB_context_flush_control) 196 | 197 | #endif /* WGL_ARB_context_flush_control */ 198 | 199 | /* ------------------------- WGL_ARB_create_context ------------------------ */ 200 | 201 | #ifndef WGL_ARB_create_context 202 | #define WGL_ARB_create_context 1 203 | 204 | #define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001 205 | #define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002 206 | #define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 207 | #define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 208 | #define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093 209 | #define WGL_CONTEXT_FLAGS_ARB 0x2094 210 | #define ERROR_INVALID_VERSION_ARB 0x2095 211 | #define ERROR_INVALID_PROFILE_ARB 0x2096 212 | 213 | typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int* attribList); 214 | 215 | #define wglCreateContextAttribsARB WGLEW_GET_FUN(__wglewCreateContextAttribsARB) 216 | 217 | #define WGLEW_ARB_create_context WGLEW_GET_VAR(__WGLEW_ARB_create_context) 218 | 219 | #endif /* WGL_ARB_create_context */ 220 | 221 | /* --------------------- WGL_ARB_create_context_profile -------------------- */ 222 | 223 | #ifndef WGL_ARB_create_context_profile 224 | #define WGL_ARB_create_context_profile 1 225 | 226 | #define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 227 | #define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 228 | #define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126 229 | 230 | #define WGLEW_ARB_create_context_profile WGLEW_GET_VAR(__WGLEW_ARB_create_context_profile) 231 | 232 | #endif /* WGL_ARB_create_context_profile */ 233 | 234 | /* ------------------- WGL_ARB_create_context_robustness ------------------- */ 235 | 236 | #ifndef WGL_ARB_create_context_robustness 237 | #define WGL_ARB_create_context_robustness 1 238 | 239 | #define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004 240 | #define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 241 | #define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 242 | #define WGL_NO_RESET_NOTIFICATION_ARB 0x8261 243 | 244 | #define WGLEW_ARB_create_context_robustness WGLEW_GET_VAR(__WGLEW_ARB_create_context_robustness) 245 | 246 | #endif /* WGL_ARB_create_context_robustness */ 247 | 248 | /* ----------------------- WGL_ARB_extensions_string ----------------------- */ 249 | 250 | #ifndef WGL_ARB_extensions_string 251 | #define WGL_ARB_extensions_string 1 252 | 253 | typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc); 254 | 255 | #define wglGetExtensionsStringARB WGLEW_GET_FUN(__wglewGetExtensionsStringARB) 256 | 257 | #define WGLEW_ARB_extensions_string WGLEW_GET_VAR(__WGLEW_ARB_extensions_string) 258 | 259 | #endif /* WGL_ARB_extensions_string */ 260 | 261 | /* ------------------------ WGL_ARB_framebuffer_sRGB ----------------------- */ 262 | 263 | #ifndef WGL_ARB_framebuffer_sRGB 264 | #define WGL_ARB_framebuffer_sRGB 1 265 | 266 | #define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9 267 | 268 | #define WGLEW_ARB_framebuffer_sRGB WGLEW_GET_VAR(__WGLEW_ARB_framebuffer_sRGB) 269 | 270 | #endif /* WGL_ARB_framebuffer_sRGB */ 271 | 272 | /* ----------------------- WGL_ARB_make_current_read ----------------------- */ 273 | 274 | #ifndef WGL_ARB_make_current_read 275 | #define WGL_ARB_make_current_read 1 276 | 277 | #define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043 278 | #define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054 279 | 280 | typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (VOID); 281 | typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); 282 | 283 | #define wglGetCurrentReadDCARB WGLEW_GET_FUN(__wglewGetCurrentReadDCARB) 284 | #define wglMakeContextCurrentARB WGLEW_GET_FUN(__wglewMakeContextCurrentARB) 285 | 286 | #define WGLEW_ARB_make_current_read WGLEW_GET_VAR(__WGLEW_ARB_make_current_read) 287 | 288 | #endif /* WGL_ARB_make_current_read */ 289 | 290 | /* -------------------------- WGL_ARB_multisample -------------------------- */ 291 | 292 | #ifndef WGL_ARB_multisample 293 | #define WGL_ARB_multisample 1 294 | 295 | #define WGL_SAMPLE_BUFFERS_ARB 0x2041 296 | #define WGL_SAMPLES_ARB 0x2042 297 | 298 | #define WGLEW_ARB_multisample WGLEW_GET_VAR(__WGLEW_ARB_multisample) 299 | 300 | #endif /* WGL_ARB_multisample */ 301 | 302 | /* ---------------------------- WGL_ARB_pbuffer ---------------------------- */ 303 | 304 | #ifndef WGL_ARB_pbuffer 305 | #define WGL_ARB_pbuffer 1 306 | 307 | #define WGL_DRAW_TO_PBUFFER_ARB 0x202D 308 | #define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E 309 | #define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F 310 | #define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030 311 | #define WGL_PBUFFER_LARGEST_ARB 0x2033 312 | #define WGL_PBUFFER_WIDTH_ARB 0x2034 313 | #define WGL_PBUFFER_HEIGHT_ARB 0x2035 314 | #define WGL_PBUFFER_LOST_ARB 0x2036 315 | 316 | DECLARE_HANDLE(HPBUFFERARB); 317 | 318 | typedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int* piAttribList); 319 | typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer); 320 | typedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer); 321 | typedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int* piValue); 322 | typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC); 323 | 324 | #define wglCreatePbufferARB WGLEW_GET_FUN(__wglewCreatePbufferARB) 325 | #define wglDestroyPbufferARB WGLEW_GET_FUN(__wglewDestroyPbufferARB) 326 | #define wglGetPbufferDCARB WGLEW_GET_FUN(__wglewGetPbufferDCARB) 327 | #define wglQueryPbufferARB WGLEW_GET_FUN(__wglewQueryPbufferARB) 328 | #define wglReleasePbufferDCARB WGLEW_GET_FUN(__wglewReleasePbufferDCARB) 329 | 330 | #define WGLEW_ARB_pbuffer WGLEW_GET_VAR(__WGLEW_ARB_pbuffer) 331 | 332 | #endif /* WGL_ARB_pbuffer */ 333 | 334 | /* -------------------------- WGL_ARB_pixel_format ------------------------- */ 335 | 336 | #ifndef WGL_ARB_pixel_format 337 | #define WGL_ARB_pixel_format 1 338 | 339 | #define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 340 | #define WGL_DRAW_TO_WINDOW_ARB 0x2001 341 | #define WGL_DRAW_TO_BITMAP_ARB 0x2002 342 | #define WGL_ACCELERATION_ARB 0x2003 343 | #define WGL_NEED_PALETTE_ARB 0x2004 344 | #define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005 345 | #define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006 346 | #define WGL_SWAP_METHOD_ARB 0x2007 347 | #define WGL_NUMBER_OVERLAYS_ARB 0x2008 348 | #define WGL_NUMBER_UNDERLAYS_ARB 0x2009 349 | #define WGL_TRANSPARENT_ARB 0x200A 350 | #define WGL_SHARE_DEPTH_ARB 0x200C 351 | #define WGL_SHARE_STENCIL_ARB 0x200D 352 | #define WGL_SHARE_ACCUM_ARB 0x200E 353 | #define WGL_SUPPORT_GDI_ARB 0x200F 354 | #define WGL_SUPPORT_OPENGL_ARB 0x2010 355 | #define WGL_DOUBLE_BUFFER_ARB 0x2011 356 | #define WGL_STEREO_ARB 0x2012 357 | #define WGL_PIXEL_TYPE_ARB 0x2013 358 | #define WGL_COLOR_BITS_ARB 0x2014 359 | #define WGL_RED_BITS_ARB 0x2015 360 | #define WGL_RED_SHIFT_ARB 0x2016 361 | #define WGL_GREEN_BITS_ARB 0x2017 362 | #define WGL_GREEN_SHIFT_ARB 0x2018 363 | #define WGL_BLUE_BITS_ARB 0x2019 364 | #define WGL_BLUE_SHIFT_ARB 0x201A 365 | #define WGL_ALPHA_BITS_ARB 0x201B 366 | #define WGL_ALPHA_SHIFT_ARB 0x201C 367 | #define WGL_ACCUM_BITS_ARB 0x201D 368 | #define WGL_ACCUM_RED_BITS_ARB 0x201E 369 | #define WGL_ACCUM_GREEN_BITS_ARB 0x201F 370 | #define WGL_ACCUM_BLUE_BITS_ARB 0x2020 371 | #define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 372 | #define WGL_DEPTH_BITS_ARB 0x2022 373 | #define WGL_STENCIL_BITS_ARB 0x2023 374 | #define WGL_AUX_BUFFERS_ARB 0x2024 375 | #define WGL_NO_ACCELERATION_ARB 0x2025 376 | #define WGL_GENERIC_ACCELERATION_ARB 0x2026 377 | #define WGL_FULL_ACCELERATION_ARB 0x2027 378 | #define WGL_SWAP_EXCHANGE_ARB 0x2028 379 | #define WGL_SWAP_COPY_ARB 0x2029 380 | #define WGL_SWAP_UNDEFINED_ARB 0x202A 381 | #define WGL_TYPE_RGBA_ARB 0x202B 382 | #define WGL_TYPE_COLORINDEX_ARB 0x202C 383 | #define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037 384 | #define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038 385 | #define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039 386 | #define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A 387 | #define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B 388 | 389 | typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int* piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); 390 | typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int* piAttributes, FLOAT *pfValues); 391 | typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int* piAttributes, int *piValues); 392 | 393 | #define wglChoosePixelFormatARB WGLEW_GET_FUN(__wglewChoosePixelFormatARB) 394 | #define wglGetPixelFormatAttribfvARB WGLEW_GET_FUN(__wglewGetPixelFormatAttribfvARB) 395 | #define wglGetPixelFormatAttribivARB WGLEW_GET_FUN(__wglewGetPixelFormatAttribivARB) 396 | 397 | #define WGLEW_ARB_pixel_format WGLEW_GET_VAR(__WGLEW_ARB_pixel_format) 398 | 399 | #endif /* WGL_ARB_pixel_format */ 400 | 401 | /* ----------------------- WGL_ARB_pixel_format_float ---------------------- */ 402 | 403 | #ifndef WGL_ARB_pixel_format_float 404 | #define WGL_ARB_pixel_format_float 1 405 | 406 | #define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0 407 | 408 | #define WGLEW_ARB_pixel_format_float WGLEW_GET_VAR(__WGLEW_ARB_pixel_format_float) 409 | 410 | #endif /* WGL_ARB_pixel_format_float */ 411 | 412 | /* ------------------------- WGL_ARB_render_texture ------------------------ */ 413 | 414 | #ifndef WGL_ARB_render_texture 415 | #define WGL_ARB_render_texture 1 416 | 417 | #define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070 418 | #define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071 419 | #define WGL_TEXTURE_FORMAT_ARB 0x2072 420 | #define WGL_TEXTURE_TARGET_ARB 0x2073 421 | #define WGL_MIPMAP_TEXTURE_ARB 0x2074 422 | #define WGL_TEXTURE_RGB_ARB 0x2075 423 | #define WGL_TEXTURE_RGBA_ARB 0x2076 424 | #define WGL_NO_TEXTURE_ARB 0x2077 425 | #define WGL_TEXTURE_CUBE_MAP_ARB 0x2078 426 | #define WGL_TEXTURE_1D_ARB 0x2079 427 | #define WGL_TEXTURE_2D_ARB 0x207A 428 | #define WGL_MIPMAP_LEVEL_ARB 0x207B 429 | #define WGL_CUBE_MAP_FACE_ARB 0x207C 430 | #define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D 431 | #define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E 432 | #define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F 433 | #define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080 434 | #define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081 435 | #define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082 436 | #define WGL_FRONT_LEFT_ARB 0x2083 437 | #define WGL_FRONT_RIGHT_ARB 0x2084 438 | #define WGL_BACK_LEFT_ARB 0x2085 439 | #define WGL_BACK_RIGHT_ARB 0x2086 440 | #define WGL_AUX0_ARB 0x2087 441 | #define WGL_AUX1_ARB 0x2088 442 | #define WGL_AUX2_ARB 0x2089 443 | #define WGL_AUX3_ARB 0x208A 444 | #define WGL_AUX4_ARB 0x208B 445 | #define WGL_AUX5_ARB 0x208C 446 | #define WGL_AUX6_ARB 0x208D 447 | #define WGL_AUX7_ARB 0x208E 448 | #define WGL_AUX8_ARB 0x208F 449 | #define WGL_AUX9_ARB 0x2090 450 | 451 | typedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); 452 | typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); 453 | typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int* piAttribList); 454 | 455 | #define wglBindTexImageARB WGLEW_GET_FUN(__wglewBindTexImageARB) 456 | #define wglReleaseTexImageARB WGLEW_GET_FUN(__wglewReleaseTexImageARB) 457 | #define wglSetPbufferAttribARB WGLEW_GET_FUN(__wglewSetPbufferAttribARB) 458 | 459 | #define WGLEW_ARB_render_texture WGLEW_GET_VAR(__WGLEW_ARB_render_texture) 460 | 461 | #endif /* WGL_ARB_render_texture */ 462 | 463 | /* ---------------- WGL_ARB_robustness_application_isolation --------------- */ 464 | 465 | #ifndef WGL_ARB_robustness_application_isolation 466 | #define WGL_ARB_robustness_application_isolation 1 467 | 468 | #define WGL_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008 469 | 470 | #define WGLEW_ARB_robustness_application_isolation WGLEW_GET_VAR(__WGLEW_ARB_robustness_application_isolation) 471 | 472 | #endif /* WGL_ARB_robustness_application_isolation */ 473 | 474 | /* ---------------- WGL_ARB_robustness_share_group_isolation --------------- */ 475 | 476 | #ifndef WGL_ARB_robustness_share_group_isolation 477 | #define WGL_ARB_robustness_share_group_isolation 1 478 | 479 | #define WGL_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008 480 | 481 | #define WGLEW_ARB_robustness_share_group_isolation WGLEW_GET_VAR(__WGLEW_ARB_robustness_share_group_isolation) 482 | 483 | #endif /* WGL_ARB_robustness_share_group_isolation */ 484 | 485 | /* ----------------------- WGL_ATI_pixel_format_float ---------------------- */ 486 | 487 | #ifndef WGL_ATI_pixel_format_float 488 | #define WGL_ATI_pixel_format_float 1 489 | 490 | #define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0 491 | #define GL_RGBA_FLOAT_MODE_ATI 0x8820 492 | #define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835 493 | 494 | #define WGLEW_ATI_pixel_format_float WGLEW_GET_VAR(__WGLEW_ATI_pixel_format_float) 495 | 496 | #endif /* WGL_ATI_pixel_format_float */ 497 | 498 | /* -------------------- WGL_ATI_render_texture_rectangle ------------------- */ 499 | 500 | #ifndef WGL_ATI_render_texture_rectangle 501 | #define WGL_ATI_render_texture_rectangle 1 502 | 503 | #define WGL_TEXTURE_RECTANGLE_ATI 0x21A5 504 | 505 | #define WGLEW_ATI_render_texture_rectangle WGLEW_GET_VAR(__WGLEW_ATI_render_texture_rectangle) 506 | 507 | #endif /* WGL_ATI_render_texture_rectangle */ 508 | 509 | /* ------------------- WGL_EXT_create_context_es2_profile ------------------ */ 510 | 511 | #ifndef WGL_EXT_create_context_es2_profile 512 | #define WGL_EXT_create_context_es2_profile 1 513 | 514 | #define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004 515 | 516 | #define WGLEW_EXT_create_context_es2_profile WGLEW_GET_VAR(__WGLEW_EXT_create_context_es2_profile) 517 | 518 | #endif /* WGL_EXT_create_context_es2_profile */ 519 | 520 | /* ------------------- WGL_EXT_create_context_es_profile ------------------- */ 521 | 522 | #ifndef WGL_EXT_create_context_es_profile 523 | #define WGL_EXT_create_context_es_profile 1 524 | 525 | #define WGL_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004 526 | 527 | #define WGLEW_EXT_create_context_es_profile WGLEW_GET_VAR(__WGLEW_EXT_create_context_es_profile) 528 | 529 | #endif /* WGL_EXT_create_context_es_profile */ 530 | 531 | /* -------------------------- WGL_EXT_depth_float -------------------------- */ 532 | 533 | #ifndef WGL_EXT_depth_float 534 | #define WGL_EXT_depth_float 1 535 | 536 | #define WGL_DEPTH_FLOAT_EXT 0x2040 537 | 538 | #define WGLEW_EXT_depth_float WGLEW_GET_VAR(__WGLEW_EXT_depth_float) 539 | 540 | #endif /* WGL_EXT_depth_float */ 541 | 542 | /* ---------------------- WGL_EXT_display_color_table ---------------------- */ 543 | 544 | #ifndef WGL_EXT_display_color_table 545 | #define WGL_EXT_display_color_table 1 546 | 547 | typedef GLboolean (WINAPI * PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id); 548 | typedef GLboolean (WINAPI * PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id); 549 | typedef void (WINAPI * PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id); 550 | typedef GLboolean (WINAPI * PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (GLushort* table, GLuint length); 551 | 552 | #define wglBindDisplayColorTableEXT WGLEW_GET_FUN(__wglewBindDisplayColorTableEXT) 553 | #define wglCreateDisplayColorTableEXT WGLEW_GET_FUN(__wglewCreateDisplayColorTableEXT) 554 | #define wglDestroyDisplayColorTableEXT WGLEW_GET_FUN(__wglewDestroyDisplayColorTableEXT) 555 | #define wglLoadDisplayColorTableEXT WGLEW_GET_FUN(__wglewLoadDisplayColorTableEXT) 556 | 557 | #define WGLEW_EXT_display_color_table WGLEW_GET_VAR(__WGLEW_EXT_display_color_table) 558 | 559 | #endif /* WGL_EXT_display_color_table */ 560 | 561 | /* ----------------------- WGL_EXT_extensions_string ----------------------- */ 562 | 563 | #ifndef WGL_EXT_extensions_string 564 | #define WGL_EXT_extensions_string 1 565 | 566 | typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void); 567 | 568 | #define wglGetExtensionsStringEXT WGLEW_GET_FUN(__wglewGetExtensionsStringEXT) 569 | 570 | #define WGLEW_EXT_extensions_string WGLEW_GET_VAR(__WGLEW_EXT_extensions_string) 571 | 572 | #endif /* WGL_EXT_extensions_string */ 573 | 574 | /* ------------------------ WGL_EXT_framebuffer_sRGB ----------------------- */ 575 | 576 | #ifndef WGL_EXT_framebuffer_sRGB 577 | #define WGL_EXT_framebuffer_sRGB 1 578 | 579 | #define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9 580 | 581 | #define WGLEW_EXT_framebuffer_sRGB WGLEW_GET_VAR(__WGLEW_EXT_framebuffer_sRGB) 582 | 583 | #endif /* WGL_EXT_framebuffer_sRGB */ 584 | 585 | /* ----------------------- WGL_EXT_make_current_read ----------------------- */ 586 | 587 | #ifndef WGL_EXT_make_current_read 588 | #define WGL_EXT_make_current_read 1 589 | 590 | #define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043 591 | 592 | typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (VOID); 593 | typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); 594 | 595 | #define wglGetCurrentReadDCEXT WGLEW_GET_FUN(__wglewGetCurrentReadDCEXT) 596 | #define wglMakeContextCurrentEXT WGLEW_GET_FUN(__wglewMakeContextCurrentEXT) 597 | 598 | #define WGLEW_EXT_make_current_read WGLEW_GET_VAR(__WGLEW_EXT_make_current_read) 599 | 600 | #endif /* WGL_EXT_make_current_read */ 601 | 602 | /* -------------------------- WGL_EXT_multisample -------------------------- */ 603 | 604 | #ifndef WGL_EXT_multisample 605 | #define WGL_EXT_multisample 1 606 | 607 | #define WGL_SAMPLE_BUFFERS_EXT 0x2041 608 | #define WGL_SAMPLES_EXT 0x2042 609 | 610 | #define WGLEW_EXT_multisample WGLEW_GET_VAR(__WGLEW_EXT_multisample) 611 | 612 | #endif /* WGL_EXT_multisample */ 613 | 614 | /* ---------------------------- WGL_EXT_pbuffer ---------------------------- */ 615 | 616 | #ifndef WGL_EXT_pbuffer 617 | #define WGL_EXT_pbuffer 1 618 | 619 | #define WGL_DRAW_TO_PBUFFER_EXT 0x202D 620 | #define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E 621 | #define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F 622 | #define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030 623 | #define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031 624 | #define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032 625 | #define WGL_PBUFFER_LARGEST_EXT 0x2033 626 | #define WGL_PBUFFER_WIDTH_EXT 0x2034 627 | #define WGL_PBUFFER_HEIGHT_EXT 0x2035 628 | 629 | DECLARE_HANDLE(HPBUFFEREXT); 630 | 631 | typedef HPBUFFEREXT (WINAPI * PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int* piAttribList); 632 | typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer); 633 | typedef HDC (WINAPI * PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer); 634 | typedef BOOL (WINAPI * PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int* piValue); 635 | typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC); 636 | 637 | #define wglCreatePbufferEXT WGLEW_GET_FUN(__wglewCreatePbufferEXT) 638 | #define wglDestroyPbufferEXT WGLEW_GET_FUN(__wglewDestroyPbufferEXT) 639 | #define wglGetPbufferDCEXT WGLEW_GET_FUN(__wglewGetPbufferDCEXT) 640 | #define wglQueryPbufferEXT WGLEW_GET_FUN(__wglewQueryPbufferEXT) 641 | #define wglReleasePbufferDCEXT WGLEW_GET_FUN(__wglewReleasePbufferDCEXT) 642 | 643 | #define WGLEW_EXT_pbuffer WGLEW_GET_VAR(__WGLEW_EXT_pbuffer) 644 | 645 | #endif /* WGL_EXT_pbuffer */ 646 | 647 | /* -------------------------- WGL_EXT_pixel_format ------------------------- */ 648 | 649 | #ifndef WGL_EXT_pixel_format 650 | #define WGL_EXT_pixel_format 1 651 | 652 | #define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000 653 | #define WGL_DRAW_TO_WINDOW_EXT 0x2001 654 | #define WGL_DRAW_TO_BITMAP_EXT 0x2002 655 | #define WGL_ACCELERATION_EXT 0x2003 656 | #define WGL_NEED_PALETTE_EXT 0x2004 657 | #define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005 658 | #define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006 659 | #define WGL_SWAP_METHOD_EXT 0x2007 660 | #define WGL_NUMBER_OVERLAYS_EXT 0x2008 661 | #define WGL_NUMBER_UNDERLAYS_EXT 0x2009 662 | #define WGL_TRANSPARENT_EXT 0x200A 663 | #define WGL_TRANSPARENT_VALUE_EXT 0x200B 664 | #define WGL_SHARE_DEPTH_EXT 0x200C 665 | #define WGL_SHARE_STENCIL_EXT 0x200D 666 | #define WGL_SHARE_ACCUM_EXT 0x200E 667 | #define WGL_SUPPORT_GDI_EXT 0x200F 668 | #define WGL_SUPPORT_OPENGL_EXT 0x2010 669 | #define WGL_DOUBLE_BUFFER_EXT 0x2011 670 | #define WGL_STEREO_EXT 0x2012 671 | #define WGL_PIXEL_TYPE_EXT 0x2013 672 | #define WGL_COLOR_BITS_EXT 0x2014 673 | #define WGL_RED_BITS_EXT 0x2015 674 | #define WGL_RED_SHIFT_EXT 0x2016 675 | #define WGL_GREEN_BITS_EXT 0x2017 676 | #define WGL_GREEN_SHIFT_EXT 0x2018 677 | #define WGL_BLUE_BITS_EXT 0x2019 678 | #define WGL_BLUE_SHIFT_EXT 0x201A 679 | #define WGL_ALPHA_BITS_EXT 0x201B 680 | #define WGL_ALPHA_SHIFT_EXT 0x201C 681 | #define WGL_ACCUM_BITS_EXT 0x201D 682 | #define WGL_ACCUM_RED_BITS_EXT 0x201E 683 | #define WGL_ACCUM_GREEN_BITS_EXT 0x201F 684 | #define WGL_ACCUM_BLUE_BITS_EXT 0x2020 685 | #define WGL_ACCUM_ALPHA_BITS_EXT 0x2021 686 | #define WGL_DEPTH_BITS_EXT 0x2022 687 | #define WGL_STENCIL_BITS_EXT 0x2023 688 | #define WGL_AUX_BUFFERS_EXT 0x2024 689 | #define WGL_NO_ACCELERATION_EXT 0x2025 690 | #define WGL_GENERIC_ACCELERATION_EXT 0x2026 691 | #define WGL_FULL_ACCELERATION_EXT 0x2027 692 | #define WGL_SWAP_EXCHANGE_EXT 0x2028 693 | #define WGL_SWAP_COPY_EXT 0x2029 694 | #define WGL_SWAP_UNDEFINED_EXT 0x202A 695 | #define WGL_TYPE_RGBA_EXT 0x202B 696 | #define WGL_TYPE_COLORINDEX_EXT 0x202C 697 | 698 | typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int* piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); 699 | typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int* piAttributes, FLOAT *pfValues); 700 | typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int* piAttributes, int *piValues); 701 | 702 | #define wglChoosePixelFormatEXT WGLEW_GET_FUN(__wglewChoosePixelFormatEXT) 703 | #define wglGetPixelFormatAttribfvEXT WGLEW_GET_FUN(__wglewGetPixelFormatAttribfvEXT) 704 | #define wglGetPixelFormatAttribivEXT WGLEW_GET_FUN(__wglewGetPixelFormatAttribivEXT) 705 | 706 | #define WGLEW_EXT_pixel_format WGLEW_GET_VAR(__WGLEW_EXT_pixel_format) 707 | 708 | #endif /* WGL_EXT_pixel_format */ 709 | 710 | /* ------------------- WGL_EXT_pixel_format_packed_float ------------------- */ 711 | 712 | #ifndef WGL_EXT_pixel_format_packed_float 713 | #define WGL_EXT_pixel_format_packed_float 1 714 | 715 | #define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8 716 | 717 | #define WGLEW_EXT_pixel_format_packed_float WGLEW_GET_VAR(__WGLEW_EXT_pixel_format_packed_float) 718 | 719 | #endif /* WGL_EXT_pixel_format_packed_float */ 720 | 721 | /* -------------------------- WGL_EXT_swap_control ------------------------- */ 722 | 723 | #ifndef WGL_EXT_swap_control 724 | #define WGL_EXT_swap_control 1 725 | 726 | typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void); 727 | typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval); 728 | 729 | #define wglGetSwapIntervalEXT WGLEW_GET_FUN(__wglewGetSwapIntervalEXT) 730 | #define wglSwapIntervalEXT WGLEW_GET_FUN(__wglewSwapIntervalEXT) 731 | 732 | #define WGLEW_EXT_swap_control WGLEW_GET_VAR(__WGLEW_EXT_swap_control) 733 | 734 | #endif /* WGL_EXT_swap_control */ 735 | 736 | /* ----------------------- WGL_EXT_swap_control_tear ----------------------- */ 737 | 738 | #ifndef WGL_EXT_swap_control_tear 739 | #define WGL_EXT_swap_control_tear 1 740 | 741 | #define WGLEW_EXT_swap_control_tear WGLEW_GET_VAR(__WGLEW_EXT_swap_control_tear) 742 | 743 | #endif /* WGL_EXT_swap_control_tear */ 744 | 745 | /* --------------------- WGL_I3D_digital_video_control --------------------- */ 746 | 747 | #ifndef WGL_I3D_digital_video_control 748 | #define WGL_I3D_digital_video_control 1 749 | 750 | #define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050 751 | #define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051 752 | #define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052 753 | #define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053 754 | 755 | typedef BOOL (WINAPI * PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int* piValue); 756 | typedef BOOL (WINAPI * PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int* piValue); 757 | 758 | #define wglGetDigitalVideoParametersI3D WGLEW_GET_FUN(__wglewGetDigitalVideoParametersI3D) 759 | #define wglSetDigitalVideoParametersI3D WGLEW_GET_FUN(__wglewSetDigitalVideoParametersI3D) 760 | 761 | #define WGLEW_I3D_digital_video_control WGLEW_GET_VAR(__WGLEW_I3D_digital_video_control) 762 | 763 | #endif /* WGL_I3D_digital_video_control */ 764 | 765 | /* ----------------------------- WGL_I3D_gamma ----------------------------- */ 766 | 767 | #ifndef WGL_I3D_gamma 768 | #define WGL_I3D_gamma 1 769 | 770 | #define WGL_GAMMA_TABLE_SIZE_I3D 0x204E 771 | #define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F 772 | 773 | typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, USHORT* puRed, USHORT *puGreen, USHORT *puBlue); 774 | typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int* piValue); 775 | typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, const USHORT* puRed, const USHORT *puGreen, const USHORT *puBlue); 776 | typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int* piValue); 777 | 778 | #define wglGetGammaTableI3D WGLEW_GET_FUN(__wglewGetGammaTableI3D) 779 | #define wglGetGammaTableParametersI3D WGLEW_GET_FUN(__wglewGetGammaTableParametersI3D) 780 | #define wglSetGammaTableI3D WGLEW_GET_FUN(__wglewSetGammaTableI3D) 781 | #define wglSetGammaTableParametersI3D WGLEW_GET_FUN(__wglewSetGammaTableParametersI3D) 782 | 783 | #define WGLEW_I3D_gamma WGLEW_GET_VAR(__WGLEW_I3D_gamma) 784 | 785 | #endif /* WGL_I3D_gamma */ 786 | 787 | /* ---------------------------- WGL_I3D_genlock ---------------------------- */ 788 | 789 | #ifndef WGL_I3D_genlock 790 | #define WGL_I3D_genlock 1 791 | 792 | #define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044 793 | #define WGL_GENLOCK_SOURCE_EXTERNAL_SYNC_I3D 0x2045 794 | #define WGL_GENLOCK_SOURCE_EXTERNAL_FIELD_I3D 0x2046 795 | #define WGL_GENLOCK_SOURCE_EXTERNAL_TTL_I3D 0x2047 796 | #define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048 797 | #define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049 798 | #define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A 799 | #define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B 800 | #define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C 801 | 802 | typedef BOOL (WINAPI * PFNWGLDISABLEGENLOCKI3DPROC) (HDC hDC); 803 | typedef BOOL (WINAPI * PFNWGLENABLEGENLOCKI3DPROC) (HDC hDC); 804 | typedef BOOL (WINAPI * PFNWGLGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT uRate); 805 | typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT uDelay); 806 | typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT uEdge); 807 | typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEI3DPROC) (HDC hDC, UINT uSource); 808 | typedef BOOL (WINAPI * PFNWGLGETGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT* uRate); 809 | typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT* uDelay); 810 | typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT* uEdge); 811 | typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEI3DPROC) (HDC hDC, UINT* uSource); 812 | typedef BOOL (WINAPI * PFNWGLISENABLEDGENLOCKI3DPROC) (HDC hDC, BOOL* pFlag); 813 | typedef BOOL (WINAPI * PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC) (HDC hDC, UINT* uMaxLineDelay, UINT *uMaxPixelDelay); 814 | 815 | #define wglDisableGenlockI3D WGLEW_GET_FUN(__wglewDisableGenlockI3D) 816 | #define wglEnableGenlockI3D WGLEW_GET_FUN(__wglewEnableGenlockI3D) 817 | #define wglGenlockSampleRateI3D WGLEW_GET_FUN(__wglewGenlockSampleRateI3D) 818 | #define wglGenlockSourceDelayI3D WGLEW_GET_FUN(__wglewGenlockSourceDelayI3D) 819 | #define wglGenlockSourceEdgeI3D WGLEW_GET_FUN(__wglewGenlockSourceEdgeI3D) 820 | #define wglGenlockSourceI3D WGLEW_GET_FUN(__wglewGenlockSourceI3D) 821 | #define wglGetGenlockSampleRateI3D WGLEW_GET_FUN(__wglewGetGenlockSampleRateI3D) 822 | #define wglGetGenlockSourceDelayI3D WGLEW_GET_FUN(__wglewGetGenlockSourceDelayI3D) 823 | #define wglGetGenlockSourceEdgeI3D WGLEW_GET_FUN(__wglewGetGenlockSourceEdgeI3D) 824 | #define wglGetGenlockSourceI3D WGLEW_GET_FUN(__wglewGetGenlockSourceI3D) 825 | #define wglIsEnabledGenlockI3D WGLEW_GET_FUN(__wglewIsEnabledGenlockI3D) 826 | #define wglQueryGenlockMaxSourceDelayI3D WGLEW_GET_FUN(__wglewQueryGenlockMaxSourceDelayI3D) 827 | 828 | #define WGLEW_I3D_genlock WGLEW_GET_VAR(__WGLEW_I3D_genlock) 829 | 830 | #endif /* WGL_I3D_genlock */ 831 | 832 | /* -------------------------- WGL_I3D_image_buffer ------------------------- */ 833 | 834 | #ifndef WGL_I3D_image_buffer 835 | #define WGL_I3D_image_buffer 1 836 | 837 | #define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001 838 | #define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002 839 | 840 | typedef BOOL (WINAPI * PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC) (HDC hdc, HANDLE* pEvent, LPVOID *pAddress, DWORD *pSize, UINT count); 841 | typedef LPVOID (WINAPI * PFNWGLCREATEIMAGEBUFFERI3DPROC) (HDC hDC, DWORD dwSize, UINT uFlags); 842 | typedef BOOL (WINAPI * PFNWGLDESTROYIMAGEBUFFERI3DPROC) (HDC hDC, LPVOID pAddress); 843 | typedef BOOL (WINAPI * PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC) (HDC hdc, LPVOID* pAddress, UINT count); 844 | 845 | #define wglAssociateImageBufferEventsI3D WGLEW_GET_FUN(__wglewAssociateImageBufferEventsI3D) 846 | #define wglCreateImageBufferI3D WGLEW_GET_FUN(__wglewCreateImageBufferI3D) 847 | #define wglDestroyImageBufferI3D WGLEW_GET_FUN(__wglewDestroyImageBufferI3D) 848 | #define wglReleaseImageBufferEventsI3D WGLEW_GET_FUN(__wglewReleaseImageBufferEventsI3D) 849 | 850 | #define WGLEW_I3D_image_buffer WGLEW_GET_VAR(__WGLEW_I3D_image_buffer) 851 | 852 | #endif /* WGL_I3D_image_buffer */ 853 | 854 | /* ------------------------ WGL_I3D_swap_frame_lock ------------------------ */ 855 | 856 | #ifndef WGL_I3D_swap_frame_lock 857 | #define WGL_I3D_swap_frame_lock 1 858 | 859 | typedef BOOL (WINAPI * PFNWGLDISABLEFRAMELOCKI3DPROC) (VOID); 860 | typedef BOOL (WINAPI * PFNWGLENABLEFRAMELOCKI3DPROC) (VOID); 861 | typedef BOOL (WINAPI * PFNWGLISENABLEDFRAMELOCKI3DPROC) (BOOL* pFlag); 862 | typedef BOOL (WINAPI * PFNWGLQUERYFRAMELOCKMASTERI3DPROC) (BOOL* pFlag); 863 | 864 | #define wglDisableFrameLockI3D WGLEW_GET_FUN(__wglewDisableFrameLockI3D) 865 | #define wglEnableFrameLockI3D WGLEW_GET_FUN(__wglewEnableFrameLockI3D) 866 | #define wglIsEnabledFrameLockI3D WGLEW_GET_FUN(__wglewIsEnabledFrameLockI3D) 867 | #define wglQueryFrameLockMasterI3D WGLEW_GET_FUN(__wglewQueryFrameLockMasterI3D) 868 | 869 | #define WGLEW_I3D_swap_frame_lock WGLEW_GET_VAR(__WGLEW_I3D_swap_frame_lock) 870 | 871 | #endif /* WGL_I3D_swap_frame_lock */ 872 | 873 | /* ------------------------ WGL_I3D_swap_frame_usage ----------------------- */ 874 | 875 | #ifndef WGL_I3D_swap_frame_usage 876 | #define WGL_I3D_swap_frame_usage 1 877 | 878 | typedef BOOL (WINAPI * PFNWGLBEGINFRAMETRACKINGI3DPROC) (void); 879 | typedef BOOL (WINAPI * PFNWGLENDFRAMETRACKINGI3DPROC) (void); 880 | typedef BOOL (WINAPI * PFNWGLGETFRAMEUSAGEI3DPROC) (float* pUsage); 881 | typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD* pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage); 882 | 883 | #define wglBeginFrameTrackingI3D WGLEW_GET_FUN(__wglewBeginFrameTrackingI3D) 884 | #define wglEndFrameTrackingI3D WGLEW_GET_FUN(__wglewEndFrameTrackingI3D) 885 | #define wglGetFrameUsageI3D WGLEW_GET_FUN(__wglewGetFrameUsageI3D) 886 | #define wglQueryFrameTrackingI3D WGLEW_GET_FUN(__wglewQueryFrameTrackingI3D) 887 | 888 | #define WGLEW_I3D_swap_frame_usage WGLEW_GET_VAR(__WGLEW_I3D_swap_frame_usage) 889 | 890 | #endif /* WGL_I3D_swap_frame_usage */ 891 | 892 | /* --------------------------- WGL_NV_DX_interop --------------------------- */ 893 | 894 | #ifndef WGL_NV_DX_interop 895 | #define WGL_NV_DX_interop 1 896 | 897 | #define WGL_ACCESS_READ_ONLY_NV 0x0000 898 | #define WGL_ACCESS_READ_WRITE_NV 0x0001 899 | #define WGL_ACCESS_WRITE_DISCARD_NV 0x0002 900 | 901 | typedef BOOL (WINAPI * PFNWGLDXCLOSEDEVICENVPROC) (HANDLE hDevice); 902 | typedef BOOL (WINAPI * PFNWGLDXLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE* hObjects); 903 | typedef BOOL (WINAPI * PFNWGLDXOBJECTACCESSNVPROC) (HANDLE hObject, GLenum access); 904 | typedef HANDLE (WINAPI * PFNWGLDXOPENDEVICENVPROC) (void* dxDevice); 905 | typedef HANDLE (WINAPI * PFNWGLDXREGISTEROBJECTNVPROC) (HANDLE hDevice, void* dxObject, GLuint name, GLenum type, GLenum access); 906 | typedef BOOL (WINAPI * PFNWGLDXSETRESOURCESHAREHANDLENVPROC) (void* dxObject, HANDLE shareHandle); 907 | typedef BOOL (WINAPI * PFNWGLDXUNLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE* hObjects); 908 | typedef BOOL (WINAPI * PFNWGLDXUNREGISTEROBJECTNVPROC) (HANDLE hDevice, HANDLE hObject); 909 | 910 | #define wglDXCloseDeviceNV WGLEW_GET_FUN(__wglewDXCloseDeviceNV) 911 | #define wglDXLockObjectsNV WGLEW_GET_FUN(__wglewDXLockObjectsNV) 912 | #define wglDXObjectAccessNV WGLEW_GET_FUN(__wglewDXObjectAccessNV) 913 | #define wglDXOpenDeviceNV WGLEW_GET_FUN(__wglewDXOpenDeviceNV) 914 | #define wglDXRegisterObjectNV WGLEW_GET_FUN(__wglewDXRegisterObjectNV) 915 | #define wglDXSetResourceShareHandleNV WGLEW_GET_FUN(__wglewDXSetResourceShareHandleNV) 916 | #define wglDXUnlockObjectsNV WGLEW_GET_FUN(__wglewDXUnlockObjectsNV) 917 | #define wglDXUnregisterObjectNV WGLEW_GET_FUN(__wglewDXUnregisterObjectNV) 918 | 919 | #define WGLEW_NV_DX_interop WGLEW_GET_VAR(__WGLEW_NV_DX_interop) 920 | 921 | #endif /* WGL_NV_DX_interop */ 922 | 923 | /* --------------------------- WGL_NV_DX_interop2 -------------------------- */ 924 | 925 | #ifndef WGL_NV_DX_interop2 926 | #define WGL_NV_DX_interop2 1 927 | 928 | #define WGLEW_NV_DX_interop2 WGLEW_GET_VAR(__WGLEW_NV_DX_interop2) 929 | 930 | #endif /* WGL_NV_DX_interop2 */ 931 | 932 | /* --------------------------- WGL_NV_copy_image --------------------------- */ 933 | 934 | #ifndef WGL_NV_copy_image 935 | #define WGL_NV_copy_image 1 936 | 937 | typedef BOOL (WINAPI * PFNWGLCOPYIMAGESUBDATANVPROC) (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); 938 | 939 | #define wglCopyImageSubDataNV WGLEW_GET_FUN(__wglewCopyImageSubDataNV) 940 | 941 | #define WGLEW_NV_copy_image WGLEW_GET_VAR(__WGLEW_NV_copy_image) 942 | 943 | #endif /* WGL_NV_copy_image */ 944 | 945 | /* ------------------------ WGL_NV_delay_before_swap ----------------------- */ 946 | 947 | #ifndef WGL_NV_delay_before_swap 948 | #define WGL_NV_delay_before_swap 1 949 | 950 | typedef BOOL (WINAPI * PFNWGLDELAYBEFORESWAPNVPROC) (HDC hDC, GLfloat seconds); 951 | 952 | #define wglDelayBeforeSwapNV WGLEW_GET_FUN(__wglewDelayBeforeSwapNV) 953 | 954 | #define WGLEW_NV_delay_before_swap WGLEW_GET_VAR(__WGLEW_NV_delay_before_swap) 955 | 956 | #endif /* WGL_NV_delay_before_swap */ 957 | 958 | /* -------------------------- WGL_NV_float_buffer -------------------------- */ 959 | 960 | #ifndef WGL_NV_float_buffer 961 | #define WGL_NV_float_buffer 1 962 | 963 | #define WGL_FLOAT_COMPONENTS_NV 0x20B0 964 | #define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1 965 | #define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2 966 | #define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3 967 | #define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4 968 | #define WGL_TEXTURE_FLOAT_R_NV 0x20B5 969 | #define WGL_TEXTURE_FLOAT_RG_NV 0x20B6 970 | #define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7 971 | #define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8 972 | 973 | #define WGLEW_NV_float_buffer WGLEW_GET_VAR(__WGLEW_NV_float_buffer) 974 | 975 | #endif /* WGL_NV_float_buffer */ 976 | 977 | /* -------------------------- WGL_NV_gpu_affinity -------------------------- */ 978 | 979 | #ifndef WGL_NV_gpu_affinity 980 | #define WGL_NV_gpu_affinity 1 981 | 982 | #define WGL_ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0 983 | #define WGL_ERROR_MISSING_AFFINITY_MASK_NV 0x20D1 984 | 985 | DECLARE_HANDLE(HGPUNV); 986 | typedef struct _GPU_DEVICE { 987 | DWORD cb; 988 | CHAR DeviceName[32]; 989 | CHAR DeviceString[128]; 990 | DWORD Flags; 991 | RECT rcVirtualScreen; 992 | } GPU_DEVICE, *PGPU_DEVICE; 993 | 994 | typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *phGpuList); 995 | typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hdc); 996 | typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice); 997 | typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu); 998 | typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu); 999 | 1000 | #define wglCreateAffinityDCNV WGLEW_GET_FUN(__wglewCreateAffinityDCNV) 1001 | #define wglDeleteDCNV WGLEW_GET_FUN(__wglewDeleteDCNV) 1002 | #define wglEnumGpuDevicesNV WGLEW_GET_FUN(__wglewEnumGpuDevicesNV) 1003 | #define wglEnumGpusFromAffinityDCNV WGLEW_GET_FUN(__wglewEnumGpusFromAffinityDCNV) 1004 | #define wglEnumGpusNV WGLEW_GET_FUN(__wglewEnumGpusNV) 1005 | 1006 | #define WGLEW_NV_gpu_affinity WGLEW_GET_VAR(__WGLEW_NV_gpu_affinity) 1007 | 1008 | #endif /* WGL_NV_gpu_affinity */ 1009 | 1010 | /* ---------------------- WGL_NV_multisample_coverage ---------------------- */ 1011 | 1012 | #ifndef WGL_NV_multisample_coverage 1013 | #define WGL_NV_multisample_coverage 1 1014 | 1015 | #define WGL_COVERAGE_SAMPLES_NV 0x2042 1016 | #define WGL_COLOR_SAMPLES_NV 0x20B9 1017 | 1018 | #define WGLEW_NV_multisample_coverage WGLEW_GET_VAR(__WGLEW_NV_multisample_coverage) 1019 | 1020 | #endif /* WGL_NV_multisample_coverage */ 1021 | 1022 | /* -------------------------- WGL_NV_present_video ------------------------- */ 1023 | 1024 | #ifndef WGL_NV_present_video 1025 | #define WGL_NV_present_video 1 1026 | 1027 | #define WGL_NUM_VIDEO_SLOTS_NV 0x20F0 1028 | 1029 | DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV); 1030 | 1031 | typedef BOOL (WINAPI * PFNWGLBINDVIDEODEVICENVPROC) (HDC hDc, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int* piAttribList); 1032 | typedef int (WINAPI * PFNWGLENUMERATEVIDEODEVICESNVPROC) (HDC hDc, HVIDEOOUTPUTDEVICENV* phDeviceList); 1033 | typedef BOOL (WINAPI * PFNWGLQUERYCURRENTCONTEXTNVPROC) (int iAttribute, int* piValue); 1034 | 1035 | #define wglBindVideoDeviceNV WGLEW_GET_FUN(__wglewBindVideoDeviceNV) 1036 | #define wglEnumerateVideoDevicesNV WGLEW_GET_FUN(__wglewEnumerateVideoDevicesNV) 1037 | #define wglQueryCurrentContextNV WGLEW_GET_FUN(__wglewQueryCurrentContextNV) 1038 | 1039 | #define WGLEW_NV_present_video WGLEW_GET_VAR(__WGLEW_NV_present_video) 1040 | 1041 | #endif /* WGL_NV_present_video */ 1042 | 1043 | /* ---------------------- WGL_NV_render_depth_texture ---------------------- */ 1044 | 1045 | #ifndef WGL_NV_render_depth_texture 1046 | #define WGL_NV_render_depth_texture 1 1047 | 1048 | #define WGL_NO_TEXTURE_ARB 0x2077 1049 | #define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3 1050 | #define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4 1051 | #define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5 1052 | #define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6 1053 | #define WGL_DEPTH_COMPONENT_NV 0x20A7 1054 | 1055 | #define WGLEW_NV_render_depth_texture WGLEW_GET_VAR(__WGLEW_NV_render_depth_texture) 1056 | 1057 | #endif /* WGL_NV_render_depth_texture */ 1058 | 1059 | /* -------------------- WGL_NV_render_texture_rectangle -------------------- */ 1060 | 1061 | #ifndef WGL_NV_render_texture_rectangle 1062 | #define WGL_NV_render_texture_rectangle 1 1063 | 1064 | #define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0 1065 | #define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1 1066 | #define WGL_TEXTURE_RECTANGLE_NV 0x20A2 1067 | 1068 | #define WGLEW_NV_render_texture_rectangle WGLEW_GET_VAR(__WGLEW_NV_render_texture_rectangle) 1069 | 1070 | #endif /* WGL_NV_render_texture_rectangle */ 1071 | 1072 | /* --------------------------- WGL_NV_swap_group --------------------------- */ 1073 | 1074 | #ifndef WGL_NV_swap_group 1075 | #define WGL_NV_swap_group 1 1076 | 1077 | typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrier); 1078 | typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group); 1079 | typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint* count); 1080 | typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint* maxGroups, GLuint *maxBarriers); 1081 | typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint* group, GLuint *barrier); 1082 | typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC); 1083 | 1084 | #define wglBindSwapBarrierNV WGLEW_GET_FUN(__wglewBindSwapBarrierNV) 1085 | #define wglJoinSwapGroupNV WGLEW_GET_FUN(__wglewJoinSwapGroupNV) 1086 | #define wglQueryFrameCountNV WGLEW_GET_FUN(__wglewQueryFrameCountNV) 1087 | #define wglQueryMaxSwapGroupsNV WGLEW_GET_FUN(__wglewQueryMaxSwapGroupsNV) 1088 | #define wglQuerySwapGroupNV WGLEW_GET_FUN(__wglewQuerySwapGroupNV) 1089 | #define wglResetFrameCountNV WGLEW_GET_FUN(__wglewResetFrameCountNV) 1090 | 1091 | #define WGLEW_NV_swap_group WGLEW_GET_VAR(__WGLEW_NV_swap_group) 1092 | 1093 | #endif /* WGL_NV_swap_group */ 1094 | 1095 | /* ----------------------- WGL_NV_vertex_array_range ----------------------- */ 1096 | 1097 | #ifndef WGL_NV_vertex_array_range 1098 | #define WGL_NV_vertex_array_range 1 1099 | 1100 | typedef void * (WINAPI * PFNWGLALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readFrequency, GLfloat writeFrequency, GLfloat priority); 1101 | typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer); 1102 | 1103 | #define wglAllocateMemoryNV WGLEW_GET_FUN(__wglewAllocateMemoryNV) 1104 | #define wglFreeMemoryNV WGLEW_GET_FUN(__wglewFreeMemoryNV) 1105 | 1106 | #define WGLEW_NV_vertex_array_range WGLEW_GET_VAR(__WGLEW_NV_vertex_array_range) 1107 | 1108 | #endif /* WGL_NV_vertex_array_range */ 1109 | 1110 | /* -------------------------- WGL_NV_video_capture ------------------------- */ 1111 | 1112 | #ifndef WGL_NV_video_capture 1113 | #define WGL_NV_video_capture 1 1114 | 1115 | #define WGL_UNIQUE_ID_NV 0x20CE 1116 | #define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF 1117 | 1118 | DECLARE_HANDLE(HVIDEOINPUTDEVICENV); 1119 | 1120 | typedef BOOL (WINAPI * PFNWGLBINDVIDEOCAPTUREDEVICENVPROC) (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice); 1121 | typedef UINT (WINAPI * PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV* phDeviceList); 1122 | typedef BOOL (WINAPI * PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice); 1123 | typedef BOOL (WINAPI * PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int* piValue); 1124 | typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice); 1125 | 1126 | #define wglBindVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewBindVideoCaptureDeviceNV) 1127 | #define wglEnumerateVideoCaptureDevicesNV WGLEW_GET_FUN(__wglewEnumerateVideoCaptureDevicesNV) 1128 | #define wglLockVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewLockVideoCaptureDeviceNV) 1129 | #define wglQueryVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewQueryVideoCaptureDeviceNV) 1130 | #define wglReleaseVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewReleaseVideoCaptureDeviceNV) 1131 | 1132 | #define WGLEW_NV_video_capture WGLEW_GET_VAR(__WGLEW_NV_video_capture) 1133 | 1134 | #endif /* WGL_NV_video_capture */ 1135 | 1136 | /* -------------------------- WGL_NV_video_output -------------------------- */ 1137 | 1138 | #ifndef WGL_NV_video_output 1139 | #define WGL_NV_video_output 1 1140 | 1141 | #define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0 1142 | #define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1 1143 | #define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2 1144 | #define WGL_VIDEO_OUT_COLOR_NV 0x20C3 1145 | #define WGL_VIDEO_OUT_ALPHA_NV 0x20C4 1146 | #define WGL_VIDEO_OUT_DEPTH_NV 0x20C5 1147 | #define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 1148 | #define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 1149 | #define WGL_VIDEO_OUT_FRAME 0x20C8 1150 | #define WGL_VIDEO_OUT_FIELD_1 0x20C9 1151 | #define WGL_VIDEO_OUT_FIELD_2 0x20CA 1152 | #define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB 1153 | #define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC 1154 | 1155 | DECLARE_HANDLE(HPVIDEODEV); 1156 | 1157 | typedef BOOL (WINAPI * PFNWGLBINDVIDEOIMAGENVPROC) (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer); 1158 | typedef BOOL (WINAPI * PFNWGLGETVIDEODEVICENVPROC) (HDC hDC, int numDevices, HPVIDEODEV* hVideoDevice); 1159 | typedef BOOL (WINAPI * PFNWGLGETVIDEOINFONVPROC) (HPVIDEODEV hpVideoDevice, unsigned long* pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); 1160 | typedef BOOL (WINAPI * PFNWGLRELEASEVIDEODEVICENVPROC) (HPVIDEODEV hVideoDevice); 1161 | typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOIMAGENVPROC) (HPBUFFERARB hPbuffer, int iVideoBuffer); 1162 | typedef BOOL (WINAPI * PFNWGLSENDPBUFFERTOVIDEONVPROC) (HPBUFFERARB hPbuffer, int iBufferType, unsigned long* pulCounterPbuffer, BOOL bBlock); 1163 | 1164 | #define wglBindVideoImageNV WGLEW_GET_FUN(__wglewBindVideoImageNV) 1165 | #define wglGetVideoDeviceNV WGLEW_GET_FUN(__wglewGetVideoDeviceNV) 1166 | #define wglGetVideoInfoNV WGLEW_GET_FUN(__wglewGetVideoInfoNV) 1167 | #define wglReleaseVideoDeviceNV WGLEW_GET_FUN(__wglewReleaseVideoDeviceNV) 1168 | #define wglReleaseVideoImageNV WGLEW_GET_FUN(__wglewReleaseVideoImageNV) 1169 | #define wglSendPbufferToVideoNV WGLEW_GET_FUN(__wglewSendPbufferToVideoNV) 1170 | 1171 | #define WGLEW_NV_video_output WGLEW_GET_VAR(__WGLEW_NV_video_output) 1172 | 1173 | #endif /* WGL_NV_video_output */ 1174 | 1175 | /* -------------------------- WGL_OML_sync_control ------------------------- */ 1176 | 1177 | #ifndef WGL_OML_sync_control 1178 | #define WGL_OML_sync_control 1 1179 | 1180 | typedef BOOL (WINAPI * PFNWGLGETMSCRATEOMLPROC) (HDC hdc, INT32* numerator, INT32 *denominator); 1181 | typedef BOOL (WINAPI * PFNWGLGETSYNCVALUESOMLPROC) (HDC hdc, INT64* ust, INT64 *msc, INT64 *sbc); 1182 | typedef INT64 (WINAPI * PFNWGLSWAPBUFFERSMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder); 1183 | typedef INT64 (WINAPI * PFNWGLSWAPLAYERBUFFERSMSCOMLPROC) (HDC hdc, INT fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder); 1184 | typedef BOOL (WINAPI * PFNWGLWAITFORMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64* ust, INT64 *msc, INT64 *sbc); 1185 | typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT64* ust, INT64 *msc, INT64 *sbc); 1186 | 1187 | #define wglGetMscRateOML WGLEW_GET_FUN(__wglewGetMscRateOML) 1188 | #define wglGetSyncValuesOML WGLEW_GET_FUN(__wglewGetSyncValuesOML) 1189 | #define wglSwapBuffersMscOML WGLEW_GET_FUN(__wglewSwapBuffersMscOML) 1190 | #define wglSwapLayerBuffersMscOML WGLEW_GET_FUN(__wglewSwapLayerBuffersMscOML) 1191 | #define wglWaitForMscOML WGLEW_GET_FUN(__wglewWaitForMscOML) 1192 | #define wglWaitForSbcOML WGLEW_GET_FUN(__wglewWaitForSbcOML) 1193 | 1194 | #define WGLEW_OML_sync_control WGLEW_GET_VAR(__WGLEW_OML_sync_control) 1195 | 1196 | #endif /* WGL_OML_sync_control */ 1197 | 1198 | /* ------------------------------------------------------------------------- */ 1199 | 1200 | #define WGLEW_FUN_EXPORT GLEW_FUN_EXPORT 1201 | #define WGLEW_VAR_EXPORT GLEW_VAR_EXPORT 1202 | 1203 | WGLEW_FUN_EXPORT PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL; 1204 | 1205 | WGLEW_FUN_EXPORT PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC __wglewBlitContextFramebufferAMD; 1206 | WGLEW_FUN_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC __wglewCreateAssociatedContextAMD; 1207 | WGLEW_FUN_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC __wglewCreateAssociatedContextAttribsAMD; 1208 | WGLEW_FUN_EXPORT PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC __wglewDeleteAssociatedContextAMD; 1209 | WGLEW_FUN_EXPORT PFNWGLGETCONTEXTGPUIDAMDPROC __wglewGetContextGPUIDAMD; 1210 | WGLEW_FUN_EXPORT PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC __wglewGetCurrentAssociatedContextAMD; 1211 | WGLEW_FUN_EXPORT PFNWGLGETGPUIDSAMDPROC __wglewGetGPUIDsAMD; 1212 | WGLEW_FUN_EXPORT PFNWGLGETGPUINFOAMDPROC __wglewGetGPUInfoAMD; 1213 | WGLEW_FUN_EXPORT PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC __wglewMakeAssociatedContextCurrentAMD; 1214 | 1215 | WGLEW_FUN_EXPORT PFNWGLCREATEBUFFERREGIONARBPROC __wglewCreateBufferRegionARB; 1216 | WGLEW_FUN_EXPORT PFNWGLDELETEBUFFERREGIONARBPROC __wglewDeleteBufferRegionARB; 1217 | WGLEW_FUN_EXPORT PFNWGLRESTOREBUFFERREGIONARBPROC __wglewRestoreBufferRegionARB; 1218 | WGLEW_FUN_EXPORT PFNWGLSAVEBUFFERREGIONARBPROC __wglewSaveBufferRegionARB; 1219 | 1220 | WGLEW_FUN_EXPORT PFNWGLCREATECONTEXTATTRIBSARBPROC __wglewCreateContextAttribsARB; 1221 | 1222 | WGLEW_FUN_EXPORT PFNWGLGETEXTENSIONSSTRINGARBPROC __wglewGetExtensionsStringARB; 1223 | 1224 | WGLEW_FUN_EXPORT PFNWGLGETCURRENTREADDCARBPROC __wglewGetCurrentReadDCARB; 1225 | WGLEW_FUN_EXPORT PFNWGLMAKECONTEXTCURRENTARBPROC __wglewMakeContextCurrentARB; 1226 | 1227 | WGLEW_FUN_EXPORT PFNWGLCREATEPBUFFERARBPROC __wglewCreatePbufferARB; 1228 | WGLEW_FUN_EXPORT PFNWGLDESTROYPBUFFERARBPROC __wglewDestroyPbufferARB; 1229 | WGLEW_FUN_EXPORT PFNWGLGETPBUFFERDCARBPROC __wglewGetPbufferDCARB; 1230 | WGLEW_FUN_EXPORT PFNWGLQUERYPBUFFERARBPROC __wglewQueryPbufferARB; 1231 | WGLEW_FUN_EXPORT PFNWGLRELEASEPBUFFERDCARBPROC __wglewReleasePbufferDCARB; 1232 | 1233 | WGLEW_FUN_EXPORT PFNWGLCHOOSEPIXELFORMATARBPROC __wglewChoosePixelFormatARB; 1234 | WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBFVARBPROC __wglewGetPixelFormatAttribfvARB; 1235 | WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBIVARBPROC __wglewGetPixelFormatAttribivARB; 1236 | 1237 | WGLEW_FUN_EXPORT PFNWGLBINDTEXIMAGEARBPROC __wglewBindTexImageARB; 1238 | WGLEW_FUN_EXPORT PFNWGLRELEASETEXIMAGEARBPROC __wglewReleaseTexImageARB; 1239 | WGLEW_FUN_EXPORT PFNWGLSETPBUFFERATTRIBARBPROC __wglewSetPbufferAttribARB; 1240 | 1241 | WGLEW_FUN_EXPORT PFNWGLBINDDISPLAYCOLORTABLEEXTPROC __wglewBindDisplayColorTableEXT; 1242 | WGLEW_FUN_EXPORT PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC __wglewCreateDisplayColorTableEXT; 1243 | WGLEW_FUN_EXPORT PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC __wglewDestroyDisplayColorTableEXT; 1244 | WGLEW_FUN_EXPORT PFNWGLLOADDISPLAYCOLORTABLEEXTPROC __wglewLoadDisplayColorTableEXT; 1245 | 1246 | WGLEW_FUN_EXPORT PFNWGLGETEXTENSIONSSTRINGEXTPROC __wglewGetExtensionsStringEXT; 1247 | 1248 | WGLEW_FUN_EXPORT PFNWGLGETCURRENTREADDCEXTPROC __wglewGetCurrentReadDCEXT; 1249 | WGLEW_FUN_EXPORT PFNWGLMAKECONTEXTCURRENTEXTPROC __wglewMakeContextCurrentEXT; 1250 | 1251 | WGLEW_FUN_EXPORT PFNWGLCREATEPBUFFEREXTPROC __wglewCreatePbufferEXT; 1252 | WGLEW_FUN_EXPORT PFNWGLDESTROYPBUFFEREXTPROC __wglewDestroyPbufferEXT; 1253 | WGLEW_FUN_EXPORT PFNWGLGETPBUFFERDCEXTPROC __wglewGetPbufferDCEXT; 1254 | WGLEW_FUN_EXPORT PFNWGLQUERYPBUFFEREXTPROC __wglewQueryPbufferEXT; 1255 | WGLEW_FUN_EXPORT PFNWGLRELEASEPBUFFERDCEXTPROC __wglewReleasePbufferDCEXT; 1256 | 1257 | WGLEW_FUN_EXPORT PFNWGLCHOOSEPIXELFORMATEXTPROC __wglewChoosePixelFormatEXT; 1258 | WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBFVEXTPROC __wglewGetPixelFormatAttribfvEXT; 1259 | WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBIVEXTPROC __wglewGetPixelFormatAttribivEXT; 1260 | 1261 | WGLEW_FUN_EXPORT PFNWGLGETSWAPINTERVALEXTPROC __wglewGetSwapIntervalEXT; 1262 | WGLEW_FUN_EXPORT PFNWGLSWAPINTERVALEXTPROC __wglewSwapIntervalEXT; 1263 | 1264 | WGLEW_FUN_EXPORT PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC __wglewGetDigitalVideoParametersI3D; 1265 | WGLEW_FUN_EXPORT PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC __wglewSetDigitalVideoParametersI3D; 1266 | 1267 | WGLEW_FUN_EXPORT PFNWGLGETGAMMATABLEI3DPROC __wglewGetGammaTableI3D; 1268 | WGLEW_FUN_EXPORT PFNWGLGETGAMMATABLEPARAMETERSI3DPROC __wglewGetGammaTableParametersI3D; 1269 | WGLEW_FUN_EXPORT PFNWGLSETGAMMATABLEI3DPROC __wglewSetGammaTableI3D; 1270 | WGLEW_FUN_EXPORT PFNWGLSETGAMMATABLEPARAMETERSI3DPROC __wglewSetGammaTableParametersI3D; 1271 | 1272 | WGLEW_FUN_EXPORT PFNWGLDISABLEGENLOCKI3DPROC __wglewDisableGenlockI3D; 1273 | WGLEW_FUN_EXPORT PFNWGLENABLEGENLOCKI3DPROC __wglewEnableGenlockI3D; 1274 | WGLEW_FUN_EXPORT PFNWGLGENLOCKSAMPLERATEI3DPROC __wglewGenlockSampleRateI3D; 1275 | WGLEW_FUN_EXPORT PFNWGLGENLOCKSOURCEDELAYI3DPROC __wglewGenlockSourceDelayI3D; 1276 | WGLEW_FUN_EXPORT PFNWGLGENLOCKSOURCEEDGEI3DPROC __wglewGenlockSourceEdgeI3D; 1277 | WGLEW_FUN_EXPORT PFNWGLGENLOCKSOURCEI3DPROC __wglewGenlockSourceI3D; 1278 | WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSAMPLERATEI3DPROC __wglewGetGenlockSampleRateI3D; 1279 | WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSOURCEDELAYI3DPROC __wglewGetGenlockSourceDelayI3D; 1280 | WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSOURCEEDGEI3DPROC __wglewGetGenlockSourceEdgeI3D; 1281 | WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSOURCEI3DPROC __wglewGetGenlockSourceI3D; 1282 | WGLEW_FUN_EXPORT PFNWGLISENABLEDGENLOCKI3DPROC __wglewIsEnabledGenlockI3D; 1283 | WGLEW_FUN_EXPORT PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC __wglewQueryGenlockMaxSourceDelayI3D; 1284 | 1285 | WGLEW_FUN_EXPORT PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC __wglewAssociateImageBufferEventsI3D; 1286 | WGLEW_FUN_EXPORT PFNWGLCREATEIMAGEBUFFERI3DPROC __wglewCreateImageBufferI3D; 1287 | WGLEW_FUN_EXPORT PFNWGLDESTROYIMAGEBUFFERI3DPROC __wglewDestroyImageBufferI3D; 1288 | WGLEW_FUN_EXPORT PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC __wglewReleaseImageBufferEventsI3D; 1289 | 1290 | WGLEW_FUN_EXPORT PFNWGLDISABLEFRAMELOCKI3DPROC __wglewDisableFrameLockI3D; 1291 | WGLEW_FUN_EXPORT PFNWGLENABLEFRAMELOCKI3DPROC __wglewEnableFrameLockI3D; 1292 | WGLEW_FUN_EXPORT PFNWGLISENABLEDFRAMELOCKI3DPROC __wglewIsEnabledFrameLockI3D; 1293 | WGLEW_FUN_EXPORT PFNWGLQUERYFRAMELOCKMASTERI3DPROC __wglewQueryFrameLockMasterI3D; 1294 | 1295 | WGLEW_FUN_EXPORT PFNWGLBEGINFRAMETRACKINGI3DPROC __wglewBeginFrameTrackingI3D; 1296 | WGLEW_FUN_EXPORT PFNWGLENDFRAMETRACKINGI3DPROC __wglewEndFrameTrackingI3D; 1297 | WGLEW_FUN_EXPORT PFNWGLGETFRAMEUSAGEI3DPROC __wglewGetFrameUsageI3D; 1298 | WGLEW_FUN_EXPORT PFNWGLQUERYFRAMETRACKINGI3DPROC __wglewQueryFrameTrackingI3D; 1299 | 1300 | WGLEW_FUN_EXPORT PFNWGLDXCLOSEDEVICENVPROC __wglewDXCloseDeviceNV; 1301 | WGLEW_FUN_EXPORT PFNWGLDXLOCKOBJECTSNVPROC __wglewDXLockObjectsNV; 1302 | WGLEW_FUN_EXPORT PFNWGLDXOBJECTACCESSNVPROC __wglewDXObjectAccessNV; 1303 | WGLEW_FUN_EXPORT PFNWGLDXOPENDEVICENVPROC __wglewDXOpenDeviceNV; 1304 | WGLEW_FUN_EXPORT PFNWGLDXREGISTEROBJECTNVPROC __wglewDXRegisterObjectNV; 1305 | WGLEW_FUN_EXPORT PFNWGLDXSETRESOURCESHAREHANDLENVPROC __wglewDXSetResourceShareHandleNV; 1306 | WGLEW_FUN_EXPORT PFNWGLDXUNLOCKOBJECTSNVPROC __wglewDXUnlockObjectsNV; 1307 | WGLEW_FUN_EXPORT PFNWGLDXUNREGISTEROBJECTNVPROC __wglewDXUnregisterObjectNV; 1308 | 1309 | WGLEW_FUN_EXPORT PFNWGLCOPYIMAGESUBDATANVPROC __wglewCopyImageSubDataNV; 1310 | 1311 | WGLEW_FUN_EXPORT PFNWGLDELAYBEFORESWAPNVPROC __wglewDelayBeforeSwapNV; 1312 | 1313 | WGLEW_FUN_EXPORT PFNWGLCREATEAFFINITYDCNVPROC __wglewCreateAffinityDCNV; 1314 | WGLEW_FUN_EXPORT PFNWGLDELETEDCNVPROC __wglewDeleteDCNV; 1315 | WGLEW_FUN_EXPORT PFNWGLENUMGPUDEVICESNVPROC __wglewEnumGpuDevicesNV; 1316 | WGLEW_FUN_EXPORT PFNWGLENUMGPUSFROMAFFINITYDCNVPROC __wglewEnumGpusFromAffinityDCNV; 1317 | WGLEW_FUN_EXPORT PFNWGLENUMGPUSNVPROC __wglewEnumGpusNV; 1318 | 1319 | WGLEW_FUN_EXPORT PFNWGLBINDVIDEODEVICENVPROC __wglewBindVideoDeviceNV; 1320 | WGLEW_FUN_EXPORT PFNWGLENUMERATEVIDEODEVICESNVPROC __wglewEnumerateVideoDevicesNV; 1321 | WGLEW_FUN_EXPORT PFNWGLQUERYCURRENTCONTEXTNVPROC __wglewQueryCurrentContextNV; 1322 | 1323 | WGLEW_FUN_EXPORT PFNWGLBINDSWAPBARRIERNVPROC __wglewBindSwapBarrierNV; 1324 | WGLEW_FUN_EXPORT PFNWGLJOINSWAPGROUPNVPROC __wglewJoinSwapGroupNV; 1325 | WGLEW_FUN_EXPORT PFNWGLQUERYFRAMECOUNTNVPROC __wglewQueryFrameCountNV; 1326 | WGLEW_FUN_EXPORT PFNWGLQUERYMAXSWAPGROUPSNVPROC __wglewQueryMaxSwapGroupsNV; 1327 | WGLEW_FUN_EXPORT PFNWGLQUERYSWAPGROUPNVPROC __wglewQuerySwapGroupNV; 1328 | WGLEW_FUN_EXPORT PFNWGLRESETFRAMECOUNTNVPROC __wglewResetFrameCountNV; 1329 | 1330 | WGLEW_FUN_EXPORT PFNWGLALLOCATEMEMORYNVPROC __wglewAllocateMemoryNV; 1331 | WGLEW_FUN_EXPORT PFNWGLFREEMEMORYNVPROC __wglewFreeMemoryNV; 1332 | 1333 | WGLEW_FUN_EXPORT PFNWGLBINDVIDEOCAPTUREDEVICENVPROC __wglewBindVideoCaptureDeviceNV; 1334 | WGLEW_FUN_EXPORT PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC __wglewEnumerateVideoCaptureDevicesNV; 1335 | WGLEW_FUN_EXPORT PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC __wglewLockVideoCaptureDeviceNV; 1336 | WGLEW_FUN_EXPORT PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC __wglewQueryVideoCaptureDeviceNV; 1337 | WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC __wglewReleaseVideoCaptureDeviceNV; 1338 | 1339 | WGLEW_FUN_EXPORT PFNWGLBINDVIDEOIMAGENVPROC __wglewBindVideoImageNV; 1340 | WGLEW_FUN_EXPORT PFNWGLGETVIDEODEVICENVPROC __wglewGetVideoDeviceNV; 1341 | WGLEW_FUN_EXPORT PFNWGLGETVIDEOINFONVPROC __wglewGetVideoInfoNV; 1342 | WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEODEVICENVPROC __wglewReleaseVideoDeviceNV; 1343 | WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEOIMAGENVPROC __wglewReleaseVideoImageNV; 1344 | WGLEW_FUN_EXPORT PFNWGLSENDPBUFFERTOVIDEONVPROC __wglewSendPbufferToVideoNV; 1345 | 1346 | WGLEW_FUN_EXPORT PFNWGLGETMSCRATEOMLPROC __wglewGetMscRateOML; 1347 | WGLEW_FUN_EXPORT PFNWGLGETSYNCVALUESOMLPROC __wglewGetSyncValuesOML; 1348 | WGLEW_FUN_EXPORT PFNWGLSWAPBUFFERSMSCOMLPROC __wglewSwapBuffersMscOML; 1349 | WGLEW_FUN_EXPORT PFNWGLSWAPLAYERBUFFERSMSCOMLPROC __wglewSwapLayerBuffersMscOML; 1350 | WGLEW_FUN_EXPORT PFNWGLWAITFORMSCOMLPROC __wglewWaitForMscOML; 1351 | WGLEW_FUN_EXPORT PFNWGLWAITFORSBCOMLPROC __wglewWaitForSbcOML; 1352 | WGLEW_VAR_EXPORT GLboolean __WGLEW_3DFX_multisample; 1353 | WGLEW_VAR_EXPORT GLboolean __WGLEW_3DL_stereo_control; 1354 | WGLEW_VAR_EXPORT GLboolean __WGLEW_AMD_gpu_association; 1355 | WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_buffer_region; 1356 | WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_context_flush_control; 1357 | WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context; 1358 | WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context_profile; 1359 | WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context_robustness; 1360 | WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_extensions_string; 1361 | WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_framebuffer_sRGB; 1362 | WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_make_current_read; 1363 | WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_multisample; 1364 | WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pbuffer; 1365 | WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pixel_format; 1366 | WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pixel_format_float; 1367 | WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_render_texture; 1368 | WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_robustness_application_isolation; 1369 | WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_robustness_share_group_isolation; 1370 | WGLEW_VAR_EXPORT GLboolean __WGLEW_ATI_pixel_format_float; 1371 | WGLEW_VAR_EXPORT GLboolean __WGLEW_ATI_render_texture_rectangle; 1372 | WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_create_context_es2_profile; 1373 | WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_create_context_es_profile; 1374 | WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_depth_float; 1375 | WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_display_color_table; 1376 | WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_extensions_string; 1377 | WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_framebuffer_sRGB; 1378 | WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_make_current_read; 1379 | WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_multisample; 1380 | WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_pbuffer; 1381 | WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_pixel_format; 1382 | WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_pixel_format_packed_float; 1383 | WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_swap_control; 1384 | WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_swap_control_tear; 1385 | WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_digital_video_control; 1386 | WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_gamma; 1387 | WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_genlock; 1388 | WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_image_buffer; 1389 | WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_swap_frame_lock; 1390 | WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_swap_frame_usage; 1391 | WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_DX_interop; 1392 | WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_DX_interop2; 1393 | WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_copy_image; 1394 | WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_delay_before_swap; 1395 | WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_float_buffer; 1396 | WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_gpu_affinity; 1397 | WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_multisample_coverage; 1398 | WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_present_video; 1399 | WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_render_depth_texture; 1400 | WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_render_texture_rectangle; 1401 | WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_swap_group; 1402 | WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_vertex_array_range; 1403 | WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_video_capture; 1404 | WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_video_output; 1405 | WGLEW_VAR_EXPORT GLboolean __WGLEW_OML_sync_control; 1406 | /* ------------------------------------------------------------------------- */ 1407 | 1408 | GLEWAPI GLenum GLEWAPIENTRY wglewInit (); 1409 | GLEWAPI GLboolean GLEWAPIENTRY wglewIsSupported (const char *name); 1410 | 1411 | #ifndef WGLEW_GET_VAR 1412 | #define WGLEW_GET_VAR(x) (*(const GLboolean*)&x) 1413 | #endif 1414 | 1415 | #ifndef WGLEW_GET_FUN 1416 | #define WGLEW_GET_FUN(x) x 1417 | #endif 1418 | 1419 | GLEWAPI GLboolean GLEWAPIENTRY wglewGetExtension (const char *name); 1420 | 1421 | #ifdef __cplusplus 1422 | } 1423 | #endif 1424 | 1425 | #undef GLEWAPI 1426 | 1427 | #endif /* __wglew_h__ */ 1428 | -------------------------------------------------------------------------------- /touchdesigner/Inference.toe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwalczyk/tensorflow_top/3c9f907e783c97b2f1a82ae569ce5efe2f63f237/touchdesigner/Inference.toe -------------------------------------------------------------------------------- /touchdesigner/samples/AfricanElephant.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwalczyk/tensorflow_top/3c9f907e783c97b2f1a82ae569ce5efe2f63f237/touchdesigner/samples/AfricanElephant.jpg -------------------------------------------------------------------------------- /touchdesigner/samples/Cougar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwalczyk/tensorflow_top/3c9f907e783c97b2f1a82ae569ce5efe2f63f237/touchdesigner/samples/Cougar.jpg -------------------------------------------------------------------------------- /touchdesigner/samples/Gorilla.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwalczyk/tensorflow_top/3c9f907e783c97b2f1a82ae569ce5efe2f63f237/touchdesigner/samples/Gorilla.jpg --------------------------------------------------------------------------------