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
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QGLShaderProgram Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">  </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QGLShaderProgram Class Reference<br /><sup><sup>[<a href="qtopengl.html">QtOpenGL</a> module]</sup></sup></h1><p>The QGLShaderProgram class allows OpenGL shader programs to be
linked and used. <a href="#details">More...</a></p>
<p>Inherits <a href="qobject.html">QObject</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qglshaderprogram.html#QGLShaderProgram">__init__</a></b> (<i>self</i>, QObject <i>parent</i> = None)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#QGLShaderProgram-2">__init__</a></b> (<i>self</i>, QGLContext <i>context</i>, QObject <i>parent</i> = None)</li><li><div class="fn" />bool <b><a href="qglshaderprogram.html#addShader">addShader</a></b> (<i>self</i>, QGLShader <i>shader</i>)</li><li><div class="fn" />bool <b><a href="qglshaderprogram.html#addShaderFromSourceCode">addShaderFromSourceCode</a></b> (<i>self</i>, QGLShader.ShaderType <i>type</i>, QByteArray <i>source</i>)</li><li><div class="fn" />bool <b><a href="qglshaderprogram.html#addShaderFromSourceCode-2">addShaderFromSourceCode</a></b> (<i>self</i>, QGLShader.ShaderType <i>type</i>, QString <i>source</i>)</li><li><div class="fn" />bool <b><a href="qglshaderprogram.html#addShaderFromSourceFile">addShaderFromSourceFile</a></b> (<i>self</i>, QGLShader.ShaderType <i>type</i>, QString <i>fileName</i>)</li><li><div class="fn" />int <b><a href="qglshaderprogram.html#attributeLocation">attributeLocation</a></b> (<i>self</i>, QByteArray <i>name</i>)</li><li><div class="fn" />int <b><a href="qglshaderprogram.html#attributeLocation-2">attributeLocation</a></b> (<i>self</i>, QString <i>name</i>)</li><li><div class="fn" />bool <b><a href="qglshaderprogram.html#bind">bind</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#bindAttributeLocation">bindAttributeLocation</a></b> (<i>self</i>, QByteArray <i>name</i>, int <i>location</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#bindAttributeLocation-2">bindAttributeLocation</a></b> (<i>self</i>, QString <i>name</i>, int <i>location</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#disableAttributeArray">disableAttributeArray</a></b> (<i>self</i>, int <i>location</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#disableAttributeArray-2">disableAttributeArray</a></b> (<i>self</i>, str <i>name</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#enableAttributeArray">enableAttributeArray</a></b> (<i>self</i>, int <i>location</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#enableAttributeArray-2">enableAttributeArray</a></b> (<i>self</i>, str <i>name</i>)</li><li><div class="fn" />int <b><a href="qglshaderprogram.html#geometryInputType">geometryInputType</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qglshaderprogram.html#geometryOutputType">geometryOutputType</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qglshaderprogram.html#geometryOutputVertexCount">geometryOutputVertexCount</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qglshaderprogram.html#isLinked">isLinked</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qglshaderprogram.html#link">link</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qglshaderprogram.html#log">log</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qglshaderprogram.html#programId">programId</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#release">release</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#removeAllShaders">removeAllShaders</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#removeShader">removeShader</a></b> (<i>self</i>, QGLShader <i>shader</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setAttributeArray">setAttributeArray</a></b> (<i>self</i>, int <i>location</i>, object <i>values</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setAttributeArray-2">setAttributeArray</a></b> (<i>self</i>, str <i>name</i>, object <i>values</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setAttributeBuffer">setAttributeBuffer</a></b> (<i>self</i>, int <i>location</i>, int <i>type</i>, int <i>offset</i>, int <i>tupleSize</i>, int <i>stride</i> = 0)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setAttributeBuffer-2">setAttributeBuffer</a></b> (<i>self</i>, str <i>name</i>, int <i>type</i>, int <i>offset</i>, int <i>tupleSize</i>, int <i>stride</i> = 0)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a></b> (<i>self</i>, int <i>location</i>, float <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setAttributeValue-2">setAttributeValue</a></b> (<i>self</i>, int <i>location</i>, float <i>x</i>, float <i>y</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setAttributeValue-3">setAttributeValue</a></b> (<i>self</i>, int <i>location</i>, float <i>x</i>, float <i>y</i>, float <i>z</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setAttributeValue-4">setAttributeValue</a></b> (<i>self</i>, int <i>location</i>, float <i>x</i>, float <i>y</i>, float <i>z</i>, float <i>w</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setAttributeValue-5">setAttributeValue</a></b> (<i>self</i>, int <i>location</i>, QVector2D <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setAttributeValue-6">setAttributeValue</a></b> (<i>self</i>, int <i>location</i>, QVector3D <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setAttributeValue-7">setAttributeValue</a></b> (<i>self</i>, int <i>location</i>, QVector4D <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setAttributeValue-8">setAttributeValue</a></b> (<i>self</i>, int <i>location</i>, QColor <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setAttributeValue-9">setAttributeValue</a></b> (<i>self</i>, str <i>name</i>, float <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setAttributeValue-10">setAttributeValue</a></b> (<i>self</i>, str <i>name</i>, float <i>x</i>, float <i>y</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setAttributeValue-11">setAttributeValue</a></b> (<i>self</i>, str <i>name</i>, float <i>x</i>, float <i>y</i>, float <i>z</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setAttributeValue-12">setAttributeValue</a></b> (<i>self</i>, str <i>name</i>, float <i>x</i>, float <i>y</i>, float <i>z</i>, float <i>w</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setAttributeValue-13">setAttributeValue</a></b> (<i>self</i>, str <i>name</i>, QVector2D <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setAttributeValue-14">setAttributeValue</a></b> (<i>self</i>, str <i>name</i>, QVector3D <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setAttributeValue-15">setAttributeValue</a></b> (<i>self</i>, str <i>name</i>, QVector4D <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setAttributeValue-16">setAttributeValue</a></b> (<i>self</i>, str <i>name</i>, QColor <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setGeometryInputType">setGeometryInputType</a></b> (<i>self</i>, int <i>inputType</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setGeometryOutputType">setGeometryOutputType</a></b> (<i>self</i>, int <i>outputType</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setGeometryOutputVertexCount">setGeometryOutputVertexCount</a></b> (<i>self</i>, int <i>count</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue">setUniformValue</a></b> (<i>self</i>, int <i>location</i>, int <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-2">setUniformValue</a></b> (<i>self</i>, int <i>location</i>, float <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-3">setUniformValue</a></b> (<i>self</i>, int <i>location</i>, float <i>x</i>, float <i>y</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-4">setUniformValue</a></b> (<i>self</i>, int <i>location</i>, float <i>x</i>, float <i>y</i>, float <i>z</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-5">setUniformValue</a></b> (<i>self</i>, int <i>location</i>, float <i>x</i>, float <i>y</i>, float <i>z</i>, float <i>w</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-6">setUniformValue</a></b> (<i>self</i>, int <i>location</i>, QVector2D <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-7">setUniformValue</a></b> (<i>self</i>, int <i>location</i>, QVector3D <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-8">setUniformValue</a></b> (<i>self</i>, int <i>location</i>, QVector4D <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-9">setUniformValue</a></b> (<i>self</i>, int <i>location</i>, QColor <i>color</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-10">setUniformValue</a></b> (<i>self</i>, int <i>location</i>, QPoint <i>point</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-11">setUniformValue</a></b> (<i>self</i>, int <i>location</i>, QPointF <i>point</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-12">setUniformValue</a></b> (<i>self</i>, int <i>location</i>, QSize <i>size</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-13">setUniformValue</a></b> (<i>self</i>, int <i>location</i>, QSizeF <i>size</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-14">setUniformValue</a></b> (<i>self</i>, int <i>location</i>, QMatrix2x2 <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-15">setUniformValue</a></b> (<i>self</i>, int <i>location</i>, QMatrix2x3 <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-16">setUniformValue</a></b> (<i>self</i>, int <i>location</i>, QMatrix2x4 <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-17">setUniformValue</a></b> (<i>self</i>, int <i>location</i>, QMatrix3x2 <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-18">setUniformValue</a></b> (<i>self</i>, int <i>location</i>, QMatrix3x3 <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-19">setUniformValue</a></b> (<i>self</i>, int <i>location</i>, QMatrix3x4 <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-20">setUniformValue</a></b> (<i>self</i>, int <i>location</i>, QMatrix4x2 <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-21">setUniformValue</a></b> (<i>self</i>, int <i>location</i>, QMatrix4x3 <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-22">setUniformValue</a></b> (<i>self</i>, int <i>location</i>, QMatrix4x4 <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-23">setUniformValue</a></b> (<i>self</i>, int <i>location</i>, QTransform <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-24">setUniformValue</a></b> (<i>self</i>, str <i>name</i>, int <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-25">setUniformValue</a></b> (<i>self</i>, str <i>name</i>, float <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-26">setUniformValue</a></b> (<i>self</i>, str <i>name</i>, float <i>x</i>, float <i>y</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-27">setUniformValue</a></b> (<i>self</i>, str <i>name</i>, float <i>x</i>, float <i>y</i>, float <i>z</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-28">setUniformValue</a></b> (<i>self</i>, str <i>name</i>, float <i>x</i>, float <i>y</i>, float <i>z</i>, float <i>w</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-29">setUniformValue</a></b> (<i>self</i>, str <i>name</i>, QVector2D <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-30">setUniformValue</a></b> (<i>self</i>, str <i>name</i>, QVector3D <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-31">setUniformValue</a></b> (<i>self</i>, str <i>name</i>, QVector4D <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-32">setUniformValue</a></b> (<i>self</i>, str <i>name</i>, QColor <i>color</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-33">setUniformValue</a></b> (<i>self</i>, str <i>name</i>, QPoint <i>point</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-34">setUniformValue</a></b> (<i>self</i>, str <i>name</i>, QPointF <i>point</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-35">setUniformValue</a></b> (<i>self</i>, str <i>name</i>, QSize <i>size</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-36">setUniformValue</a></b> (<i>self</i>, str <i>name</i>, QSizeF <i>size</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-37">setUniformValue</a></b> (<i>self</i>, str <i>name</i>, QMatrix2x2 <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-38">setUniformValue</a></b> (<i>self</i>, str <i>name</i>, QMatrix2x3 <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-39">setUniformValue</a></b> (<i>self</i>, str <i>name</i>, QMatrix2x4 <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-40">setUniformValue</a></b> (<i>self</i>, str <i>name</i>, QMatrix3x2 <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-41">setUniformValue</a></b> (<i>self</i>, str <i>name</i>, QMatrix3x3 <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-42">setUniformValue</a></b> (<i>self</i>, str <i>name</i>, QMatrix3x4 <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-43">setUniformValue</a></b> (<i>self</i>, str <i>name</i>, QMatrix4x2 <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-44">setUniformValue</a></b> (<i>self</i>, str <i>name</i>, QMatrix4x3 <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-45">setUniformValue</a></b> (<i>self</i>, str <i>name</i>, QMatrix4x4 <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValue-46">setUniformValue</a></b> (<i>self</i>, str <i>name</i>, QTransform <i>value</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValueArray">setUniformValueArray</a></b> (<i>self</i>, int <i>location</i>, object <i>values</i>)</li><li><div class="fn" /><b><a href="qglshaderprogram.html#setUniformValueArray-2">setUniformValueArray</a></b> (<i>self</i>, str <i>name</i>, object <i>values</i>)</li><li><div class="fn" />unknown-type <b><a href="qglshaderprogram.html#shaders">shaders</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qglshaderprogram.html#uniformLocation">uniformLocation</a></b> (<i>self</i>, QByteArray <i>name</i>)</li><li><div class="fn" />int <b><a href="qglshaderprogram.html#uniformLocation-2">uniformLocation</a></b> (<i>self</i>, QString <i>name</i>)</li></ul><h3>Static Methods</h3><ul><li><div class="fn" />bool <b><a href="qglshaderprogram.html#hasOpenGLShaderPrograms">hasOpenGLShaderPrograms</a></b> (QGLContext <i>context</i> = None)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QGLShaderProgram class allows OpenGL shader programs to be
linked and used.</p>
<a id="introduction" name="introduction" />
<h3>Introduction</h3>
<p>This class supports shader programs written in the OpenGL
Shading Language (GLSL) and in the OpenGL/ES Shading Language
(GLSL/ES).</p>
<p><a href="qglshader.html">QGLShader</a> and QGLShaderProgram
shelter the programmer from the details of compiling and linking
vertex and fragment shaders.</p>
<p>The following example creates a vertex shader program using the
supplied source <tt>code</tt>. Once compiled and linked, the shader
program is activated in the current <a href="qglcontext.html">QGLContext</a> by calling <a href="qglshaderprogram.html#bind">QGLShaderProgram.bind</a>():</p>
<pre class="cpp">
<span class="type"><a href="qglshader.html">QGLShader</a></span> shader(<span class="type"><a href="qglshader.html">QGLShader</a></span><span class="operator">.</span>Vertex);
shader<span class="operator">.</span>compileSourceCode(code);
<span class="type">QGLShaderProgram</span> program(context);
program<span class="operator">.</span><a href="qglshaderprogram.html#addShader">addShader</a>(shader);
program<span class="operator">.</span><a href="qglshaderprogram.html#link">link</a>();
program<span class="operator">.</span><a href="qglshaderprogram.html#bind">bind</a>();
</pre>
<a id="writing-portable-shaders" name="writing-portable-shaders" />
<h3>Writing portable shaders</h3>
<p>Shader programs can be difficult to reuse across OpenGL
implementations because of varying levels of support for standard
vertex attributes and uniform variables. In particular, GLSL/ES
lacks all of the standard variables that are present on desktop
OpenGL systems: <tt>gl_Vertex</tt>, <tt>gl_Normal</tt>,
<tt>gl_Color</tt>, and so on. Desktop OpenGL lacks the variable
qualifiers <tt>highp</tt>, <tt>mediump</tt>, and <tt>lowp</tt>.</p>
<p>The QGLShaderProgram class makes the process of writing portable
shaders easier by prefixing all shader programs with the following
lines on desktop OpenGL:</p>
<pre class="cpp">
<span class="preprocessor">#define highp</span>
<span class="preprocessor">#define mediump</span>
<span class="preprocessor">#define lowp</span>
</pre>
<p>This makes it possible to run most GLSL/ES shader programs on
desktop systems. The programmer should restrict themselves to just
features that are present in GLSL/ES, and avoid standard variable
names that only work on the desktop.</p>
<a id="simple-shader-example" name="simple-shader-example" />
<h3>Simple shader example</h3>
<pre class="cpp">
program<span class="operator">.</span><a href="qglshaderprogram.html#addShaderFromSourceCode">addShaderFromSourceCode</a>(<span class="type"><a href="qglshader.html">QGLShader</a></span><span class="operator">.</span>Vertex<span class="operator">,</span>
<span class="string">"attribute highp vec4 vertex;\n"</span>
<span class="string">"uniform highp mat4 matrix;\n"</span>
<span class="string">"void main(void)\n"</span>
<span class="string">"{\n"</span>
<span class="string">" gl_Position = matrix * vertex;\n"</span>
<span class="string">"}"</span>);
program<span class="operator">.</span><a href="qglshaderprogram.html#addShaderFromSourceCode">addShaderFromSourceCode</a>(<span class="type"><a href="qglshader.html">QGLShader</a></span><span class="operator">.</span>Fragment<span class="operator">,</span>
<span class="string">"uniform mediump vec4 color;\n"</span>
<span class="string">"void main(void)\n"</span>
<span class="string">"{\n"</span>
<span class="string">" gl_FragColor = color;\n"</span>
<span class="string">"}"</span>);
program<span class="operator">.</span><a href="qglshaderprogram.html#link">link</a>();
program<span class="operator">.</span><a href="qglshaderprogram.html#bind">bind</a>();
<span class="type">int</span> vertexLocation <span class="operator">=</span> program<span class="operator">.</span><a href="qglshaderprogram.html#attributeLocation">attributeLocation</a>(<span class="string">"vertex"</span>);
<span class="type">int</span> matrixLocation <span class="operator">=</span> program<span class="operator">.</span><a href="qglshaderprogram.html#uniformLocation">uniformLocation</a>(<span class="string">"matrix"</span>);
<span class="type">int</span> colorLocation <span class="operator">=</span> program<span class="operator">.</span><a href="qglshaderprogram.html#uniformLocation">uniformLocation</a>(<span class="string">"color"</span>);
</pre>
<p>With the above shader program active, we can draw a green
triangle as follows:</p>
<pre class="cpp">
<span class="keyword">static</span> GLfloat <span class="keyword">const</span> triangleVertices<span class="operator">[</span><span class="operator">]</span> <span class="operator">=</span> {
<span class="number">60.0f</span><span class="operator">,</span> <span class="number">10.0f</span><span class="operator">,</span> <span class="number">0.0f</span><span class="operator">,</span>
<span class="number">110.0f</span><span class="operator">,</span> <span class="number">110.0f</span><span class="operator">,</span> <span class="number">0.0f</span><span class="operator">,</span>
<span class="number">10.0f</span><span class="operator">,</span> <span class="number">110.0f</span><span class="operator">,</span> <span class="number">0.0f</span>
};
<span class="type"><a href="qcolor.html">QColor</a></span> color(<span class="number">0</span><span class="operator">,</span> <span class="number">255</span><span class="operator">,</span> <span class="number">0</span><span class="operator">,</span> <span class="number">255</span>);
QMatrix4x4 pmvMatrix;
pmvMatrix<span class="operator">.</span>ortho(rect());
program<span class="operator">.</span><a href="qglshaderprogram.html#enableAttributeArray">enableAttributeArray</a>(vertexLocation);
program<span class="operator">.</span><a href="qglshaderprogram.html#setAttributeArray">setAttributeArray</a>(vertexLocation<span class="operator">,</span> triangleVertices<span class="operator">,</span> <span class="number">3</span>);
program<span class="operator">.</span><a href="qglshaderprogram.html#setUniformValue">setUniformValue</a>(matrixLocation<span class="operator">,</span> pmvMatrix);
program<span class="operator">.</span><a href="qglshaderprogram.html#setUniformValue">setUniformValue</a>(colorLocation<span class="operator">,</span> color);
glDrawArrays(GL_TRIANGLES<span class="operator">,</span> <span class="number">0</span><span class="operator">,</span> <span class="number">3</span>);
program<span class="operator">.</span><a href="qglshaderprogram.html#disableAttributeArray">disableAttributeArray</a>(vertexLocation);
</pre>
<a id="binary-shaders-and-programs" name="binary-shaders-and-programs" />
<h3>Binary shaders and programs</h3>
<p>Binary shaders may be specified using <tt>glShaderBinary()</tt>
on the return value from <a href="qglshader.html#shaderId">QGLShader.shaderId</a>(). The <a href="qglshader.html">QGLShader</a> instance containing the binary can
then be added to the shader program with <a href="qglshaderprogram.html#addShader">addShader</a>() and linked in the
usual fashion with <a href="qglshaderprogram.html#link">link</a>().</p>
<p>Binary programs may be specified using
<tt>glProgramBinaryOES()</tt> on the return value from <a href="qglshaderprogram.html#programId">programId</a>(). Then the
application should call <a href="qglshaderprogram.html#link">link</a>(), which will notice that the
program has already been specified and linked, allowing other
operations to be performed on the shader program.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QGLShaderProgram" />QGLShaderProgram.__init__ (<i>self</i>, <a href="qobject.html">QObject</a> <i>parent</i> = None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a new shader program and attaches it to
<i>parent</i>. The program will be invalid until <a href="qglshaderprogram.html#addShader">addShader</a>() is called.</p>
<p>The shader program will be associated with the current <a href="qglcontext.html">QGLContext</a>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#addShader">addShader</a>().</p>
<h3 class="fn"><a name="QGLShaderProgram-2" />QGLShaderProgram.__init__ (<i>self</i>, <a href="qglcontext.html">QGLContext</a> <i>context</i>, <a href="qobject.html">QObject</a> <i>parent</i> = None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a new shader program and attaches it to
<i>parent</i>. The program will be invalid until <a href="qglshaderprogram.html#addShader">addShader</a>() is called.</p>
<p>The shader program will be associated with <i>context</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#addShader">addShader</a>().</p>
<h3 class="fn"><a name="addShader" />bool QGLShaderProgram.addShader (<i>self</i>, <a href="qglshader.html">QGLShader</a> <i>shader</i>)</h3><p>Adds a compiled <i>shader</i> to this shader program. Returns
true if the shader could be added, or false otherwise.</p>
<p>Ownership of the <i>shader</i> object remains with the caller.
It will not be deleted when this <a href="qglshaderprogram.html">QGLShaderProgram</a> instance is deleted.
This allows the caller to add the same shader to multiple shader
programs.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#addShaderFromSourceCode">addShaderFromSourceCode</a>(),
<a href="qglshaderprogram.html#addShaderFromSourceFile">addShaderFromSourceFile</a>(),
<a href="qglshaderprogram.html#removeShader">removeShader</a>(),
<a href="qglshaderprogram.html#link">link</a>(), and <a href="qglshaderprogram.html#removeAllShaders">removeAllShaders</a>().</p>
<h3 class="fn"><a name="addShaderFromSourceCode" />bool QGLShaderProgram.addShaderFromSourceCode (<i>self</i>, <a href="qglshader-shadertype.html">QGLShader.ShaderType</a> <i>type</i>, <a href="qbytearray.html">QByteArray</a> <i>source</i>)</h3><p>Compiles <i>source</i> as a shader of the specified <i>type</i>
and adds it to this shader program. Returns true if compilation was
successful, false otherwise. The compilation errors and warnings
will be made available via <a href="qglshaderprogram.html#log">log</a>().</p>
<p>This function is intended to be a short-cut for quickly adding
vertex and fragment shaders to a shader program without creating an
instance of <a href="qglshader.html">QGLShader</a> first.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#addShader">addShader</a>(), <a href="qglshaderprogram.html#addShaderFromSourceFile">addShaderFromSourceFile</a>(),
<a href="qglshaderprogram.html#removeShader">removeShader</a>(),
<a href="qglshaderprogram.html#link">link</a>(), <a href="qglshaderprogram.html#log">log</a>(), and <a href="qglshaderprogram.html#removeAllShaders">removeAllShaders</a>().</p>
<h3 class="fn"><a name="addShaderFromSourceCode-2" />bool QGLShaderProgram.addShaderFromSourceCode (<i>self</i>, <a href="qglshader-shadertype.html">QGLShader.ShaderType</a> <i>type</i>, QString <i>source</i>)</h3><p>This is an overloaded function.</p>
<p>Compiles <i>source</i> as a shader of the specified <i>type</i>
and adds it to this shader program. Returns true if compilation was
successful, false otherwise. The compilation errors and warnings
will be made available via <a href="qglshaderprogram.html#log">log</a>().</p>
<p>This function is intended to be a short-cut for quickly adding
vertex and fragment shaders to a shader program without creating an
instance of <a href="qglshader.html">QGLShader</a> first.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#addShader">addShader</a>(), <a href="qglshaderprogram.html#addShaderFromSourceFile">addShaderFromSourceFile</a>(),
<a href="qglshaderprogram.html#removeShader">removeShader</a>(),
<a href="qglshaderprogram.html#link">link</a>(), <a href="qglshaderprogram.html#log">log</a>(), and <a href="qglshaderprogram.html#removeAllShaders">removeAllShaders</a>().</p>
<h3 class="fn"><a name="addShaderFromSourceFile" />bool QGLShaderProgram.addShaderFromSourceFile (<i>self</i>, <a href="qglshader-shadertype.html">QGLShader.ShaderType</a> <i>type</i>, QString <i>fileName</i>)</h3><p>Compiles the contents of <i>fileName</i> as a shader of the
specified <i>type</i> and adds it to this shader program. Returns
true if compilation was successful, false otherwise. The
compilation errors and warnings will be made available via <a href="qglshaderprogram.html#log">log</a>().</p>
<p>This function is intended to be a short-cut for quickly adding
vertex and fragment shaders to a shader program without creating an
instance of <a href="qglshader.html">QGLShader</a> first.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#addShader">addShader</a>() and <a href="qglshaderprogram.html#addShaderFromSourceCode">addShaderFromSourceCode</a>().</p>
<h3 class="fn"><a name="attributeLocation" />int QGLShaderProgram.attributeLocation (<i>self</i>, <a href="qbytearray.html">QByteArray</a> <i>name</i>)</h3><p>Returns the location of the attribute <i>name</i> within this
shader program's parameter list. Returns -1 if <i>name</i> is not a
valid attribute for this shader program.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#uniformLocation">uniformLocation</a>() and
<a href="qglshaderprogram.html#bindAttributeLocation">bindAttributeLocation</a>().</p>
<h3 class="fn"><a name="attributeLocation-2" />int QGLShaderProgram.attributeLocation (<i>self</i>, QString <i>name</i>)</h3><p>This is an overloaded function.</p>
<p>Returns the location of the attribute <i>name</i> within this
shader program's parameter list. Returns -1 if <i>name</i> is not a
valid attribute for this shader program.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#uniformLocation">uniformLocation</a>() and
<a href="qglshaderprogram.html#bindAttributeLocation">bindAttributeLocation</a>().</p>
<h3 class="fn"><a name="bind" />bool QGLShaderProgram.bind (<i>self</i>)</h3><p>Binds this shader program to the active <a href="qglcontext.html">QGLContext</a> and makes it the current shader
program. Any previously bound shader program is released. This is
equivalent to calling <tt>glUseProgram()</tt> on <a href="qglshaderprogram.html#programId">programId</a>(). Returns true if
the program was successfully bound; false otherwise. If the shader
program has not yet been linked, or it needs to be re-linked, this
function will call <a href="qglshaderprogram.html#link">link</a>().</p>
<p><b>See also</b> <a href="qglshaderprogram.html#link">link</a>()
and <a href="qglshaderprogram.html#release">release</a>().</p>
<h3 class="fn"><a name="bindAttributeLocation" />QGLShaderProgram.bindAttributeLocation (<i>self</i>, <a href="qbytearray.html">QByteArray</a> <i>name</i>, int <i>location</i>)</h3><p>Binds the attribute <i>name</i> to the specified
<i>location</i>. This function can be called before or after the
program has been linked. Any attributes that have not been
explicitly bound when the program is linked will be assigned
locations automatically.</p>
<p>When this function is called after the program has been linked,
the program will need to be relinked for the change to take
effect.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#attributeLocation">attributeLocation</a>().</p>
<h3 class="fn"><a name="bindAttributeLocation-2" />QGLShaderProgram.bindAttributeLocation (<i>self</i>, QString <i>name</i>, int <i>location</i>)</h3><p>This is an overloaded function.</p>
<p>Binds the attribute <i>name</i> to the specified
<i>location</i>. This function can be called before or after the
program has been linked. Any attributes that have not been
explicitly bound when the program is linked will be assigned
locations automatically.</p>
<p>When this function is called after the program has been linked,
the program will need to be relinked for the change to take
effect.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#attributeLocation">attributeLocation</a>().</p>
<h3 class="fn"><a name="disableAttributeArray" />QGLShaderProgram.disableAttributeArray (<i>self</i>, int <i>location</i>)</h3><p>Disables the vertex array at <i>location</i> in this shader
program that was enabled by a previous call to <a href="qglshaderprogram.html#enableAttributeArray">enableAttributeArray</a>().</p>
<p><b>See also</b> <a href="qglshaderprogram.html#enableAttributeArray">enableAttributeArray</a>(),
<a href="qglshaderprogram.html#setAttributeArray">setAttributeArray</a>(),
<a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>(),
and <a href="qglshaderprogram.html#setUniformValue">setUniformValue</a>().</p>
<h3 class="fn"><a name="disableAttributeArray-2" />QGLShaderProgram.disableAttributeArray (<i>self</i>, str <i>name</i>)</h3><p>This is an overloaded function.</p>
<p>Disables the vertex array called <i>name</i> in this shader
program that was enabled by a previous call to <a href="qglshaderprogram.html#enableAttributeArray">enableAttributeArray</a>().</p>
<p><b>See also</b> <a href="qglshaderprogram.html#enableAttributeArray">enableAttributeArray</a>(),
<a href="qglshaderprogram.html#setAttributeArray">setAttributeArray</a>(),
<a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>(),
and <a href="qglshaderprogram.html#setUniformValue">setUniformValue</a>().</p>
<h3 class="fn"><a name="enableAttributeArray" />QGLShaderProgram.enableAttributeArray (<i>self</i>, int <i>location</i>)</h3><p>Enables the vertex array at <i>location</i> in this shader
program so that the value set by <a href="qglshaderprogram.html#setAttributeArray">setAttributeArray</a>()
on <i>location</i> will be used by the shader program.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#disableAttributeArray">disableAttributeArray</a>(),
<a href="qglshaderprogram.html#setAttributeArray">setAttributeArray</a>(),
<a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>(),
and <a href="qglshaderprogram.html#setUniformValue">setUniformValue</a>().</p>
<h3 class="fn"><a name="enableAttributeArray-2" />QGLShaderProgram.enableAttributeArray (<i>self</i>, str <i>name</i>)</h3><p>This is an overloaded function.</p>
<p>Enables the vertex array called <i>name</i> in this shader
program so that the value set by <a href="qglshaderprogram.html#setAttributeArray">setAttributeArray</a>()
on <i>name</i> will be used by the shader program.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#disableAttributeArray">disableAttributeArray</a>(),
<a href="qglshaderprogram.html#setAttributeArray">setAttributeArray</a>(),
<a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>(),
and <a href="qglshaderprogram.html#setUniformValue">setUniformValue</a>().</p>
<h3 class="fn"><a name="geometryInputType" />int QGLShaderProgram.geometryInputType (<i>self</i>)</h3><p>Returns the geometry shader input type, if active.</p>
<p>This parameter takes effect the next time the program is
linked.</p>
<p>This function was introduced in Qt 4.7.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setGeometryInputType">setGeometryInputType</a>().</p>
<h3 class="fn"><a name="geometryOutputType" />int QGLShaderProgram.geometryOutputType (<i>self</i>)</h3><p>Returns the geometry shader output type, if active.</p>
<p>This parameter takes effect the next time the program is
linked.</p>
<p>This function was introduced in Qt 4.7.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setGeometryOutputType">setGeometryOutputType</a>().</p>
<h3 class="fn"><a name="geometryOutputVertexCount" />int QGLShaderProgram.geometryOutputVertexCount (<i>self</i>)</h3><p>Returns the maximum number of vertices the current geometry
shader program will produce, if active.</p>
<p>This parameter takes effect the ntext time the program is
linked.</p>
<p>This function was introduced in Qt 4.7.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setGeometryOutputVertexCount">setGeometryOutputVertexCount</a>().</p>
<h3 class="fn"><a name="hasOpenGLShaderPrograms" />bool QGLShaderProgram.hasOpenGLShaderPrograms (<a href="qglcontext.html">QGLContext</a> <i>context</i> = None)</h3><p>Returns true if shader programs written in the OpenGL Shading
Language (GLSL) are supported on this system; false otherwise.</p>
<p>The <i>context</i> is used to resolve the GLSL extensions. If
<i>context</i> is null, then <a href="qglcontext.html#currentContext">QGLContext.currentContext</a>()
is used.</p>
<h3 class="fn"><a name="isLinked" />bool QGLShaderProgram.isLinked (<i>self</i>)</h3><p>Returns true if this shader program has been linked; false
otherwise.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#link">link</a>().</p>
<h3 class="fn"><a name="link" />bool QGLShaderProgram.link (<i>self</i>)</h3><p>Links together the shaders that were added to this program with
<a href="qglshaderprogram.html#addShader">addShader</a>(). Returns
true if the link was successful or false otherwise. If the link
failed, the error messages can be retrieved with <a href="qglshaderprogram.html#log">log</a>().</p>
<p>Subclasses can override this function to initialize attributes
and uniform variables for use in specific shader programs.</p>
<p>If the shader program was already linked, calling this function
again will force it to be re-linked.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#addShader">addShader</a>() and <a href="qglshaderprogram.html#log">log</a>().</p>
<h3 class="fn"><a name="log" />QString QGLShaderProgram.log (<i>self</i>)</h3><p>Returns the errors and warnings that occurred during the last
<a href="qglshaderprogram.html#link">link</a>() or <a href="qglshaderprogram.html#addShader">addShader</a>() with explicitly
specified source code.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#link">link</a>().</p>
<h3 class="fn"><a name="programId" />int QGLShaderProgram.programId (<i>self</i>)</h3><p>Returns the OpenGL identifier associated with this shader
program.</p>
<p><b>See also</b> <a href="qglshader.html#shaderId">QGLShader.shaderId</a>().</p>
<h3 class="fn"><a name="release" />QGLShaderProgram.release (<i>self</i>)</h3><p>Releases the active shader program from the current <a href="qglcontext.html">QGLContext</a>. This is equivalent to calling
<tt>glUseProgram(0)</tt>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#bind">bind</a>().</p>
<h3 class="fn"><a name="removeAllShaders" />QGLShaderProgram.removeAllShaders (<i>self</i>)</h3><p>Removes all of the shaders that were added to this program
previously. The <a href="qglshader.html">QGLShader</a> objects for
the shaders will not be deleted if they were constructed
externally. <a href="qglshader.html">QGLShader</a> objects that are
constructed internally by <a href="qglshaderprogram.html">QGLShaderProgram</a> will be deleted.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#addShader">addShader</a>() and <a href="qglshaderprogram.html#removeShader">removeShader</a>().</p>
<h3 class="fn"><a name="removeShader" />QGLShaderProgram.removeShader (<i>self</i>, <a href="qglshader.html">QGLShader</a> <i>shader</i>)</h3><p>Removes <i>shader</i> from this shader program. The object is
not deleted.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#addShader">addShader</a>(), <a href="qglshaderprogram.html#link">link</a>(), and <a href="qglshaderprogram.html#removeAllShaders">removeAllShaders</a>().</p>
<h3 class="fn"><a name="setAttributeArray" />QGLShaderProgram.setAttributeArray (<i>self</i>, int <i>location</i>, object <i>values</i>)</h3><p>Sets an array of vertex <i>values</i> on the attribute at
<i>location</i> in this shader program. The <i>tupleSize</i>
indicates the number of components per vertex (1, 2, 3, or 4), and
the <i>stride</i> indicates the number of bytes between vertices. A
default <i>stride</i> value of zero indicates that the vertices are
densely packed in <i>values</i>.</p>
<p>The array will become active when <a href="qglshaderprogram.html#enableAttributeArray">enableAttributeArray</a>()
is called on the <i>location</i>. Otherwise the value specified
with <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>()
for <i>location</i> will be used.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>(),
<a href="qglshaderprogram.html#setUniformValue">setUniformValue</a>(),
<a href="qglshaderprogram.html#enableAttributeArray">enableAttributeArray</a>(),
and <a href="qglshaderprogram.html#disableAttributeArray">disableAttributeArray</a>().</p>
<h3 class="fn"><a name="setAttributeArray-2" />QGLShaderProgram.setAttributeArray (<i>self</i>, str <i>name</i>, object <i>values</i>)</h3><p>Sets an array of 2D vertex <i>values</i> on the attribute at
<i>location</i> in this shader program. The <i>stride</i> indicates
the number of bytes between vertices. A default <i>stride</i> value
of zero indicates that the vertices are densely packed in
<i>values</i>.</p>
<p>The array will become active when <a href="qglshaderprogram.html#enableAttributeArray">enableAttributeArray</a>()
is called on the <i>location</i>. Otherwise the value specified
with <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>()
for <i>location</i> will be used.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>(),
<a href="qglshaderprogram.html#setUniformValue">setUniformValue</a>(),
<a href="qglshaderprogram.html#enableAttributeArray">enableAttributeArray</a>(),
and <a href="qglshaderprogram.html#disableAttributeArray">disableAttributeArray</a>().</p>
<h3 class="fn"><a name="setAttributeBuffer" />QGLShaderProgram.setAttributeBuffer (<i>self</i>, int <i>location</i>, int <i>type</i>, int <i>offset</i>, int <i>tupleSize</i>, int <i>stride</i> = 0)</h3><p>Sets an array of vertex values on the attribute at
<i>location</i> in this shader program, starting at a specific
<i>offset</i> in the currently bound vertex buffer. The
<i>stride</i> indicates the number of bytes between vertices. A
default <i>stride</i> value of zero indicates that the vertices are
densely packed in the value array.</p>
<p>The <i>type</i> indicates the type of elements in the vertex
value array, usually <tt>GL_FLOAT</tt>, <tt>GL_UNSIGNED_BYTE</tt>,
etc. The <i>tupleSize</i> indicates the number of components per
vertex: 1, 2, 3, or 4.</p>
<p>The array will become active when <a href="qglshaderprogram.html#enableAttributeArray">enableAttributeArray</a>()
is called on the <i>location</i>. Otherwise the value specified
with <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>()
for <i>location</i> will be used.</p>
<p>This function was introduced in Qt 4.7.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeArray">setAttributeArray</a>().</p>
<h3 class="fn"><a name="setAttributeBuffer-2" />QGLShaderProgram.setAttributeBuffer (<i>self</i>, str <i>name</i>, int <i>type</i>, int <i>offset</i>, int <i>tupleSize</i>, int <i>stride</i> = 0)</h3><p>This is an overloaded function.</p>
<p>Sets an array of vertex values on the attribute called
<i>name</i> in this shader program, starting at a specific
<i>offset</i> in the currently bound vertex buffer. The
<i>stride</i> indicates the number of bytes between vertices. A
default <i>stride</i> value of zero indicates that the vertices are
densely packed in the value array.</p>
<p>The <i>type</i> indicates the type of elements in the vertex
value array, usually <tt>GL_FLOAT</tt>, <tt>GL_UNSIGNED_BYTE</tt>,
etc. The <i>tupleSize</i> indicates the number of components per
vertex: 1, 2, 3, or 4.</p>
<p>The array will become active when <a href="qglshaderprogram.html#enableAttributeArray">enableAttributeArray</a>()
is called on the <i>name</i>. Otherwise the value specified with
<a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>()
for <i>name</i> will be used.</p>
<p>This function was introduced in Qt 4.7.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeArray">setAttributeArray</a>().</p>
<h3 class="fn"><a name="setAttributeValue" />QGLShaderProgram.setAttributeValue (<i>self</i>, int <i>location</i>, float <i>value</i>)</h3><p>Sets the attribute at <i>location</i> in the current context to
<i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setUniformValue">setUniformValue</a>().</p>
<h3 class="fn"><a name="setAttributeValue-2" />QGLShaderProgram.setAttributeValue (<i>self</i>, int <i>location</i>, float <i>x</i>, float <i>y</i>)</h3><p>Sets the attribute at <i>location</i> in the current context to
the 2D vector (<i>x</i>, <i>y</i>).</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setUniformValue">setUniformValue</a>().</p>
<h3 class="fn"><a name="setAttributeValue-3" />QGLShaderProgram.setAttributeValue (<i>self</i>, int <i>location</i>, float <i>x</i>, float <i>y</i>, float <i>z</i>)</h3><p>Sets the attribute at <i>location</i> in the current context to
the 3D vector (<i>x</i>, <i>y</i>, <i>z</i>).</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setUniformValue">setUniformValue</a>().</p>
<h3 class="fn"><a name="setAttributeValue-4" />QGLShaderProgram.setAttributeValue (<i>self</i>, int <i>location</i>, float <i>x</i>, float <i>y</i>, float <i>z</i>, float <i>w</i>)</h3><p>Sets the attribute at <i>location</i> in the current context to
the 4D vector (<i>x</i>, <i>y</i>, <i>z</i>, <i>w</i>).</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setUniformValue">setUniformValue</a>().</p>
<h3 class="fn"><a name="setAttributeValue-5" />QGLShaderProgram.setAttributeValue (<i>self</i>, int <i>location</i>, <a href="qvector2d.html">QVector2D</a> <i>value</i>)</h3><p>Sets the attribute at <i>location</i> in the current context to
<i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setUniformValue">setUniformValue</a>().</p>
<h3 class="fn"><a name="setAttributeValue-6" />QGLShaderProgram.setAttributeValue (<i>self</i>, int <i>location</i>, <a href="qvector3d.html">QVector3D</a> <i>value</i>)</h3><p>Sets the attribute at <i>location</i> in the current context to
<i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setUniformValue">setUniformValue</a>().</p>
<h3 class="fn"><a name="setAttributeValue-7" />QGLShaderProgram.setAttributeValue (<i>self</i>, int <i>location</i>, <a href="qvector4d.html">QVector4D</a> <i>value</i>)</h3><p>Sets the attribute at <i>location</i> in the current context to
<i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setUniformValue">setUniformValue</a>().</p>
<h3 class="fn"><a name="setAttributeValue-8" />QGLShaderProgram.setAttributeValue (<i>self</i>, int <i>location</i>, <a href="qcolor.html">QColor</a> <i>value</i>)</h3><p>Sets the attribute at <i>location</i> in the current context to
<i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setUniformValue">setUniformValue</a>().</p>
<h3 class="fn"><a name="setAttributeValue-9" />QGLShaderProgram.setAttributeValue (<i>self</i>, str <i>name</i>, float <i>value</i>)</h3><p>Sets the attribute at <i>location</i> in the current context to
the contents of <i>values</i>, which contains <i>columns</i>
elements, each consisting of <i>rows</i> elements. The <i>rows</i>
value should be 1, 2, 3, or 4. This function is typically used to
set matrix values and column vectors.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setUniformValue">setUniformValue</a>().</p>
<h3 class="fn"><a name="setAttributeValue-10" />QGLShaderProgram.setAttributeValue (<i>self</i>, str <i>name</i>, float <i>x</i>, float <i>y</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the attribute called <i>name</i> in the current context to
<i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setUniformValue">setUniformValue</a>().</p>
<h3 class="fn"><a name="setAttributeValue-11" />QGLShaderProgram.setAttributeValue (<i>self</i>, str <i>name</i>, float <i>x</i>, float <i>y</i>, float <i>z</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the attribute called <i>name</i> in the current context to
the 2D vector (<i>x</i>, <i>y</i>).</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setUniformValue">setUniformValue</a>().</p>
<h3 class="fn"><a name="setAttributeValue-12" />QGLShaderProgram.setAttributeValue (<i>self</i>, str <i>name</i>, float <i>x</i>, float <i>y</i>, float <i>z</i>, float <i>w</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the attribute called <i>name</i> in the current context to
the 3D vector (<i>x</i>, <i>y</i>, <i>z</i>).</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setUniformValue">setUniformValue</a>().</p>
<h3 class="fn"><a name="setAttributeValue-13" />QGLShaderProgram.setAttributeValue (<i>self</i>, str <i>name</i>, <a href="qvector2d.html">QVector2D</a> <i>value</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the attribute called <i>name</i> in the current context to
the 4D vector (<i>x</i>, <i>y</i>, <i>z</i>, <i>w</i>).</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setUniformValue">setUniformValue</a>().</p>
<h3 class="fn"><a name="setAttributeValue-14" />QGLShaderProgram.setAttributeValue (<i>self</i>, str <i>name</i>, <a href="qvector3d.html">QVector3D</a> <i>value</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the attribute called <i>name</i> in the current context to
<i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setUniformValue">setUniformValue</a>().</p>
<h3 class="fn"><a name="setAttributeValue-15" />QGLShaderProgram.setAttributeValue (<i>self</i>, str <i>name</i>, <a href="qvector4d.html">QVector4D</a> <i>value</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the attribute called <i>name</i> in the current context to
<i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setUniformValue">setUniformValue</a>().</p>
<h3 class="fn"><a name="setAttributeValue-16" />QGLShaderProgram.setAttributeValue (<i>self</i>, str <i>name</i>, <a href="qcolor.html">QColor</a> <i>value</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the attribute called <i>name</i> in the current context to
<i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setUniformValue">setUniformValue</a>().</p>
<h3 class="fn"><a name="setGeometryInputType" />QGLShaderProgram.setGeometryInputType (<i>self</i>, int <i>inputType</i>)</h3><p>Sets the input type from <i>inputType</i>.</p>
<p>This parameter takes effect the next time the program is
linked.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#geometryInputType">geometryInputType</a>().</p>
<h3 class="fn"><a name="setGeometryOutputType" />QGLShaderProgram.setGeometryOutputType (<i>self</i>, int <i>outputType</i>)</h3><p>Sets the output type from the geometry shader, if active, to
<i>outputType</i>.</p>
<p>This parameter takes effect the next time the program is
linked.</p>
<p>This function was introduced in Qt 4.7.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#geometryOutputType">geometryOutputType</a>().</p>
<h3 class="fn"><a name="setGeometryOutputVertexCount" />QGLShaderProgram.setGeometryOutputVertexCount (<i>self</i>, int <i>count</i>)</h3><p>Sets the maximum number of vertices the current geometry shader
program will produce, if active, to <i>count</i>.</p>
<p>This parameter takes effect the next time the program is
linked.</p>
<p>This function was introduced in Qt 4.7.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#geometryOutputVertexCount">geometryOutputVertexCount</a>().</p>
<h3 class="fn"><a name="setUniformValue" />QGLShaderProgram.setUniformValue (<i>self</i>, int <i>location</i>, int <i>value</i>)</h3><p>Sets the uniform variable at <i>location</i> in the current
context to <i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-2" />QGLShaderProgram.setUniformValue (<i>self</i>, int <i>location</i>, float <i>value</i>)</h3><p>Sets the uniform variable at <i>location</i> in the current
context to <i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-3" />QGLShaderProgram.setUniformValue (<i>self</i>, int <i>location</i>, float <i>x</i>, float <i>y</i>)</h3><p>Sets the uniform variable at <i>location</i> in the current
context to <i>value</i>. This function should be used when setting
sampler values.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-4" />QGLShaderProgram.setUniformValue (<i>self</i>, int <i>location</i>, float <i>x</i>, float <i>y</i>, float <i>z</i>)</h3><p>Sets the uniform variable at <i>location</i> in the current
context to the 2D vector (<i>x</i>, <i>y</i>).</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-5" />QGLShaderProgram.setUniformValue (<i>self</i>, int <i>location</i>, float <i>x</i>, float <i>y</i>, float <i>z</i>, float <i>w</i>)</h3><p>Sets the uniform variable at <i>location</i> in the current
context to the 3D vector (<i>x</i>, <i>y</i>, <i>z</i>).</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-6" />QGLShaderProgram.setUniformValue (<i>self</i>, int <i>location</i>, <a href="qvector2d.html">QVector2D</a> <i>value</i>)</h3><p>Sets the uniform variable at <i>location</i> in the current
context to the 4D vector (<i>x</i>, <i>y</i>, <i>z</i>,
<i>w</i>).</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-7" />QGLShaderProgram.setUniformValue (<i>self</i>, int <i>location</i>, <a href="qvector3d.html">QVector3D</a> <i>value</i>)</h3><p>Sets the uniform variable at <i>location</i> in the current
context to <i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-8" />QGLShaderProgram.setUniformValue (<i>self</i>, int <i>location</i>, <a href="qvector4d.html">QVector4D</a> <i>value</i>)</h3><p>Sets the uniform variable at <i>location</i> in the current
context to <i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-9" />QGLShaderProgram.setUniformValue (<i>self</i>, int <i>location</i>, <a href="qcolor.html">QColor</a> <i>color</i>)</h3><p>Sets the uniform variable at <i>location</i> in the current
context to <i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-10" />QGLShaderProgram.setUniformValue (<i>self</i>, int <i>location</i>, <a href="qpoint.html">QPoint</a> <i>point</i>)</h3><p>Sets the uniform variable at <i>location</i> in the current
context to the red, green, blue, and alpha components of
<i>color</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-11" />QGLShaderProgram.setUniformValue (<i>self</i>, int <i>location</i>, <a href="qpointf.html">QPointF</a> <i>point</i>)</h3><p>Sets the uniform variable at <i>location</i> in the current
context to the x and y coordinates of <i>point</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-12" />QGLShaderProgram.setUniformValue (<i>self</i>, int <i>location</i>, <a href="qsize.html">QSize</a> <i>size</i>)</h3><p>Sets the uniform variable at <i>location</i> in the current
context to the x and y coordinates of <i>point</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-13" />QGLShaderProgram.setUniformValue (<i>self</i>, int <i>location</i>, <a href="qsizef.html">QSizeF</a> <i>size</i>)</h3><p>Sets the uniform variable at <i>location</i> in the current
context to the width and height of the given <i>size</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-14" />QGLShaderProgram.setUniformValue (<i>self</i>, int <i>location</i>, <a href="qmatrix2x2.html">QMatrix2x2</a> <i>value</i>)</h3><p>Sets the uniform variable at <i>location</i> in the current
context to the width and height of the given <i>size</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-15" />QGLShaderProgram.setUniformValue (<i>self</i>, int <i>location</i>, <a href="qmatrix2x3.html">QMatrix2x3</a> <i>value</i>)</h3><p>Sets the uniform variable at <i>location</i> in the current
context to a 2x2 matrix <i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-16" />QGLShaderProgram.setUniformValue (<i>self</i>, int <i>location</i>, <a href="qmatrix2x4.html">QMatrix2x4</a> <i>value</i>)</h3><p>Sets the uniform variable at <i>location</i> in the current
context to a 2x3 matrix <i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-17" />QGLShaderProgram.setUniformValue (<i>self</i>, int <i>location</i>, <a href="qmatrix3x2.html">QMatrix3x2</a> <i>value</i>)</h3><p>Sets the uniform variable at <i>location</i> in the current
context to a 2x4 matrix <i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-18" />QGLShaderProgram.setUniformValue (<i>self</i>, int <i>location</i>, <a href="qmatrix3x3.html">QMatrix3x3</a> <i>value</i>)</h3><p>Sets the uniform variable at <i>location</i> in the current
context to a 3x2 matrix <i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-19" />QGLShaderProgram.setUniformValue (<i>self</i>, int <i>location</i>, <a href="qmatrix3x4.html">QMatrix3x4</a> <i>value</i>)</h3><p>Sets the uniform variable at <i>location</i> in the current
context to a 3x3 matrix <i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-20" />QGLShaderProgram.setUniformValue (<i>self</i>, int <i>location</i>, <a href="qmatrix4x2.html">QMatrix4x2</a> <i>value</i>)</h3><p>Sets the uniform variable at <i>location</i> in the current
context to a 3x4 matrix <i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-21" />QGLShaderProgram.setUniformValue (<i>self</i>, int <i>location</i>, <a href="qmatrix4x3.html">QMatrix4x3</a> <i>value</i>)</h3><p>Sets the uniform variable at <i>location</i> in the current
context to a 4x2 matrix <i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-22" />QGLShaderProgram.setUniformValue (<i>self</i>, int <i>location</i>, <a href="qmatrix4x4.html">QMatrix4x4</a> <i>value</i>)</h3><p>Sets the uniform variable at <i>location</i> in the current
context to a 4x3 matrix <i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-23" />QGLShaderProgram.setUniformValue (<i>self</i>, int <i>location</i>, <a href="qtransform.html">QTransform</a> <i>value</i>)</h3><p>Sets the uniform variable at <i>location</i> in the current
context to a 4x4 matrix <i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-24" />QGLShaderProgram.setUniformValue (<i>self</i>, str <i>name</i>, int <i>value</i>)</h3><p>Sets the uniform variable at <i>location</i> in the current
context to a 3x3 transformation matrix <i>value</i> that is
specified as a <a href="qtransform.html">QTransform</a> value.</p>
<p>To set a <a href="qtransform.html">QTransform</a> value as a 4x4
matrix in a shader, use <tt>setUniformValue(location,
QMatrix4x4(value))</tt>.</p>
<h3 class="fn"><a name="setUniformValue-25" />QGLShaderProgram.setUniformValue (<i>self</i>, str <i>name</i>, float <i>value</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the uniform variable called <i>name</i> in the current
context to <i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-26" />QGLShaderProgram.setUniformValue (<i>self</i>, str <i>name</i>, float <i>x</i>, float <i>y</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the uniform variable called <i>name</i> in the current
context to <i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-27" />QGLShaderProgram.setUniformValue (<i>self</i>, str <i>name</i>, float <i>x</i>, float <i>y</i>, float <i>z</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the uniform variable called <i>name</i> in the current
context to <i>value</i>. This function should be used when setting
sampler values.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-28" />QGLShaderProgram.setUniformValue (<i>self</i>, str <i>name</i>, float <i>x</i>, float <i>y</i>, float <i>z</i>, float <i>w</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the uniform variable called <i>name</i> in the current
context to the 2D vector (<i>x</i>, <i>y</i>).</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-29" />QGLShaderProgram.setUniformValue (<i>self</i>, str <i>name</i>, <a href="qvector2d.html">QVector2D</a> <i>value</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the uniform variable called <i>name</i> in the current
context to the 3D vector (<i>x</i>, <i>y</i>, <i>z</i>).</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-30" />QGLShaderProgram.setUniformValue (<i>self</i>, str <i>name</i>, <a href="qvector3d.html">QVector3D</a> <i>value</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the uniform variable called <i>name</i> in the current
context to the 4D vector (<i>x</i>, <i>y</i>, <i>z</i>,
<i>w</i>).</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-31" />QGLShaderProgram.setUniformValue (<i>self</i>, str <i>name</i>, <a href="qvector4d.html">QVector4D</a> <i>value</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the uniform variable called <i>name</i> in the current
context to <i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-32" />QGLShaderProgram.setUniformValue (<i>self</i>, str <i>name</i>, <a href="qcolor.html">QColor</a> <i>color</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the uniform variable called <i>name</i> in the current
context to <i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-33" />QGLShaderProgram.setUniformValue (<i>self</i>, str <i>name</i>, <a href="qpoint.html">QPoint</a> <i>point</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the uniform variable called <i>name</i> in the current
context to <i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-34" />QGLShaderProgram.setUniformValue (<i>self</i>, str <i>name</i>, <a href="qpointf.html">QPointF</a> <i>point</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the uniform variable called <i>name</i> in the current
context to the red, green, blue, and alpha components of
<i>color</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-35" />QGLShaderProgram.setUniformValue (<i>self</i>, str <i>name</i>, <a href="qsize.html">QSize</a> <i>size</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the uniform variable associated with <i>name</i> in the
current context to the x and y coordinates of <i>point</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-36" />QGLShaderProgram.setUniformValue (<i>self</i>, str <i>name</i>, <a href="qsizef.html">QSizeF</a> <i>size</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the uniform variable associated with <i>name</i> in the
current context to the x and y coordinates of <i>point</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-37" />QGLShaderProgram.setUniformValue (<i>self</i>, str <i>name</i>, <a href="qmatrix2x2.html">QMatrix2x2</a> <i>value</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the uniform variable associated with <i>name</i> in the
current context to the width and height of the given
<i>size</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-38" />QGLShaderProgram.setUniformValue (<i>self</i>, str <i>name</i>, <a href="qmatrix2x3.html">QMatrix2x3</a> <i>value</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the uniform variable associated with <i>name</i> in the
current context to the width and height of the given
<i>size</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-39" />QGLShaderProgram.setUniformValue (<i>self</i>, str <i>name</i>, <a href="qmatrix2x4.html">QMatrix2x4</a> <i>value</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the uniform variable called <i>name</i> in the current
context to a 2x2 matrix <i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-40" />QGLShaderProgram.setUniformValue (<i>self</i>, str <i>name</i>, <a href="qmatrix3x2.html">QMatrix3x2</a> <i>value</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the uniform variable called <i>name</i> in the current
context to a 2x3 matrix <i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-41" />QGLShaderProgram.setUniformValue (<i>self</i>, str <i>name</i>, <a href="qmatrix3x3.html">QMatrix3x3</a> <i>value</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the uniform variable called <i>name</i> in the current
context to a 2x4 matrix <i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-42" />QGLShaderProgram.setUniformValue (<i>self</i>, str <i>name</i>, <a href="qmatrix3x4.html">QMatrix3x4</a> <i>value</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the uniform variable called <i>name</i> in the current
context to a 3x2 matrix <i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-43" />QGLShaderProgram.setUniformValue (<i>self</i>, str <i>name</i>, <a href="qmatrix4x2.html">QMatrix4x2</a> <i>value</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the uniform variable called <i>name</i> in the current
context to a 3x3 matrix <i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-44" />QGLShaderProgram.setUniformValue (<i>self</i>, str <i>name</i>, <a href="qmatrix4x3.html">QMatrix4x3</a> <i>value</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the uniform variable called <i>name</i> in the current
context to a 3x4 matrix <i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-45" />QGLShaderProgram.setUniformValue (<i>self</i>, str <i>name</i>, <a href="qmatrix4x4.html">QMatrix4x4</a> <i>value</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the uniform variable called <i>name</i> in the current
context to a 4x2 matrix <i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValue-46" />QGLShaderProgram.setUniformValue (<i>self</i>, str <i>name</i>, <a href="qtransform.html">QTransform</a> <i>value</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the uniform variable called <i>name</i> in the current
context to a 4x3 matrix <i>value</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValueArray" />QGLShaderProgram.setUniformValueArray (<i>self</i>, int <i>location</i>, object <i>values</i>)</h3><p>Sets the uniform variable array at <i>location</i> in the
current context to the <i>count</i> elements of <i>values</i>. Each
element has <i>tupleSize</i> components. The <i>tupleSize</i> must
be 1, 2, 3, or 4.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="setUniformValueArray-2" />QGLShaderProgram.setUniformValueArray (<i>self</i>, str <i>name</i>, object <i>values</i>)</h3><p>Sets the uniform variable array at <i>location</i> in the
current context to the <i>count</i> elements of <i>values</i>.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#setAttributeValue">setAttributeValue</a>().</p>
<h3 class="fn"><a name="shaders" />unknown-type QGLShaderProgram.shaders (<i>self</i>)</h3><p>Returns a list of all shaders that have been added to this
shader program using <a href="qglshaderprogram.html#addShader">addShader</a>().</p>
<p><b>See also</b> <a href="qglshaderprogram.html#addShader">addShader</a>() and <a href="qglshaderprogram.html#removeShader">removeShader</a>().</p>
<h3 class="fn"><a name="uniformLocation" />int QGLShaderProgram.uniformLocation (<i>self</i>, <a href="qbytearray.html">QByteArray</a> <i>name</i>)</h3><p>Returns the location of the uniform variable <i>name</i> within
this shader program's parameter list. Returns -1 if <i>name</i> is
not a valid uniform variable for this shader program.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#attributeLocation">attributeLocation</a>().</p>
<h3 class="fn"><a name="uniformLocation-2" />int QGLShaderProgram.uniformLocation (<i>self</i>, QString <i>name</i>)</h3><p>This is an overloaded function.</p>
<p>Returns the location of the uniform variable <i>name</i> within
this shader program's parameter list. Returns -1 if <i>name</i> is
not a valid uniform variable for this shader program.</p>
<p><b>See also</b> <a href="qglshaderprogram.html#attributeLocation">attributeLocation</a>().</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.12.1 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qt.io">The Qt Company</a> 2015</td><td align="right" width="25%">Qt 4.8.7</td></tr></table></div></address></body></html>
|