1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title>Castle Game Engine: CastleGLShaders: Class TGLSLProgram</title>
<meta name="generator" content="PasDoc 0.13.0">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<table class="container"><tr><td class="navigation">
<h2>Castle Game Engine</h2><p><a href="introduction.html" class="navigation">Introduction</a></p><p><a href="AllUnits.html" class="navigation">Units</a></p><p><a href="ClassHierarchy.html" class="navigation">Class Hierarchy</a></p><p><a href="AllClasses.html" class="navigation">Classes, Interfaces, Objects and Records</a></p><p><a href="AllTypes.html" class="navigation">Types</a></p><p><a href="AllVariables.html" class="navigation">Variables</a></p><p><a href="AllConstants.html" class="navigation">Constants</a></p><p><a href="AllFunctions.html" class="navigation">Functions and Procedures</a></p><p><a href="AllIdentifiers.html" class="navigation">Identifiers</a></p></td><td class="content">
<a name="TGLSLProgram"></a><h1 class="cio">Class TGLSLProgram</h1>
<table class="sections wide_list">
<tr>
<td><a class="section" href="#PasDoc-Description">Description</a></td><td><a class="section" href="#PasDoc-Hierarchy">Hierarchy</a></td><td>Fields</td><td><a class="section" href="#PasDoc-Methods">Methods</a></td><td><a class="section" href="#PasDoc-Properties">Properties</a></td></tr></table>
<a name="PasDoc-Description"></a><h2 class="unit">Unit</h2>
<p class="unitlink">
<a href="CastleGLShaders.html">CastleGLShaders</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type TGLSLProgram = class(TObject)</code></p>
<h2 class="description">Description</h2>
<p>
Easily handle program in GLSL (OpenGL Shading Language).</p>
<a name="PasDoc-Hierarchy"></a><h2 class="hierarchy">Hierarchy</h2>
<ul class="hierarchy"><li class="ancestor">TObject</li>
<li class="thisitem">TGLSLProgram</li></ul><h2 class="overview">Overview</h2>
<a name="PasDoc-Methods"></a><h3 class="summary">Methods</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>constructor <b><a href="CastleGLShaders.TGLSLProgram.html#Create">Create</a></b>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>destructor <b><a href="CastleGLShaders.TGLSLProgram.html#Destroy">Destroy</a></b>; override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#AttachVertexShader">AttachVertexShader</a></b>(const S: string);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#AttachGeometryShader">AttachGeometryShader</a></b>(const S: string);</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#AttachFragmentShader">AttachFragmentShader</a></b>(const S: string);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#AttachShader">AttachShader</a></b>(const ShaderType: <a href="CastleShaders.html#TShaderType">TShaderType</a>; const S: string);</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#AttachShader">AttachShader</a></b>(const ShaderType: <a href="CastleShaders.html#TShaderType">TShaderType</a>; const Parts: TStrings);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#DetachAllShaders">DetachAllShaders</a></b>;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#Link">Link</a></b>(RequireRunningInHardware: boolean);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#Enable">Enable</a></b>;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>class procedure <b><a href="CastleGLShaders.TGLSLProgram.html#Disable">Disable</a></b>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a href="CastleGLShaders.TGLSLProgram.html#SetupUniforms">SetupUniforms</a></b>(var BoundTextureUnits: Cardinal): boolean; virtual;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a href="CastleGLShaders.TGLSLProgram.html#DebugInfo">DebugInfo</a></b>: string;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a href="CastleGLShaders.TGLSLProgram.html#ProgramInfoLog">ProgramInfoLog</a></b>: string;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a href="CastleGLShaders.TGLSLProgram.html#RunningInHardware">RunningInHardware</a></b>: boolean;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>class function <b><a href="CastleGLShaders.TGLSLProgram.html#ClassSupport">ClassSupport</a></b>: <a href="CastleGLUtils.html#TGLSupport">TGLSupport</a>;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetUniform">SetUniform</a></b>(const Name: string; const Value: boolean ; const ForceException: boolean = false);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetUniform">SetUniform</a></b>(const Name: string; const Value: <a href="CastleGLUtils.html#TGLint">TGLint</a> ; const ForceException: boolean = false);</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetUniform">SetUniform</a></b>(const Name: string; const Value: <a href="CastleVectors.html#TVector2Integer">TVector2Integer</a>; const ForceException: boolean = false);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetUniform">SetUniform</a></b>(const Name: string; const Value: <a href="CastleVectors.html#TVector3Integer">TVector3Integer</a>; const ForceException: boolean = false);</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetUniform">SetUniform</a></b>(const Name: string; const Value: <a href="CastleVectors.html#TVector4Integer">TVector4Integer</a>; const ForceException: boolean = false);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetUniform">SetUniform</a></b>(const Name: string; const Value: <a href="CastleGLUtils.html#TGLfloat">TGLfloat</a> ; const ForceException: boolean = false);</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetUniform">SetUniform</a></b>(const Name: string; const Value: <a href="CastleVectors.html#TVector2Single">TVector2Single</a> ; const ForceException: boolean = false);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetUniform">SetUniform</a></b>(const Name: string; const Value: <a href="CastleVectors.html#TVector3Single">TVector3Single</a> ; const ForceException: boolean = false);</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetUniform">SetUniform</a></b>(const Name: string; const Value: <a href="CastleVectors.html#TVector4Single">TVector4Single</a> ; const ForceException: boolean = false);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetUniform">SetUniform</a></b>(const Name: string; const Value: <a href="CastleVectors.html#TMatrix2Single">TMatrix2Single</a> ; const ForceException: boolean = false);</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetUniform">SetUniform</a></b>(const Name: string; const Value: <a href="CastleVectors.html#TMatrix3Single">TMatrix3Single</a> ; const ForceException: boolean = false);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetUniform">SetUniform</a></b>(const Name: string; const Value: <a href="CastleVectors.html#TMatrix4Single">TMatrix4Single</a> ; const ForceException: boolean = false);</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetUniform">SetUniform</a></b>(const Name: string; const Value: <a href="CastleUtils.TBooleanList.html">TBooleanList</a> ; const ForceException: boolean = false);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetUniform">SetUniform</a></b>(const Name: string; const Value: <a href="CastleUtils.TLongIntList.html">TLongIntList</a> ; const ForceException: boolean = false);</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetUniform">SetUniform</a></b>(const Name: string; const Value: <a href="CastleUtils.TSingleList.html">TSingleList</a> ; const ForceException: boolean = false);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetUniform">SetUniform</a></b>(const Name: string; const Value: <a href="CastleVectors.TVector2SingleList.html">TVector2SingleList</a>; const ForceException: boolean = false);</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetUniform">SetUniform</a></b>(const Name: string; const Value: <a href="CastleVectors.TVector3SingleList.html">TVector3SingleList</a>; const ForceException: boolean = false);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetUniform">SetUniform</a></b>(const Name: string; const Value: <a href="CastleVectors.TVector4SingleList.html">TVector4SingleList</a>; const ForceException: boolean = false);</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetUniform">SetUniform</a></b>(const Name: string; const Value: <a href="CastleVectors.TMatrix3SingleList.html">TMatrix3SingleList</a>; const ForceException: boolean = false);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetUniform">SetUniform</a></b>(const Name: string; const Value: <a href="CastleVectors.TMatrix4SingleList.html">TMatrix4SingleList</a>; const ForceException: boolean = false);</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a href="CastleGLShaders.TGLSLProgram.html#VertexAttribPointer">VertexAttribPointer</a></b>(const Name: string; LocationOffset: <a href="CastleGLUtils.html#TGLint">TGLint</a>; Size: <a href="CastleGLUtils.html#TGLint">TGLint</a>; AType: <a href="CastleGLUtils.html#TGLenum">TGLenum</a>; Normalized: <a href="CastleGLUtils.html#TGLboolean">TGLboolean</a>; Stride: <a href="CastleGLUtils.html#TGLsizei">TGLsizei</a>; Ptr: Pointer): <a href="CastleGLUtils.html#TGLint">TGLint</a>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>class procedure <b><a href="CastleGLShaders.TGLSLProgram.html#DisableVertexAttribArray">DisableVertexAttribArray</a></b>(Location: <a href="CastleGLUtils.html#TGLint">TGLint</a>);</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetAttribute">SetAttribute</a></b>(const Name: string; const Value: <a href="CastleGLUtils.html#TGLfloat">TGLfloat</a>);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetAttribute">SetAttribute</a></b>(const Name: string; const Value: <a href="CastleVectors.html#TVector2Single">TVector2Single</a>);</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetAttribute">SetAttribute</a></b>(const Name: string; const Value: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetAttribute">SetAttribute</a></b>(const Name: string; const Value: <a href="CastleVectors.html#TVector4Single">TVector4Single</a>);</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetAttribute">SetAttribute</a></b>(const Name: string; const Value: <a href="CastleVectors.html#TMatrix3Single">TMatrix3Single</a>);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetAttribute">SetAttribute</a></b>(const Name: string; const Value: <a href="CastleVectors.html#TMatrix4Single">TMatrix4Single</a>);</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetAttribute">SetAttribute</a></b>(const Name: string; const Value: <a href="CastleVectors.html#TVector4Integer">TVector4Integer</a>);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetAttribute">SetAttribute</a></b>(const Name: string; const Value: <a href="CastleVectors.html#TVector4Byte">TVector4Byte</a>);</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetAttribute">SetAttribute</a></b>(const Name: string; const Value: <a href="CastleGLUtils.html#TGLdouble">TGLdouble</a>);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetAttribute">SetAttribute</a></b>(const Name: string; const Value: <a href="CastleVectors.html#TVector2Double">TVector2Double</a>);</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetAttribute">SetAttribute</a></b>(const Name: string; const Value: <a href="CastleVectors.html#TVector3Double">TVector3Double</a>);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleGLShaders.TGLSLProgram.html#SetAttribute">SetAttribute</a></b>(const Name: string; const Value: <a href="CastleVectors.html#TVector4Double">TVector4Double</a>);</code></td>
</tr>
</table>
<a name="PasDoc-Properties"></a><h3 class="summary">Properties</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a href="CastleGLShaders.TGLSLProgram.html#Support">Support</a></b>: <a href="CastleGLUtils.html#TGLSupport">TGLSupport</a> read FSupport;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a href="CastleGLShaders.TGLSLProgram.html#UniformNotFoundAction">UniformNotFoundAction</a></b>: <a href="CastleGLShaders.html#TUniformNotFoundAction">TUniformNotFoundAction</a>
read FUniformNotFoundAction write FUniformNotFoundAction
default uaException;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a href="CastleGLShaders.TGLSLProgram.html#UniformTypeMismatchAction">UniformTypeMismatchAction</a></b>: <a href="CastleGLShaders.html#TUniformTypeMismatchAction">TUniformTypeMismatchAction</a>
read FUniformTypeMismatchAction write FUniformTypeMismatchAction
default utGLError;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Methods</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Create"></a><code>constructor <b>Create</b>;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Destroy"></a><code>destructor <b>Destroy</b>; override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="AttachVertexShader"></a><code>procedure <b>AttachVertexShader</b>(const S: string);</code></td>
</tr>
<tr><td colspan="2">
<p>
Create shader from given string, compile it and attach to current program.
<p>For desktop OpenGL, you can attach more than one shader of given type, just make sure that only one main() function is among each type (otherwise link error will be raised later). For OpenGLES, this is not allowed, so don't use this if you want to work with OpenGLES too.
<p>If you want to explicitly get rid of old shaders, use <a class="normal" href="CastleGLShaders.TGLSLProgram.html#DetachAllShaders">DetachAllShaders</a>.
<p>
<p></p>
<h6 class="description_section">Exceptions raised</h6>
<dl class="exceptions_raised">
<dt><a class="normal" href="CastleGLShaders.EGLSLShaderCompileError.html">EGLSLShaderCompileError</a></dt>
<dd>If the shader source code cannot be compiled, exception message contains precise description from OpenGL where the error is.</dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="AttachGeometryShader"></a><code>procedure <b>AttachGeometryShader</b>(const S: string);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="AttachFragmentShader"></a><code>procedure <b>AttachFragmentShader</b>(const S: string);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="AttachShader"></a><code>procedure <b>AttachShader</b>(const ShaderType: <a href="CastleShaders.html#TShaderType">TShaderType</a>; const S: string);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="AttachShader"></a><code>procedure <b>AttachShader</b>(const ShaderType: <a href="CastleShaders.html#TShaderType">TShaderType</a>; const Parts: TStrings);</code></td>
</tr>
<tr><td colspan="2">
<p>
Attach multiple shader parts for given type.
<p>For normal OpenGL, we can use GLSL separate compilation units. So this is equivalent to just calling <code><code>AttachShader</code>(ShaderType, Parts[I])</code> for each part.
<p>For OpenGL ES, this is unfortunately not possible, you can only attach a single shader of a given type (see <a href="http://www.khronos.org/opengles/sdk/docs/man/xhtml/glAttachShader.xml">http://www.khronos.org/opengles/sdk/docs/man/xhtml/glAttachShader.xml</a> ). So we simply concatenate the shaders into one.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="DetachAllShaders"></a><code>procedure <b>DetachAllShaders</b>;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Link"></a><code>procedure <b>Link</b>(RequireRunningInHardware: boolean);</code></td>
</tr>
<tr><td colspan="2">
<p>
Link the program, this should be done after attaching all shaders and before actually using the program.
<p>
<p></p>
<h6 class="description_section">Exceptions raised</h6>
<dl class="exceptions_raised">
<dt><a class="normal" href="CastleGLShaders.EGLSLProgramLinkError.html">EGLSLProgramLinkError</a></dt>
<dd>If the program cannot be linked, exception message contains precise description from OpenGL where the error is.</dd>
<dt><a class="normal" href="CastleGLShaders.EGLSLRunningInSoftware.html">EGLSLRunningInSoftware</a></dt>
<dd>If the program will be linked successfully, but RequireRunningInHardware = <code>True</code> and the program will be detected to be running in software.</dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Enable"></a><code>procedure <b>Enable</b>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Enable (use) this program. Shortcut for <code><a class="normal" href="CastleGLShaders.html#CurrentProgram">CurrentProgram</a> := Self</code>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Disable"></a><code>class procedure <b>Disable</b>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Disable this program (use the fixed function pipeline). Shortcut for <code><a class="normal" href="CastleGLShaders.html#CurrentProgram">CurrentProgram</a> := nil</code>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetupUniforms"></a><code>function <b>SetupUniforms</b>(var BoundTextureUnits: Cardinal): boolean; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Override this to set uniform values, in particular to bind the textures used by this shader, right after each <a class="normal" href="CastleGLShaders.TGLSLProgram.html#Enable">Enable</a> call.
<p>This is automatically called after every <a class="normal" href="CastleGLShaders.TGLSLProgram.html#Enable">Enable</a> by VRML renderer (when it renders shapes) or scene manager (when it renders screen effects). If you use this <a class="normal" href="CastleGLShaders.TGLSLProgram.html">TGLSLProgram</a> directly (if you call <a class="normal" href="CastleGLShaders.TGLSLProgram.html#Enable">Enable</a> yourself), then it's your responsibility to call this method explicitly, if you want shaders using it to work.
<p>You can set any uniform values, and generally do anything you want to be done each time this shader is enabled. In particular, you can bind textures and set corresponding uniform variables of them. Increase BoundTextureUnits appropriately.
<p>Returns <code>False</code> is some texture couldn't be bound.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="DebugInfo"></a><code>function <b>DebugInfo</b>: string;</code></td>
</tr>
<tr><td colspan="2">
<p>
Returns multiline debug info about current program. Things like how it's supported (not at all ? ARB extension ? standard ?), names of active uniform and attribute variables etc.
<p>fglrx (Radeon closed-source OpenGL drivers) are buggy (that's not news, I know...) and they report GL_INVALID_ENUM on some queries here. We detect this, and still produce nice debug message, without raising any exception (after all, we have to workaround fglrx bugs, and try to run our program anyway...). What's important for caller is that we have to check first whether there are any OpenGL errors pending, and raise exceptions on them.
<p></p>
<h6 class="description_section">Exceptions raised</h6>
<dl class="exceptions_raised">
<dt><a class="normal" href="CastleGLUtils.EOpenGLError.html">EOpenGLError</a></dt>
<dd>If any OpenGL error will be detected.</dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="ProgramInfoLog"></a><code>function <b>ProgramInfoLog</b>: string;</code></td>
</tr>
<tr><td colspan="2">
<p>
This is program info log, given to you from OpenGL after the program is linked.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="RunningInHardware"></a><code>function <b>RunningInHardware</b>: boolean;</code></td>
</tr>
<tr><td colspan="2">
<p>
After the program is linked, you can check this.
<p>Note that this is necessarily implemented in quite hacky way (by looking at <a class="normal" href="CastleGLShaders.TGLSLProgram.html#ProgramInfoLog">ProgramInfoLog</a>), there is no way currently (AFAIK ?) to get this information cleanly from OpenGL. In case of doubts, we try to "trust" OpenGL to execute shader in hardware. Return <code>False</code> only when we see clear indication in <a class="normal" href="CastleGLShaders.TGLSLProgram.html#ProgramInfoLog">ProgramInfoLog</a> that it'll run in software.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="ClassSupport"></a><code>class function <b>ClassSupport</b>: <a href="CastleGLUtils.html#TGLSupport">TGLSupport</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
What support do we get from current OpenGL context ?</p>
<p>
This is much like <a class="normal" href="CastleGLShaders.TGLSLProgram.html#Support">Support</a>, but it's a class function.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetUniform"></a><code>procedure <b>SetUniform</b>(const Name: string; const Value: boolean ; const ForceException: boolean = false);</code></td>
</tr>
<tr><td colspan="2">
<p>
Set appropriate uniform variable value. The used type must match the type of this variable in GLSL program.
<p>OpenGL forces some constraints on using this:
<p></p>
<ul class="paragraph_spacing">
<li><p>This should be used only after linking, and re-linking clears (sets to zero) all uniform variables values.</p></li>
<li><p>This can be used only when the program is currently used. So call <a class="normal" href="CastleGLShaders.TGLSLProgram.html#Enable">Enable</a> before doing <a class="normal" href="CastleGLShaders.TGLSLProgram.html#SetUniform">SetUniform</a> calls.
<p>This is required by OpenGL glUniform* commands. glGetUniformLocation take program id as parameter, so they can operate on any program. But glUniform* operate only on active program.</p></li>
<li><p>Only <i>active</i> uniforms variables may be set. <i>Active</i> means, quoting OpenGL manpages, a variable that is determined during the link operation that it may be accessed during program execution. In other words, when linking GLSL program, unused variables may be eliminated, and you cannot set them by <a class="normal" href="CastleGLShaders.TGLSLProgram.html#SetUniform">SetUniform</a>.
<p>Call <a class="normal" href="CastleGLShaders.TGLSLProgram.html#DebugInfo">DebugInfo</a> to see what uniform variables are considered active for your shader.</p></li>
</ul>
<p>
<p>
<p>
<p></p>
<h6 class="description_section">Exceptions raised</h6>
<dl class="exceptions_raised">
<dt><a class="normal" href="CastleGLShaders.EGLSLUniformNotFound.html">EGLSLUniformNotFound</a></dt>
<dd>If the variable is not found within the program and <a class="normal" href="CastleGLShaders.TGLSLProgram.html#UniformNotFoundAction">UniformNotFoundAction</a> = uaException (default) or ForceException.</dd>
<dt><a class="normal" href="CastleGLShaders.EGLSLUniformTypeMismatch.html">EGLSLUniformTypeMismatch</a></dt>
<dd>If the variable type doesn't match the type declared in shader code. Raised only if <a class="normal" href="CastleGLShaders.TGLSLProgram.html#UniformTypeMismatchAction">UniformTypeMismatchAction</a> = utException or ForceException.
<p>Note that both <a class="normal" href="CastleGLShaders.EGLSLUniformNotFound.html">EGLSLUniformNotFound</a> and <a class="normal" href="CastleGLShaders.EGLSLUniformTypeMismatch.html">EGLSLUniformTypeMismatch</a> may be comfortably catched by an umbrella class <a class="normal" href="CastleGLShaders.EGLSLUniformInvalid.html">EGLSLUniformInvalid</a>.</dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetUniform"></a><code>procedure <b>SetUniform</b>(const Name: string; const Value: <a href="CastleGLUtils.html#TGLint">TGLint</a> ; const ForceException: boolean = false);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetUniform"></a><code>procedure <b>SetUniform</b>(const Name: string; const Value: <a href="CastleVectors.html#TVector2Integer">TVector2Integer</a>; const ForceException: boolean = false);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetUniform"></a><code>procedure <b>SetUniform</b>(const Name: string; const Value: <a href="CastleVectors.html#TVector3Integer">TVector3Integer</a>; const ForceException: boolean = false);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetUniform"></a><code>procedure <b>SetUniform</b>(const Name: string; const Value: <a href="CastleVectors.html#TVector4Integer">TVector4Integer</a>; const ForceException: boolean = false);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetUniform"></a><code>procedure <b>SetUniform</b>(const Name: string; const Value: <a href="CastleGLUtils.html#TGLfloat">TGLfloat</a> ; const ForceException: boolean = false);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetUniform"></a><code>procedure <b>SetUniform</b>(const Name: string; const Value: <a href="CastleVectors.html#TVector2Single">TVector2Single</a> ; const ForceException: boolean = false);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetUniform"></a><code>procedure <b>SetUniform</b>(const Name: string; const Value: <a href="CastleVectors.html#TVector3Single">TVector3Single</a> ; const ForceException: boolean = false);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetUniform"></a><code>procedure <b>SetUniform</b>(const Name: string; const Value: <a href="CastleVectors.html#TVector4Single">TVector4Single</a> ; const ForceException: boolean = false);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetUniform"></a><code>procedure <b>SetUniform</b>(const Name: string; const Value: <a href="CastleVectors.html#TMatrix2Single">TMatrix2Single</a> ; const ForceException: boolean = false);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetUniform"></a><code>procedure <b>SetUniform</b>(const Name: string; const Value: <a href="CastleVectors.html#TMatrix3Single">TMatrix3Single</a> ; const ForceException: boolean = false);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetUniform"></a><code>procedure <b>SetUniform</b>(const Name: string; const Value: <a href="CastleVectors.html#TMatrix4Single">TMatrix4Single</a> ; const ForceException: boolean = false);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetUniform"></a><code>procedure <b>SetUniform</b>(const Name: string; const Value: <a href="CastleUtils.TBooleanList.html">TBooleanList</a> ; const ForceException: boolean = false);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetUniform"></a><code>procedure <b>SetUniform</b>(const Name: string; const Value: <a href="CastleUtils.TLongIntList.html">TLongIntList</a> ; const ForceException: boolean = false);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetUniform"></a><code>procedure <b>SetUniform</b>(const Name: string; const Value: <a href="CastleUtils.TSingleList.html">TSingleList</a> ; const ForceException: boolean = false);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetUniform"></a><code>procedure <b>SetUniform</b>(const Name: string; const Value: <a href="CastleVectors.TVector2SingleList.html">TVector2SingleList</a>; const ForceException: boolean = false);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetUniform"></a><code>procedure <b>SetUniform</b>(const Name: string; const Value: <a href="CastleVectors.TVector3SingleList.html">TVector3SingleList</a>; const ForceException: boolean = false);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetUniform"></a><code>procedure <b>SetUniform</b>(const Name: string; const Value: <a href="CastleVectors.TVector4SingleList.html">TVector4SingleList</a>; const ForceException: boolean = false);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetUniform"></a><code>procedure <b>SetUniform</b>(const Name: string; const Value: <a href="CastleVectors.TMatrix3SingleList.html">TMatrix3SingleList</a>; const ForceException: boolean = false);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetUniform"></a><code>procedure <b>SetUniform</b>(const Name: string; const Value: <a href="CastleVectors.TMatrix4SingleList.html">TMatrix4SingleList</a>; const ForceException: boolean = false);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="VertexAttribPointer"></a><code>function <b>VertexAttribPointer</b>(const Name: string; LocationOffset: <a href="CastleGLUtils.html#TGLint">TGLint</a>; Size: <a href="CastleGLUtils.html#TGLint">TGLint</a>; AType: <a href="CastleGLUtils.html#TGLenum">TGLenum</a>; Normalized: <a href="CastleGLUtils.html#TGLboolean">TGLboolean</a>; Stride: <a href="CastleGLUtils.html#TGLsizei">TGLsizei</a>; Ptr: Pointer): <a href="CastleGLUtils.html#TGLint">TGLint</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Load and enable vertex attribute data. This calls glVertexAttribPointer and enables it by glEnableVertexAttribArray (or ARB extension equivalents), see OpenGL reference for details.
<p>The attribute name is automatically resolved to a "location". We add LocationOffset (useful if you want to load matrix attributes, when you have to load matrix columns separately, with LocationOffset = column index).
<p>
<p></p>
<h6 class="description_section">Returns</h6>
<p class="return">Attribute location (with LocationOffset already applied). You can use it with <a class="normal" href="CastleGLShaders.TGLSLProgram.html#DisableVertexAttribArray">DisableVertexAttribArray</a>.</p><h6 class="description_section">Exceptions raised</h6>
<dl class="exceptions_raised">
<dt><a class="normal" href="CastleGLShaders.EGLSLAttributeNotFound.html">EGLSLAttributeNotFound</a></dt>
<dd>If the variable is not found within the program.</dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="DisableVertexAttribArray"></a><code>class procedure <b>DisableVertexAttribArray</b>(Location: <a href="CastleGLUtils.html#TGLint">TGLint</a>);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetAttribute"></a><code>procedure <b>SetAttribute</b>(const Name: string; const Value: <a href="CastleGLUtils.html#TGLfloat">TGLfloat</a>);</code></td>
</tr>
<tr><td colspan="2">
<p>
Set attribute variable value. The used type must match the type of this variable in GLSL program.
<p>OpenGL forces some constraints on using this, see <a class="normal" href="CastleGLShaders.TGLSLProgram.html#SetUniform">SetUniform</a>. In short: use this only after linking and using the program. And note that attributes declared but not actually used in shader code may be eliminated, use <a class="normal" href="CastleGLShaders.TGLSLProgram.html#DebugInfo">DebugInfo</a> to see which attributes are actually used (<i>active</i> in OpenGL terminology).
<p>These should not be often useful. Usually, you should rather load attribute arrays, by <a class="normal" href="CastleGLShaders.TGLSLProgram.html#VertexAttribPointer">VertexAttribPointer</a>.
<p>
<p></p>
<h6 class="description_section">Exceptions raised</h6>
<dl class="exceptions_raised">
<dt><a class="normal" href="CastleGLShaders.EGLSLAttributeNotFound.html">EGLSLAttributeNotFound</a></dt>
<dd>If the variable is not found within the program.
<p>Note that this is only one of the many things that can go wrong. And on most cases we don't raise any error, instead OpenGL sets it's error state and you probably want to call <a class="normal" href="CastleGLUtils.html#CheckGLErrors">CheckGLErrors</a> from time to time to catch them.</dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetAttribute"></a><code>procedure <b>SetAttribute</b>(const Name: string; const Value: <a href="CastleVectors.html#TVector2Single">TVector2Single</a>);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetAttribute"></a><code>procedure <b>SetAttribute</b>(const Name: string; const Value: <a href="CastleVectors.html#TVector3Single">TVector3Single</a>);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetAttribute"></a><code>procedure <b>SetAttribute</b>(const Name: string; const Value: <a href="CastleVectors.html#TVector4Single">TVector4Single</a>);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetAttribute"></a><code>procedure <b>SetAttribute</b>(const Name: string; const Value: <a href="CastleVectors.html#TMatrix3Single">TMatrix3Single</a>);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetAttribute"></a><code>procedure <b>SetAttribute</b>(const Name: string; const Value: <a href="CastleVectors.html#TMatrix4Single">TMatrix4Single</a>);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetAttribute"></a><code>procedure <b>SetAttribute</b>(const Name: string; const Value: <a href="CastleVectors.html#TVector4Integer">TVector4Integer</a>);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetAttribute"></a><code>procedure <b>SetAttribute</b>(const Name: string; const Value: <a href="CastleVectors.html#TVector4Byte">TVector4Byte</a>);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetAttribute"></a><code>procedure <b>SetAttribute</b>(const Name: string; const Value: <a href="CastleGLUtils.html#TGLdouble">TGLdouble</a>);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetAttribute"></a><code>procedure <b>SetAttribute</b>(const Name: string; const Value: <a href="CastleVectors.html#TVector2Double">TVector2Double</a>);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetAttribute"></a><code>procedure <b>SetAttribute</b>(const Name: string; const Value: <a href="CastleVectors.html#TVector3Double">TVector3Double</a>);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetAttribute"></a><code>procedure <b>SetAttribute</b>(const Name: string; const Value: <a href="CastleVectors.html#TVector4Double">TVector4Double</a>);</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<h3 class="detail">Properties</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Support"></a><code>property <b>Support</b>: <a href="CastleGLUtils.html#TGLSupport">TGLSupport</a> read FSupport;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="UniformNotFoundAction"></a><code>property <b>UniformNotFoundAction</b>: <a href="CastleGLShaders.html#TUniformNotFoundAction">TUniformNotFoundAction</a>
read FUniformNotFoundAction write FUniformNotFoundAction
default uaException;</code></td>
</tr>
<tr><td colspan="2">
<p>
What to do when GLSL uniform variable is set (<a class="normal" href="CastleGLShaders.TGLSLProgram.html#SetUniform">SetUniform</a>) but doesn't exist in the shader. Note that OpenGL aggresively removes unused code and variables from the shader when compiling/linking, so this also happens for "declared but detected to not used" variables.
<p></p>
<h6 class="description_section">See also</h6>
<dl class="see_also">
<dt><a class="normal" href="CastleGLShaders.html#TUniformNotFoundAction">TUniformNotFoundAction</a></dt>
<dd>What to do when GLSL uniform variable is set (<a class="normal" href="CastleGLShaders.TGLSLProgram.html#SetUniform">TGLSLProgram.SetUniform</a>) but doesn't exist in the shader.</dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="UniformTypeMismatchAction"></a><code>property <b>UniformTypeMismatchAction</b>: <a href="CastleGLShaders.html#TUniformTypeMismatchAction">TUniformTypeMismatchAction</a>
read FUniformTypeMismatchAction write FUniformTypeMismatchAction
default utGLError;</code></td>
</tr>
<tr><td colspan="2">
<p>
What to do when GLSL uniform variable is set (<a class="normal" href="CastleGLShaders.TGLSLProgram.html#SetUniform">SetUniform</a>) but is declared with an incompatible type in the shader source. </p>
<h6 class="description_section">See also</h6>
<dl class="see_also">
<dt><a class="normal" href="CastleGLShaders.html#TUniformTypeMismatchAction">TUniformTypeMismatchAction</a></dt>
<dd>What to do when GLSL uniform variable is set (by <a class="normal" href="CastleGLShaders.TGLSLProgram.html#SetUniform">TGLSLProgram.SetUniform</a>) to the type that doesn't match type declared in GLSL shader.</dd>
</dl>
</td></tr>
</table>
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(["trackPageView"]);
_paq.push(["enableLinkTracking"]);
(function() {
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://michalis.ii.uni.wroc.pl/piwik-castle-engine/";
_paq.push(["setTrackerUrl", u+"piwik.php"]);
_paq.push(["setSiteId", "1"]);
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Piwik Code -->
<noscript>
<!-- Piwik Image Tracker -->
<img src="http://michalis.ii.uni.wroc.pl/piwik-castle-engine/piwik.php?idsite=1&rec=1" style="border:0" alt="" />
<!-- End Piwik -->
</noscript>
<hr noshade size="1"><span class="appinfo"><em>Generated by <a href="http://pasdoc.sourceforge.net/">PasDoc 0.13.0</a> on 2015-06-15 04:43:10</em>
</span>
</td></tr></table></body></html>
|