Version 0.3 released.
There're just 2 small changes.
- If internal combine function of tesselation of flDrawPath was called without colors in given path table, it changed color to black/alpha=0 for following triangles. Fixed now, that color doesn't change in this case.
- OpenGL context was recreated for every frame. Now it creates one context for whole progress. Reuse of textures, display lists, etc. possible -> faster processing.
Because of the second change you can do a lot of shit now if you forget to disable something. See internal frame initialization and understand the problem:
Code:
glMatrixMode(GL_TEXTURE)
glLoadIdentity()
glMatrixMode(GL_PROJECTION)
glLoadIdentity()
glMatrixMode(GL_MODELVIEW)
glLoadIdentity()
glViewport( 0, 0, flGetVideoWidth(), flGetVideoHeight() )
glClearColor(0, 0, 0, 0)
glClearDepth(1.0)
glClearStencil(0)
glClearAccum(0, 0, 0, 0)
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT | GL_ACCUM_BUFFER_BIT)
local frame = --Gets video frame pixels
glDepthMask(false)
glDrawPixels(flGetVideoWidth(), flGetVideoHeight(), GL_RGBA, frame)
glDepthMask(true)
--Calls registered functions from user in right order!!!
frame = glReadPixels(0, 0, flGetVideoWidth(), flGetVideoHeight(), GL_RGBA)
--Sets video frame pixels (frame)
But it's much faster than before
Added a small example how to make
karaoke effects.
Advanced creations of me i cannot post here or upload to YT regrettably because of music and video material
Documentation just reaches until OpenGL 1.1, but 1.3 is available.
Documentation is more work than the source, so it will take some time, but will continue it.
Because of the plan to allow audio access:
Video and audio runs in 2 threads, so i cannot bring it together in one function. Another developer used ffmpeg for loading audio data separatly... will think about it.