CSFML
Main Page
Data Structures
Files
File List
Globals
include
SFML
Graphics
Shader.h
Go to the documentation of this file.
1
2
//
3
// SFML - Simple and Fast Multimedia Library
4
// Copyright (C) 2007-2013 Laurent Gomila (laurent.gom@gmail.com)
5
//
6
// This software is provided 'as-is', without any express or implied warranty.
7
// In no event will the authors be held liable for any damages arising from the use of this software.
8
//
9
// Permission is granted to anyone to use this software for any purpose,
10
// including commercial applications, and to alter it and redistribute it freely,
11
// subject to the following restrictions:
12
//
13
// 1. The origin of this software must not be misrepresented;
14
// you must not claim that you wrote the original software.
15
// If you use this software in a product, an acknowledgment
16
// in the product documentation would be appreciated but is not required.
17
//
18
// 2. Altered source versions must be plainly marked as such,
19
// and must not be misrepresented as being the original software.
20
//
21
// 3. This notice may not be removed or altered from any source distribution.
22
//
24
25
#ifndef SFML_SHADER_H
26
#define SFML_SHADER_H
27
29
// Headers
31
#include <
SFML/Graphics/Export.h
>
32
#include <
SFML/Graphics/Color.h
>
33
#include <
SFML/Graphics/Transform.h
>
34
#include <
SFML/Graphics/Types.h
>
35
#include <
SFML/System/InputStream.h
>
36
#include <
SFML/System/Vector2.h
>
37
#include <
SFML/System/Vector3.h
>
38
39
57
CSFML_GRAPHICS_API
sfShader
*
sfShader_createFromFile
(
const
char
* vertexShaderFilename,
const
char
* fragmentShaderFilename);
58
76
CSFML_GRAPHICS_API
sfShader
*
sfShader_createFromMemory
(
const
char
* vertexShader,
const
char
* fragmentShader);
77
95
CSFML_GRAPHICS_API
sfShader
*
sfShader_createFromStream
(
sfInputStream
* vertexShaderStream,
sfInputStream
* fragmentShaderStream);
96
103
CSFML_GRAPHICS_API
void
sfShader_destroy
(
sfShader
* shader);
104
125
CSFML_GRAPHICS_API
void
sfShader_setFloatParameter
(
sfShader
* shader,
const
char
* name,
float
x);
126
148
CSFML_GRAPHICS_API
void
sfShader_setFloat2Parameter
(
sfShader
* shader,
const
char
* name,
float
x,
float
y);
149
172
CSFML_GRAPHICS_API
void
sfShader_setFloat3Parameter
(
sfShader
* shader,
const
char
* name,
float
x,
float
y,
float
z);
173
197
CSFML_GRAPHICS_API
void
sfShader_setFloat4Parameter
(
sfShader
* shader,
const
char
* name,
float
x,
float
y,
float
z,
float
w);
198
220
CSFML_GRAPHICS_API
void
sfShader_setVector2Parameter
(
sfShader
* shader,
const
char
* name,
sfVector2f
vector);
221
243
CSFML_GRAPHICS_API
void
sfShader_setVector3Parameter
(
sfShader
* shader,
const
char
* name,
sfVector3f
vector);
244
271
CSFML_GRAPHICS_API
void
sfShader_setColorParameter
(
sfShader
* shader,
const
char
* name,
sfColor
color);
272
294
CSFML_GRAPHICS_API
void
sfShader_setTransformParameter
(
sfShader
* shader,
const
char
* name,
sfTransform
transform);
295
327
CSFML_GRAPHICS_API
void
sfShader_setTextureParameter
(
sfShader
* shader,
const
char
* name,
const
sfTexture
* texture);
328
350
CSFML_GRAPHICS_API
void
sfShader_setCurrentTextureParameter
(
sfShader
* shader,
const
char
* name);
351
373
CSFML_GRAPHICS_API
void
sfShader_bind
(
const
sfShader
* shader);
374
385
CSFML_GRAPHICS_API
sfBool
sfShader_isAvailable
(
void
);
386
387
388
#endif // SFML_SHADER_H