[vlc-devel] [PATCH][SoC]OpenGL shader support aka GLSL

Kaarlo Räihä agent_007 at luukku.com
Sun Aug 31 21:51:38 CEST 2008


As part of my GSoC, I added OpenGL shader support to OpenGL video output module. 

I am not sure if it compiles on LinuX/Mac OS X but I tried to add everything that is needed for those platforms (I don't have neither environment available for tests).

To get it compile under Windows, you have to update glext.h in usr\include\w32api\GL. Newest one can be found from http://www.opengl.org/registry/ (Linux compile might also require file updating)

Support is Vertex and Fragment (= Pixel) shaders. Geometry shaders are few new to OpenGL and I am not sure if they would bring any benefit to video post processing.

Currently there is only one shader (it inverses colors) and it is hardcoded. That can be easily changed, but there are few design and security issues related to this.

1. It is possible to crash OpenGL with certain shader, it might also be possible to cause buffer overflow by abusing evil shader. So if we let people write their custom shader (or load them from text files), they might crash VLC and some very evil people could use them as attack vector. If people can't create shaders freely, nobody will want to create them.

2. Do we just enable basic file loading or Media Player Classic style integrated shader editor?
http://img152.imageshack.us/img152/3238/mpcshadersupportmy2.png

I will do shader support for DirectX 3D output also, so I hope to get some guidelines now.

(I am not official VLC developer so I hope me using term we for devs don't offend anyone)

...................................................................
Luukku Plus paketilla pääset eroon tila- ja turvallisuusongelmista.
Hanki Luukku Plus ja helpotat elämääsi. http://www.mtv3.fi/luukku
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Add-OpenGL-shader-support-aka-GLSL.patch
Type: application/octet-stream
Size: 13512 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20080831/f9ebdd16/attachment.obj>


More information about the vlc-devel mailing list