Commit c0a1dbea authored by Cyril Deguet's avatar Cyril Deguet

* modules/video_output/x11/glx.c: new OpenGL vout for X11.

    TODO: - factorization with xcommon.c
          - factorization with glx.c in GaLaktos plugin
          - remove hard-coded values
    (If you don't like the rotating cube, hack the code yourself,
    the variables will come later ! ;)
parent 3c3996cc
...@@ -31,6 +31,7 @@ MKV mkv ...@@ -31,6 +31,7 @@ MKV mkv
MOD mod MOD mod
X11 x11 X11 x11
XVIDEO xvideo XVIDEO xvideo
GLX glx
FB fb FB fb
MGA mga MGA mga
SDL sdl SDL sdl
......
...@@ -92,6 +92,7 @@ comment 'Video plugins' ...@@ -92,6 +92,7 @@ comment 'Video plugins'
if [ "$CONFIG_LINUX" = "y" ]; then if [ "$CONFIG_LINUX" = "y" ]; then
bool 'X11 support' CONFIG_X11 bool 'X11 support' CONFIG_X11
bool 'XVideo support' CONFIG_XVIDEO bool 'XVideo support' CONFIG_XVIDEO
bool 'GLX support' CONFIG_GLX
bool 'Linux framebuffer support' CONFIG_FB bool 'Linux framebuffer support' CONFIG_FB
bool 'Linux kernel Matrox support' CONFIG_MGA bool 'Linux kernel Matrox support' CONFIG_MGA
fi fi
......
...@@ -2747,6 +2747,18 @@ then ...@@ -2747,6 +2747,18 @@ then
fi ]) fi ])
fi fi
dnl
dnl GLX module
dnl
AC_ARG_ENABLE(glx,
[ --enable-glx X11 OpenGL (GLX) support (default disabled)])
if test "${enable_glx}" = "yes"
then
VLC_ADD_PLUGINS([glx])
VLC_ADD_LDFLAGS([glx],[-lGL -lGLU])
fi
dnl dnl
dnl AA plugin dnl AA plugin
dnl dnl
......
...@@ -10,3 +10,6 @@ SOURCES_xvideo = \ ...@@ -10,3 +10,6 @@ SOURCES_xvideo = \
xcommon.h \ xcommon.h \
$(NULL) $(NULL)
SOURCES_glx = \
glx.c \
$(NULL)
This diff is collapsed.
...@@ -115,7 +115,7 @@ double **origrad; ...@@ -115,7 +115,7 @@ double **origrad;
double **origx; //original mesh double **origx; //original mesh
double **origy; double **origy;
char *buffer; //XXX
int galaktos_init( galaktos_thread_t *p_thread ) int galaktos_init( galaktos_thread_t *p_thread )
{ {
...@@ -127,8 +127,8 @@ int galaktos_init( galaktos_thread_t *p_thread ) ...@@ -127,8 +127,8 @@ int galaktos_init( galaktos_thread_t *p_thread )
initPresetLoader(); initPresetLoader();
/* Load default preset directory */ /* Load default preset directory */
loadPresetDir("/home/cyril/.vlc/galaktos"); // loadPresetDir("/home/cyril/.vlc/galaktos");
// loadPresetDir("/etc/projectM/presets"); loadPresetDir("/etc/projectM/presets");
initPCM(maxsamples); initPCM(maxsamples);
initBeatDetect(); initBeatDetect();
......
...@@ -38,6 +38,8 @@ ...@@ -38,6 +38,8 @@
extern int texsize; extern int texsize;
extern char *buffer;
void setup_opengl( int w, int h ) void setup_opengl( int w, int h )
{ {
...@@ -118,6 +120,7 @@ void CreateRenderTarget(int texsize,int *RenderTargetTextureID, int *RenderTarge ...@@ -118,6 +120,7 @@ void CreateRenderTarget(int texsize,int *RenderTargetTextureID, int *RenderTarge
/* We can fake a render target in this demo by rendering to the /* We can fake a render target in this demo by rendering to the
* screen and copying to a texture before we do normal rendering. * screen and copying to a texture before we do normal rendering.
*/ */
buffer = malloc(3*texsize*texsize);
glBindTexture(GL_TEXTURE_2D, *RenderTargetTextureID); glBindTexture(GL_TEXTURE_2D, *RenderTargetTextureID);
glTexImage2D(GL_TEXTURE_2D, glTexImage2D(GL_TEXTURE_2D,
...@@ -127,7 +130,7 @@ void CreateRenderTarget(int texsize,int *RenderTargetTextureID, int *RenderTarge ...@@ -127,7 +130,7 @@ void CreateRenderTarget(int texsize,int *RenderTargetTextureID, int *RenderTarge
0, 0,
GL_RGB, GL_RGB,
GL_UNSIGNED_BYTE, GL_UNSIGNED_BYTE,
0); buffer);
// } // }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment