summaryrefslogtreecommitdiff
path: root/libghack/CSFML-2.1-windows-64bits/CSFML-2.1/doc/html/Shader_8h.htm
blob: 4b3f24449f5a9d9648cfaa71a8a67efef862a4f5 (plain)
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>CSFML - C binding of the Simple and Fast Multimedia Library</title>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
        <!--<link rel='stylesheet' type='text/css' href="http://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>-->
        <link rel="stylesheet" type="text/css" href="doxygen.css" title="default" media="screen,print" />
    </head>
    <body>
        <div id="banner-container">
            <div id="banner">
                <span id="sfml">CSFML</span>
            </div>
        </div>
        <div id="content">
<!-- Generated by Doxygen 1.8.2 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.htm"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.htm"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.htm"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.htm"><span>File&#160;List</span></a></li>
      <li><a href="globals.htm"><span>Globals</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_6a66b7969672f1da69f458a57d2c97f9.htm">include</a></li><li class="navelem"><a class="el" href="dir_8cc999c03ab8fdf40558b1f21f869c3e.htm">SFML</a></li><li class="navelem"><a class="el" href="dir_513183d162d70e825c1ac102f07bf6df.htm">Graphics</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Shader.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;<a class="el" href="Graphics_2Export_8h_source.htm">SFML/Graphics/Export.h</a>&gt;</code><br/>
<code>#include &lt;<a class="el" href="Color_8h_source.htm">SFML/Graphics/Color.h</a>&gt;</code><br/>
<code>#include &lt;<a class="el" href="Transform_8h_source.htm">SFML/Graphics/Transform.h</a>&gt;</code><br/>
<code>#include &lt;<a class="el" href="Graphics_2Types_8h_source.htm">SFML/Graphics/Types.h</a>&gt;</code><br/>
<code>#include &lt;<a class="el" href="InputStream_8h_source.htm">SFML/System/InputStream.h</a>&gt;</code><br/>
<code>#include &lt;<a class="el" href="Vector2_8h_source.htm">SFML/System/Vector2.h</a>&gt;</code><br/>
<code>#include &lt;<a class="el" href="Vector3_8h_source.htm">SFML/System/Vector3.h</a>&gt;</code><br/>
</div>
<p><a href="Shader_8h_source.htm">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a10bdc71be35779eae268a47f82641ef2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> <a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Shader_8h.htm#a10bdc71be35779eae268a47f82641ef2">sfShader_createFromFile</a> (const char *vertexShaderFilename, const char *fragmentShaderFilename)</td></tr>
<tr class="memdesc:a10bdc71be35779eae268a47f82641ef2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load both the vertex and fragment shaders from files.  <a href="#a10bdc71be35779eae268a47f82641ef2"></a><br/></td></tr>
<tr class="separator:a10bdc71be35779eae268a47f82641ef2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b50ffaf819e672dcf93bf09a981bdc3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> <a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Shader_8h.htm#a5b50ffaf819e672dcf93bf09a981bdc3">sfShader_createFromMemory</a> (const char *vertexShader, const char *fragmentShader)</td></tr>
<tr class="memdesc:a5b50ffaf819e672dcf93bf09a981bdc3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load both the vertex and fragment shaders from source codes in memory.  <a href="#a5b50ffaf819e672dcf93bf09a981bdc3"></a><br/></td></tr>
<tr class="separator:a5b50ffaf819e672dcf93bf09a981bdc3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae391e3bb2c315458fb03052b29496c0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> <a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Shader_8h.htm#aae391e3bb2c315458fb03052b29496c0">sfShader_createFromStream</a> (<a class="el" href="structsfInputStream.htm">sfInputStream</a> *vertexShaderStream, <a class="el" href="structsfInputStream.htm">sfInputStream</a> *fragmentShaderStream)</td></tr>
<tr class="memdesc:aae391e3bb2c315458fb03052b29496c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load both the vertex and fragment shaders from custom streams.  <a href="#aae391e3bb2c315458fb03052b29496c0"></a><br/></td></tr>
<tr class="separator:aae391e3bb2c315458fb03052b29496c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a52b589679d49020c4119d90d16128e00"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Shader_8h.htm#a52b589679d49020c4119d90d16128e00">sfShader_destroy</a> (<a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *shader)</td></tr>
<tr class="memdesc:a52b589679d49020c4119d90d16128e00"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy an existing shader.  <a href="#a52b589679d49020c4119d90d16128e00"></a><br/></td></tr>
<tr class="separator:a52b589679d49020c4119d90d16128e00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed732f598ff18f1c4064a182b8f85606"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Shader_8h.htm#aed732f598ff18f1c4064a182b8f85606">sfShader_setFloatParameter</a> (<a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *shader, const char *name, float x)</td></tr>
<tr class="memdesc:aed732f598ff18f1c4064a182b8f85606"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change a float parameter of a shader.  <a href="#aed732f598ff18f1c4064a182b8f85606"></a><br/></td></tr>
<tr class="separator:aed732f598ff18f1c4064a182b8f85606"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aead3624797fa1d203fe26b830d00c78c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Shader_8h.htm#aead3624797fa1d203fe26b830d00c78c">sfShader_setFloat2Parameter</a> (<a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *shader, const char *name, float x, float y)</td></tr>
<tr class="memdesc:aead3624797fa1d203fe26b830d00c78c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change a 2-components vector parameter of a shader.  <a href="#aead3624797fa1d203fe26b830d00c78c"></a><br/></td></tr>
<tr class="separator:aead3624797fa1d203fe26b830d00c78c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a06bcfbe44258e5b7492d9f0cb17ea48c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Shader_8h.htm#a06bcfbe44258e5b7492d9f0cb17ea48c">sfShader_setFloat3Parameter</a> (<a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *shader, const char *name, float x, float y, float z)</td></tr>
<tr class="memdesc:a06bcfbe44258e5b7492d9f0cb17ea48c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change a 3-components vector parameter of a shader.  <a href="#a06bcfbe44258e5b7492d9f0cb17ea48c"></a><br/></td></tr>
<tr class="separator:a06bcfbe44258e5b7492d9f0cb17ea48c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92a5e1f0fecef1e5f130f6364cfa90d9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Shader_8h.htm#a92a5e1f0fecef1e5f130f6364cfa90d9">sfShader_setFloat4Parameter</a> (<a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *shader, const char *name, float x, float y, float z, float w)</td></tr>
<tr class="memdesc:a92a5e1f0fecef1e5f130f6364cfa90d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change a 4-components vector parameter of a shader.  <a href="#a92a5e1f0fecef1e5f130f6364cfa90d9"></a><br/></td></tr>
<tr class="separator:a92a5e1f0fecef1e5f130f6364cfa90d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46786b0c9f2b5e2486058521f3f11075"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Shader_8h.htm#a46786b0c9f2b5e2486058521f3f11075">sfShader_setVector2Parameter</a> (<a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *shader, const char *name, <a class="el" href="structsfVector2f.htm">sfVector2f</a> vector)</td></tr>
<tr class="memdesc:a46786b0c9f2b5e2486058521f3f11075"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change a 2-components vector parameter of a shader.  <a href="#a46786b0c9f2b5e2486058521f3f11075"></a><br/></td></tr>
<tr class="separator:a46786b0c9f2b5e2486058521f3f11075"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04029e0ce58c0ba60df21083a3fcd6b3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Shader_8h.htm#a04029e0ce58c0ba60df21083a3fcd6b3">sfShader_setVector3Parameter</a> (<a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *shader, const char *name, <a class="el" href="structsfVector3f.htm">sfVector3f</a> vector)</td></tr>
<tr class="memdesc:a04029e0ce58c0ba60df21083a3fcd6b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change a 3-components vector parameter of a shader.  <a href="#a04029e0ce58c0ba60df21083a3fcd6b3"></a><br/></td></tr>
<tr class="separator:a04029e0ce58c0ba60df21083a3fcd6b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0963517d8815f0948e476abca60a190f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Shader_8h.htm#a0963517d8815f0948e476abca60a190f">sfShader_setColorParameter</a> (<a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *shader, const char *name, <a class="el" href="structsfColor.htm">sfColor</a> color)</td></tr>
<tr class="memdesc:a0963517d8815f0948e476abca60a190f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change a color parameter of a shader.  <a href="#a0963517d8815f0948e476abca60a190f"></a><br/></td></tr>
<tr class="separator:a0963517d8815f0948e476abca60a190f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a677b43325bf4c94bcc57ea6a4f38b40f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Shader_8h.htm#a677b43325bf4c94bcc57ea6a4f38b40f">sfShader_setTransformParameter</a> (<a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *shader, const char *name, <a class="el" href="structsfTransform.htm">sfTransform</a> transform)</td></tr>
<tr class="memdesc:a677b43325bf4c94bcc57ea6a4f38b40f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change a matrix parameter of a shader.  <a href="#a677b43325bf4c94bcc57ea6a4f38b40f"></a><br/></td></tr>
<tr class="separator:a677b43325bf4c94bcc57ea6a4f38b40f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab2cc74edc4d481029482a75f59016a52"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Shader_8h.htm#ab2cc74edc4d481029482a75f59016a52">sfShader_setTextureParameter</a> (<a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *shader, const char *name, const <a class="el" href="Graphics_2Types_8h.htm#a6d67907b5f2240f6ab5efc062aca61b0">sfTexture</a> *texture)</td></tr>
<tr class="memdesc:ab2cc74edc4d481029482a75f59016a52"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change a texture parameter of a shader.  <a href="#ab2cc74edc4d481029482a75f59016a52"></a><br/></td></tr>
<tr class="separator:ab2cc74edc4d481029482a75f59016a52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae52805b872438a6d78b30197e934207b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Shader_8h.htm#ae52805b872438a6d78b30197e934207b">sfShader_setCurrentTextureParameter</a> (<a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *shader, const char *name)</td></tr>
<tr class="memdesc:ae52805b872438a6d78b30197e934207b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change a texture parameter of a shader.  <a href="#ae52805b872438a6d78b30197e934207b"></a><br/></td></tr>
<tr class="separator:ae52805b872438a6d78b30197e934207b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6d8d66413429e558d78386ab3fa0c6f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Shader_8h.htm#aa6d8d66413429e558d78386ab3fa0c6f">sfShader_bind</a> (const <a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *shader)</td></tr>
<tr class="memdesc:aa6d8d66413429e558d78386ab3fa0c6f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bind a shader for rendering (activate it)  <a href="#aa6d8d66413429e558d78386ab3fa0c6f"></a><br/></td></tr>
<tr class="separator:aa6d8d66413429e558d78386ab3fa0c6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aafdd81d0cd4b5587a948136e83469805"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> <a class="el" href="Config_8h.htm#a7559f07a31bb3a4a3d865178ce4dc70b">sfBool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Shader_8h.htm#aafdd81d0cd4b5587a948136e83469805">sfShader_isAvailable</a> (void)</td></tr>
<tr class="memdesc:aafdd81d0cd4b5587a948136e83469805"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tell whether or not the system supports shaders.  <a href="#aafdd81d0cd4b5587a948136e83469805"></a><br/></td></tr>
<tr class="separator:aafdd81d0cd4b5587a948136e83469805"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="aa6d8d66413429e558d78386ab3fa0c6f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> void sfShader_bind </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *&#160;</td>
          <td class="paramname"><em>shader</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Bind a shader for rendering (activate it) </p>
<p>This function is not part of the graphics API, it mustn't be used when drawing SFML entities. It must be used only if you mix sfShader with OpenGL code.</p>
<div class="fragment"><div class="line"><a class="code" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *s1, *s2;</div>
<div class="line">...</div>
<div class="line">sfShader_bind(s1);</div>
<div class="line"><span class="comment">// draw OpenGL stuff that use s1...</span></div>
<div class="line"><a class="code" href="Shader_8h.htm#aa6d8d66413429e558d78386ab3fa0c6f" title="Bind a shader for rendering (activate it)">sfShader_bind</a>(s2);</div>
<div class="line"><span class="comment">// draw OpenGL stuff that use s2...</span></div>
<div class="line"><a class="code" href="Shader_8h.htm#aa6d8d66413429e558d78386ab3fa0c6f" title="Bind a shader for rendering (activate it)">sfShader_bind</a>(0);</div>
<div class="line"><span class="comment">// draw OpenGL stuff that use no shader...</span></div>
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">shader</td><td>Shader to bind, can be null to use no shader </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a10bdc71be35779eae268a47f82641ef2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> <a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a>* sfShader_createFromFile </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>vertexShaderFilename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>fragmentShaderFilename</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Load both the vertex and fragment shaders from files. </p>
<p>This function can load both the vertex and the fragment shaders, or only one of them: pass NULL if you don't want to load either the vertex shader or the fragment shader. The sources must be text files containing valid shaders in GLSL language. GLSL is a C-like language dedicated to OpenGL shaders; you'll probably need to read a good documentation for it before writing your own shaders.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">vertexShaderFilename</td><td>Path of the vertex shader file to load, or NULL to skip this shader </td></tr>
    <tr><td class="paramname">fragmentShaderFilename</td><td>Path of the fragment shader file to load, or NULL to skip this shader</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A new sfShader object, or NULL if it failed </dd></dl>

</div>
</div>
<a class="anchor" id="a5b50ffaf819e672dcf93bf09a981bdc3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> <a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a>* sfShader_createFromMemory </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>vertexShader</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>fragmentShader</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Load both the vertex and fragment shaders from source codes in memory. </p>
<p>This function can load both the vertex and the fragment shaders, or only one of them: pass NULL if you don't want to load either the vertex shader or the fragment shader. The sources must be valid shaders in GLSL language. GLSL is a C-like language dedicated to OpenGL shaders; you'll probably need to read a good documentation for it before writing your own shaders.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">vertexShader</td><td>String containing the source code of the vertex shader, or NULL to skip this shader </td></tr>
    <tr><td class="paramname">fragmentShader</td><td>String containing the source code of the fragment shader, or NULL to skip this shader</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A new sfShader object, or NULL if it failed </dd></dl>

</div>
</div>
<a class="anchor" id="aae391e3bb2c315458fb03052b29496c0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> <a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a>* sfShader_createFromStream </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsfInputStream.htm">sfInputStream</a> *&#160;</td>
          <td class="paramname"><em>vertexShaderStream</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structsfInputStream.htm">sfInputStream</a> *&#160;</td>
          <td class="paramname"><em>fragmentShaderStream</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Load both the vertex and fragment shaders from custom streams. </p>
<p>This function can load both the vertex and the fragment shaders, or only one of them: pass NULL if you don't want to load either the vertex shader or the fragment shader. The source codes must be valid shaders in GLSL language. GLSL is a C-like language dedicated to OpenGL shaders; you'll probably need to read a good documentation for it before writing your own shaders.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">vertexShaderStream</td><td>Source stream to read the vertex shader from, or NULL to skip this shader </td></tr>
    <tr><td class="paramname">fragmentShaderStream</td><td>Source stream to read the fragment shader from, or NULL to skip this shader</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A new sfShader object, or NULL if it failed </dd></dl>

</div>
</div>
<a class="anchor" id="a52b589679d49020c4119d90d16128e00"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> void sfShader_destroy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *&#160;</td>
          <td class="paramname"><em>shader</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Destroy an existing shader. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">shader</td><td>Shader to delete </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aafdd81d0cd4b5587a948136e83469805"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> <a class="el" href="Config_8h.htm#a7559f07a31bb3a4a3d865178ce4dc70b">sfBool</a> sfShader_isAvailable </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Tell whether or not the system supports shaders. </p>
<p>This function should always be called before using the shader features. If it returns false, then any attempt to use sfShader will fail.</p>
<dl class="section return"><dt>Returns</dt><dd>sfTrue if the system can use shaders, sfFalse otherwise </dd></dl>

</div>
</div>
<a class="anchor" id="a0963517d8815f0948e476abca60a190f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> void sfShader_setColorParameter </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *&#160;</td>
          <td class="paramname"><em>shader</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structsfColor.htm">sfColor</a>&#160;</td>
          <td class="paramname"><em>color</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Change a color parameter of a shader. </p>
<p><em>name</em> is the name of the variable to change in the shader. The corresponding parameter in the shader must be a 4x1 vector (vec4 GLSL type).</p>
<p>It is important to note that the components of the color are normalized before being passed to the shader. Therefore, they are converted from range [0 .. 255] to range [0 .. 1]. For example, a sf::Color(255, 125, 0, 255) will be transformed to a vec4(1.0, 0.5, 0.0, 1.0) in the shader.</p>
<p>Example: </p>
<div class="fragment"><div class="line">uniform vec4 color; <span class="comment">// this is the variable in the shader</span></div>
</div><!-- fragment --> <div class="fragment"><div class="line"><a class="code" href="Shader_8h.htm#a0963517d8815f0948e476abca60a190f" title="Change a color parameter of a shader.">sfShader_setColorParameter</a>(shader, <span class="stringliteral">&quot;color&quot;</span>, <a class="code" href="Color_8h.htm#af2b3b1e686236c2ec4608cd69c5dec77" title="Construct a color from its 3 RGB components.">sfColor_fromRGB</a>(255, 128, 0));</div>
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">shader</td><td>Shader object </td></tr>
    <tr><td class="paramname">name</td><td>Name of the parameter in the shader </td></tr>
    <tr><td class="paramname">color</td><td>Color to assign </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ae52805b872438a6d78b30197e934207b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> void sfShader_setCurrentTextureParameter </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *&#160;</td>
          <td class="paramname"><em>shader</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Change a texture parameter of a shader. </p>
<p>This function maps a shader texture variable to the texture of the object being drawn, which cannot be known in advance. The corresponding parameter in the shader must be a 2D texture (sampler2D GLSL type).</p>
<p>Example: </p>
<div class="fragment"><div class="line">uniform sampler2D current; <span class="comment">// this is the variable in the shader</span></div>
</div><!-- fragment --> <div class="fragment"><div class="line"><a class="code" href="Shader_8h.htm#ae52805b872438a6d78b30197e934207b" title="Change a texture parameter of a shader.">sfShader_setCurrentTextureParameter</a>(shader, <span class="stringliteral">&quot;current&quot;</span>);</div>
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">shader</td><td>Shader object </td></tr>
    <tr><td class="paramname">name</td><td>Name of the texture in the shader </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aead3624797fa1d203fe26b830d00c78c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> void sfShader_setFloat2Parameter </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *&#160;</td>
          <td class="paramname"><em>shader</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Change a 2-components vector parameter of a shader. </p>
<p><em>name</em> is the name of the variable to change in the shader. The corresponding parameter in the shader must be a 2x1 vector (vec2 GLSL type).</p>
<p>Example: </p>
<div class="fragment"><div class="line">uniform vec2 myparam; <span class="comment">// this is the variable in the shader</span></div>
</div><!-- fragment --> <div class="fragment"><div class="line"><a class="code" href="Shader_8h.htm#aead3624797fa1d203fe26b830d00c78c" title="Change a 2-components vector parameter of a shader.">sfShader_setFloat2Parameter</a>(shader, <span class="stringliteral">&quot;myparam&quot;</span>, 5.2f, 6.0f);</div>
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">shader</td><td>Shader object </td></tr>
    <tr><td class="paramname">name</td><td>Name of the parameter in the shader </td></tr>
    <tr><td class="paramname">x</td><td>First component of the value to assign </td></tr>
    <tr><td class="paramname">y</td><td>Second component of the value to assign </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a06bcfbe44258e5b7492d9f0cb17ea48c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> void sfShader_setFloat3Parameter </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *&#160;</td>
          <td class="paramname"><em>shader</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>z</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Change a 3-components vector parameter of a shader. </p>
<p><em>name</em> is the name of the variable to change in the shader. The corresponding parameter in the shader must be a 3x1 vector (vec3 GLSL type).</p>
<p>Example: </p>
<div class="fragment"><div class="line">uniform vec3 myparam; <span class="comment">// this is the variable in the shader</span></div>
</div><!-- fragment --> <div class="fragment"><div class="line"><a class="code" href="Shader_8h.htm#a06bcfbe44258e5b7492d9f0cb17ea48c" title="Change a 3-components vector parameter of a shader.">sfShader_setFloat3Parameter</a>(shader, <span class="stringliteral">&quot;myparam&quot;</span>, 5.2f, 6.0f, -8.1f);</div>
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">shader</td><td>Shader object </td></tr>
    <tr><td class="paramname">name</td><td>Name of the parameter in the shader </td></tr>
    <tr><td class="paramname">x</td><td>First component of the value to assign </td></tr>
    <tr><td class="paramname">y</td><td>Second component of the value to assign </td></tr>
    <tr><td class="paramname">z</td><td>Third component of the value to assign </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a92a5e1f0fecef1e5f130f6364cfa90d9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> void sfShader_setFloat4Parameter </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *&#160;</td>
          <td class="paramname"><em>shader</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>z</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>w</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Change a 4-components vector parameter of a shader. </p>
<p><em>name</em> is the name of the variable to change in the shader. The corresponding parameter in the shader must be a 4x1 vector (vec4 GLSL type).</p>
<p>Example: </p>
<div class="fragment"><div class="line">uniform vec4 myparam; <span class="comment">// this is the variable in the shader</span></div>
</div><!-- fragment --> <div class="fragment"><div class="line"><a class="code" href="Shader_8h.htm#a92a5e1f0fecef1e5f130f6364cfa90d9" title="Change a 4-components vector parameter of a shader.">sfShader_setFloat4Parameter</a>(shader, <span class="stringliteral">&quot;myparam&quot;</span>, 5.2f, 6.0f, -8.1f, 0.4f);</div>
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">shader</td><td>Shader object </td></tr>
    <tr><td class="paramname">name</td><td>Name of the parameter in the shader </td></tr>
    <tr><td class="paramname">x</td><td>First component of the value to assign </td></tr>
    <tr><td class="paramname">y</td><td>Second component of the value to assign </td></tr>
    <tr><td class="paramname">z</td><td>Third component of the value to assign </td></tr>
    <tr><td class="paramname">w</td><td>Fourth component of the value to assign </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aed732f598ff18f1c4064a182b8f85606"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> void sfShader_setFloatParameter </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *&#160;</td>
          <td class="paramname"><em>shader</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>x</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Change a float parameter of a shader. </p>
<p><em>name</em> is the name of the variable to change in the shader. The corresponding parameter in the shader must be a float (float GLSL type).</p>
<p>Example: </p>
<div class="fragment"><div class="line">uniform <span class="keywordtype">float</span> myparam; <span class="comment">// this is the variable in the shader</span></div>
</div><!-- fragment --> <div class="fragment"><div class="line"><a class="code" href="Shader_8h.htm#aed732f598ff18f1c4064a182b8f85606" title="Change a float parameter of a shader.">sfShader_setFloatParameter</a>(shader, <span class="stringliteral">&quot;myparam&quot;</span>, 5.2f);</div>
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">shader</td><td>Shader object </td></tr>
    <tr><td class="paramname">name</td><td>Name of the parameter in the shader </td></tr>
    <tr><td class="paramname">x</td><td>Value to assign </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ab2cc74edc4d481029482a75f59016a52"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> void sfShader_setTextureParameter </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *&#160;</td>
          <td class="paramname"><em>shader</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="Graphics_2Types_8h.htm#a6d67907b5f2240f6ab5efc062aca61b0">sfTexture</a> *&#160;</td>
          <td class="paramname"><em>texture</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Change a texture parameter of a shader. </p>
<p><em>name</em> is the name of the variable to change in the shader. The corresponding parameter in the shader must be a 2D texture (sampler2D GLSL type).</p>
<p>Example: </p>
<div class="fragment"><div class="line">uniform sampler2D the_texture; <span class="comment">// this is the variable in the shader</span></div>
</div><!-- fragment --> <div class="fragment"><div class="line">sf::Texture texture;</div>
<div class="line">...</div>
<div class="line">sfShader_setTextureParameter(shader, <span class="stringliteral">&quot;the_texture&quot;</span>, texture);</div>
</div><!-- fragment --><p> It is important to note that <em>texture</em> must remain alive as long as the shader uses it, no copy is made internally.</p>
<p>To use the texture of the object being draw, which cannot be known in advance, you can use the special function sfShader_setCurrentTextureParameter: </p>
<div class="fragment"><div class="line"><a class="code" href="Shader_8h.htm#ae52805b872438a6d78b30197e934207b" title="Change a texture parameter of a shader.">sfShader_setCurrentTextureParameter</a>(shader, <span class="stringliteral">&quot;the_texture&quot;</span>).</div>
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">shader</td><td>Shader object </td></tr>
    <tr><td class="paramname">name</td><td>Name of the texture in the shader </td></tr>
    <tr><td class="paramname">texture</td><td>Texture to assign </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a677b43325bf4c94bcc57ea6a4f38b40f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> void sfShader_setTransformParameter </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *&#160;</td>
          <td class="paramname"><em>shader</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structsfTransform.htm">sfTransform</a>&#160;</td>
          <td class="paramname"><em>transform</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Change a matrix parameter of a shader. </p>
<p><em>name</em> is the name of the variable to change in the shader. The corresponding parameter in the shader must be a 4x4 matrix (mat4 GLSL type).</p>
<p>Example: </p>
<div class="fragment"><div class="line">uniform mat4 matrix; <span class="comment">// this is the variable in the shader</span></div>
</div><!-- fragment --> <div class="fragment"><div class="line">@todo</div>
<div class="line"><a class="code" href="Shader_8h.htm#a677b43325bf4c94bcc57ea6a4f38b40f" title="Change a matrix parameter of a shader.">sfShader_setTransformParameter</a>(shader, <span class="stringliteral">&quot;matrix&quot;</span>, transform);</div>
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">shader</td><td>Shader object </td></tr>
    <tr><td class="paramname">name</td><td>Name of the parameter in the shader </td></tr>
    <tr><td class="paramname">transform</td><td>Transform to assign </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a46786b0c9f2b5e2486058521f3f11075"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> void sfShader_setVector2Parameter </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *&#160;</td>
          <td class="paramname"><em>shader</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structsfVector2f.htm">sfVector2f</a>&#160;</td>
          <td class="paramname"><em>vector</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Change a 2-components vector parameter of a shader. </p>
<p><em>name</em> is the name of the variable to change in the shader. The corresponding parameter in the shader must be a 2x1 vector (vec2 GLSL type).</p>
<p>Example: </p>
<div class="fragment"><div class="line">uniform vec2 myparam; <span class="comment">// this is the variable in the shader</span></div>
</div><!-- fragment --> <div class="fragment"><div class="line"><a class="code" href="structsfVector2f.htm" title="2-component vector of floats">sfVector2f</a> vec = {5.2f, 6.0f};</div>
<div class="line"><a class="code" href="Shader_8h.htm#a46786b0c9f2b5e2486058521f3f11075" title="Change a 2-components vector parameter of a shader.">sfShader_setVector2Parameter</a>(shader, <span class="stringliteral">&quot;myparam&quot;</span>, vec);</div>
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">shader</td><td>Shader object </td></tr>
    <tr><td class="paramname">name</td><td>Name of the parameter in the shader </td></tr>
    <tr><td class="paramname">vector</td><td>Vector to assign </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a04029e0ce58c0ba60df21083a3fcd6b3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Graphics_2Export_8h.htm#afe51e93179eaff14e83568c716e633c0">CSFML_GRAPHICS_API</a> void sfShader_setVector3Parameter </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Graphics_2Types_8h.htm#a17c995cd2518f49125563e0e32c75fd0">sfShader</a> *&#160;</td>
          <td class="paramname"><em>shader</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structsfVector3f.htm">sfVector3f</a>&#160;</td>
          <td class="paramname"><em>vector</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Change a 3-components vector parameter of a shader. </p>
<p><em>name</em> is the name of the variable to change in the shader. The corresponding parameter in the shader must be a 3x1 vector (vec3 GLSL type).</p>
<p>Example: </p>
<div class="fragment"><div class="line">uniform vec3 myparam; <span class="comment">// this is the variable in the shader</span></div>
</div><!-- fragment --> <div class="fragment"><div class="line"><a class="code" href="structsfVector3f.htm" title="3-component vector of floats">sfVector3f</a> vec = {5.2f, 6.0f, -8.1f};</div>
<div class="line"><a class="code" href="Shader_8h.htm#a04029e0ce58c0ba60df21083a3fcd6b3" title="Change a 3-components vector parameter of a shader.">sfShader_setVector3Parameter</a>(shader, <span class="stringliteral">&quot;myparam&quot;</span>, vec);</div>
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">shader</td><td>Shader object </td></tr>
    <tr><td class="paramname">name</td><td>Name of the parameter in the shader </td></tr>
    <tr><td class="paramname">vector</td><td>Vector to assign </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
        </div>
        <div id="footer-container">
            <div id="footer">
                Copyright � Laurent Gomila &nbsp;::&nbsp;
                Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen</a> &nbsp;::&nbsp;
            </div>
        </div>
    </body>
</html>