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
MOD mod
X11 x11
XVIDEO xvideo
GLX glx
FB fb
MGA mga
SDL sdl
......
......@@ -92,6 +92,7 @@ comment 'Video plugins'
if [ "$CONFIG_LINUX" = "y" ]; then
bool 'X11 support' CONFIG_X11
bool 'XVideo support' CONFIG_XVIDEO
bool 'GLX support' CONFIG_GLX
bool 'Linux framebuffer support' CONFIG_FB
bool 'Linux kernel Matrox support' CONFIG_MGA
fi
......
......@@ -2747,6 +2747,18 @@ then
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 AA plugin
dnl
......
......@@ -10,3 +10,6 @@ SOURCES_xvideo = \
xcommon.h \
$(NULL)
SOURCES_glx = \
glx.c \
$(NULL)
This diff is collapsed.
......@@ -115,7 +115,7 @@ double **origrad;
double **origx; //original mesh
double **origy;
char *buffer; //XXX
int galaktos_init( galaktos_thread_t *p_thread )
{
......@@ -127,8 +127,8 @@ int galaktos_init( galaktos_thread_t *p_thread )
initPresetLoader();
/* Load default preset directory */
loadPresetDir("/home/cyril/.vlc/galaktos");
// loadPresetDir("/etc/projectM/presets");
// loadPresetDir("/home/cyril/.vlc/galaktos");
loadPresetDir("/etc/projectM/presets");
initPCM(maxsamples);
initBeatDetect();
......
......@@ -38,6 +38,8 @@
extern int texsize;
extern char *buffer;
void setup_opengl( int w, int h )
{
......@@ -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
* screen and copying to a texture before we do normal rendering.
*/
buffer = malloc(3*texsize*texsize);
glBindTexture(GL_TEXTURE_2D, *RenderTargetTextureID);
glTexImage2D(GL_TEXTURE_2D,
......@@ -127,7 +130,7 @@ void CreateRenderTarget(int texsize,int *RenderTargetTextureID, int *RenderTarge
0,
GL_RGB,
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