mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
22f2175bec
The basic APIs are:
video = love.graphics.newVideo("myvideo.ogv")
love.graphics.draw(video, ...) -- Video objects are Drawables.
video:play(), video:pause()
video:getDuration(), video:tell(), video:rewind(), video:seek(seconds)
video:getSource()
video:getWidth(), video:getHeight(), video:setFilter(min, mag)
More advanced APIs include video:setSource(source), video:getStream(), and videostream:setSync.
To use a custom pixel shader when drawing a Video, call the new TexelVideo(texcoords) function instead of Texel(texture, texcoords) in order to get the pixel colors of a video frame.
52 lines
1.5 KiB
C++
52 lines
1.5 KiB
C++
/**
|
|
* Copyright (c) 2006-2015 LOVE Development Team
|
|
*
|
|
* This software is provided 'as-is', without any express or implied
|
|
* warranty. In no event will the authors be held liable for any damages
|
|
* arising from the use of this software.
|
|
*
|
|
* Permission is granted to anyone to use this software for any purpose,
|
|
* including commercial applications, and to alter it and redistribute it
|
|
* freely, subject to the following restrictions:
|
|
*
|
|
* 1. The origin of this software must not be misrepresented; you must not
|
|
* claim that you wrote the original software. If you use this software
|
|
* in a product, an acknowledgment in the product documentation would be
|
|
* appreciated but is not required.
|
|
* 2. Altered source versions must be plainly marked as such, and must not be
|
|
* misrepresented as being the original software.
|
|
* 3. This notice may not be removed or altered from any source distribution.
|
|
**/
|
|
|
|
#ifndef LOVE_GRAPHICS_OPENGL_WRAP_GRAPHICS_H
|
|
#define LOVE_GRAPHICS_OPENGL_WRAP_GRAPHICS_H
|
|
|
|
// LOVE
|
|
#include "common/config.h"
|
|
#include "wrap_Font.h"
|
|
#include "wrap_Image.h"
|
|
#include "graphics/wrap_Quad.h"
|
|
#include "wrap_SpriteBatch.h"
|
|
#include "wrap_ParticleSystem.h"
|
|
#include "wrap_Canvas.h"
|
|
#include "wrap_Shader.h"
|
|
#include "wrap_Mesh.h"
|
|
#include "wrap_Text.h"
|
|
#include "wrap_Video.h"
|
|
#include "Graphics.h"
|
|
|
|
namespace love
|
|
{
|
|
namespace graphics
|
|
{
|
|
namespace opengl
|
|
{
|
|
|
|
extern "C" LOVE_EXPORT int luaopen_love_graphics(lua_State *L);
|
|
|
|
} // opengl
|
|
} // graphics
|
|
} // love
|
|
|
|
#endif // LOVE_GRAPHICS_OPENGL_WRAP_GRAPHICS_H
|