Loading...
Searching...
No Matches
RenderTexture.h
Go to the documentation of this file.
7// In no event will the authors be held liable for any damages arising from the use of this software.
56CSFML_GRAPHICS_API sfRenderTexture* sfRenderTexture_create(unsigned int width, unsigned int height, sfBool depthBuffer);
68CSFML_GRAPHICS_API sfRenderTexture* sfRenderTexture_createWithSettings(unsigned int width, unsigned int height, const sfContextSettings* settings);
107CSFML_GRAPHICS_API sfBool sfRenderTexture_setActive(sfRenderTexture* renderTexture, sfBool active);
133CSFML_GRAPHICS_API void sfRenderTexture_setView(sfRenderTexture* renderTexture, const sfView* view);
153CSFML_GRAPHICS_API const sfView* sfRenderTexture_getDefaultView(const sfRenderTexture* renderTexture);
164CSFML_GRAPHICS_API sfIntRect sfRenderTexture_getViewport(const sfRenderTexture* renderTexture, const sfView* view);
191CSFML_GRAPHICS_API sfVector2f sfRenderTexture_mapPixelToCoords(const sfRenderTexture* renderTexture, sfVector2i point, const sfView* view);
217CSFML_GRAPHICS_API sfVector2i sfRenderTexture_mapCoordsToPixel(const sfRenderTexture* renderTexture, sfVector2f point, const sfView* view);
227CSFML_GRAPHICS_API void sfRenderTexture_drawSprite(sfRenderTexture* renderTexture, const sfSprite* object, const sfRenderStates* states);
228CSFML_GRAPHICS_API void sfRenderTexture_drawText(sfRenderTexture* renderTexture, const sfText* object, const sfRenderStates* states);
229CSFML_GRAPHICS_API void sfRenderTexture_drawShape(sfRenderTexture* renderTexture, const sfShape* object, const sfRenderStates* states);
230CSFML_GRAPHICS_API void sfRenderTexture_drawCircleShape(sfRenderTexture* renderTexture, const sfCircleShape* object, const sfRenderStates* states);
231CSFML_GRAPHICS_API void sfRenderTexture_drawConvexShape(sfRenderTexture* renderTexture, const sfConvexShape* object, const sfRenderStates* states);
232CSFML_GRAPHICS_API void sfRenderTexture_drawRectangleShape(sfRenderTexture* renderTexture, const sfRectangleShape* object, const sfRenderStates* states);
233CSFML_GRAPHICS_API void sfRenderTexture_drawVertexArray(sfRenderTexture* renderTexture, const sfVertexArray* object, const sfRenderStates* states);
234CSFML_GRAPHICS_API void sfRenderTexture_drawVertexBuffer(sfRenderTexture* renderTexture, const sfVertexBuffer* object, const sfRenderStates* states);
320CSFML_GRAPHICS_API const sfTexture* sfRenderTexture_getTexture(const sfRenderTexture* renderTexture);
338CSFML_GRAPHICS_API void sfRenderTexture_setSmooth(sfRenderTexture* renderTexture, sfBool smooth);
357CSFML_GRAPHICS_API void sfRenderTexture_setRepeated(sfRenderTexture* renderTexture, sfBool repeated);
void sfRenderTexture_setRepeated(sfRenderTexture *renderTexture, sfBool repeated)
Enable or disable texture repeating.
void sfRenderTexture_drawPrimitives(sfRenderTexture *renderTexture, const sfVertex *vertices, size_t vertexCount, sfPrimitiveType type, const sfRenderStates *states)
Draw primitives defined by an array of vertices to a render texture.
sfBool sfRenderTexture_isSrgb(const sfRenderTexture *renderTexture)
Tell if the render texture will use sRGB encoding when drawing on it.
sfVector2f sfRenderTexture_mapPixelToCoords(const sfRenderTexture *renderTexture, sfVector2i point, const sfView *view)
Convert a point from texture coordinates to world coordinates.
void sfRenderTexture_setSmooth(sfRenderTexture *renderTexture, sfBool smooth)
Enable or disable the smooth filter on a render texture.
sfBool sfRenderTexture_isRepeated(const sfRenderTexture *renderTexture)
Tell whether the texture is repeated or not.
void sfRenderTexture_destroy(sfRenderTexture *renderTexture)
Destroy an existing render texture.
void sfRenderTexture_drawVertexArray(sfRenderTexture *renderTexture, const sfVertexArray *object, const sfRenderStates *states)
void sfRenderTexture_setView(sfRenderTexture *renderTexture, const sfView *view)
Change the current active view of a render texture.
void sfRenderTexture_drawRectangleShape(sfRenderTexture *renderTexture, const sfRectangleShape *object, const sfRenderStates *states)
void sfRenderTexture_drawShape(sfRenderTexture *renderTexture, const sfShape *object, const sfRenderStates *states)
const sfView * sfRenderTexture_getView(const sfRenderTexture *renderTexture)
Get the current active view of a render texture.
void sfRenderTexture_drawCircleShape(sfRenderTexture *renderTexture, const sfCircleShape *object, const sfRenderStates *states)
void sfRenderTexture_drawVertexBuffer(sfRenderTexture *renderTexture, const sfVertexBuffer *object, const sfRenderStates *states)
void sfRenderTexture_drawConvexShape(sfRenderTexture *renderTexture, const sfConvexShape *object, const sfRenderStates *states)
void sfRenderTexture_drawText(sfRenderTexture *renderTexture, const sfText *object, const sfRenderStates *states)
void sfRenderTexture_display(sfRenderTexture *renderTexture)
Update the contents of the target texture.
sfRenderTexture * sfRenderTexture_createWithSettings(unsigned int width, unsigned int height, const sfContextSettings *settings)
Construct a new render texture.
void sfRenderTexture_clear(sfRenderTexture *renderTexture, sfColor color)
Clear the rendertexture with the given color.
void sfRenderTexture_resetGLStates(sfRenderTexture *renderTexture)
Reset the internal OpenGL states so that the target is ready for drawing.
void sfRenderTexture_drawVertexBufferRange(sfRenderTexture *renderTexture, const sfVertexBuffer *object, size_t firstVertex, size_t vertexCount, const sfRenderStates *states)
Draw primitives defined by a vertex buffer.
sfVector2u sfRenderTexture_getSize(const sfRenderTexture *renderTexture)
Get the size of the rendering region of a render texture.
void sfRenderTexture_drawSprite(sfRenderTexture *renderTexture, const sfSprite *object, const sfRenderStates *states)
Draw a drawable object to the render-target.
sfVector2i sfRenderTexture_mapCoordsToPixel(const sfRenderTexture *renderTexture, sfVector2f point, const sfView *view)
Convert a point from world coordinates to texture coordinates.
const sfView * sfRenderTexture_getDefaultView(const sfRenderTexture *renderTexture)
Get the default view of a render texture.
const sfTexture * sfRenderTexture_getTexture(const sfRenderTexture *renderTexture)
Get the target texture of a render texture.
unsigned int sfRenderTexture_getMaximumAntialiasingLevel(void)
Get the maximum anti-aliasing level supported by the system.
sfBool sfRenderTexture_isSmooth(const sfRenderTexture *renderTexture)
Tell whether the smooth filter is enabled or not for a render texture.
sfIntRect sfRenderTexture_getViewport(const sfRenderTexture *renderTexture, const sfView *view)
Get the viewport of a view applied to this target.
sfRenderTexture * sfRenderTexture_create(unsigned int width, unsigned int height, sfBool depthBuffer)
Construct a new render texture.
void sfRenderTexture_popGLStates(sfRenderTexture *renderTexture)
Restore the previously saved OpenGL render states and matrices.
sfBool sfRenderTexture_generateMipmap(sfRenderTexture *renderTexture)
Generate a mipmap using the current texture data.
sfBool sfRenderTexture_setActive(sfRenderTexture *renderTexture, sfBool active)
Activate or deactivate a render texture as the current target for rendering.
void sfRenderTexture_pushGLStates(sfRenderTexture *renderTexture)
Save the current OpenGL render states and matrices.