Bladeren bron

doc: fix linking with ffmpeg on Linux and start a tutorial program.

legacy
Sam Hocevar 8 jaren geleden
bovenliggende
commit
ad45e4d284
4 gewijzigde bestanden met toevoegingen van 38 en 5 verwijderingen
  1. +1
    -0
      .gitignore
  2. +6
    -4
      build/autotools/m4/lol-conf.m4
  3. +25
    -0
      doc/tutorial/16_movie.cpp
  4. +6
    -1
      doc/tutorial/Makefile.am

+ 1
- 0
.gitignore Bestand weergeven

@@ -101,6 +101,7 @@ doc/tutorial/12_voronoi
doc/tutorial/13_shader_builder
doc/tutorial/14_lol_lua
doc/tutorial/15_lolimgui
doc/tutorial/16_movie
tools/make-font
# Our data
doc/doxygen.cfg


+ 6
- 4
build/autotools/m4/lol-conf.m4 Bestand weergeven

@@ -165,6 +165,7 @@ AM_CONDITIONAL(LOL_USE_GDIPLUS, test "${ac_cv_my_have_gdiplus}" = "yes")
dnl Use libavcodec? (required for movie encoding)
ac_cv_my_have_ffmpeg="yes"
PKG_CHECK_MODULES([LIBAVCODEC], [libavcodec], [:], [ac_cv_my_have_ffmpeg=no])
PKG_CHECK_MODULES([LIBAVUTIL], [libavutil], [:], [ac_cv_my_have_ffmpeg=no])
PKG_CHECK_MODULES([LIBAVFORMAT], [libavformat], [:], [ac_cv_my_have_ffmpeg=no])
PKG_CHECK_MODULES([LIBSWSCALE], [libswscale], [:], [ac_cv_my_have_ffmpeg=no])
if test "${ac_cv_my_have_ffmpeg}" = "no"; then
@@ -173,16 +174,17 @@ if test "${ac_cv_my_have_ffmpeg}" = "no"; then
AC_CHECK_HEADERS(libavformat/avformat.h, [:], [ac_cv_my_have_ffmpeg=no])
AC_CHECK_HEADERS(libswscale/swscale.h, [:], [ac_cv_my_have_ffmpeg=no])
if test "${ac_cv_my_have_ffmpeg}" = "yes"; then
LIBAVCODEC_LIBS="-lavcodec"
LIBAVUTIL_LIBS="-lavutil"
LIBAVFORMAT_LIBS="-lavformat"
LIBAVCODEC_LIBS="-lavcodec -lavutil"
LIBSWSCALE_LIBS="-lswscale -lswresample"
LIBSWSCALE_LIBS="-lswscale"
AC_CHECK_LIB(ws2_32, main, LOL_LIBS="${LOL_LIBS} -lws2_32")
fi
fi
if test "${ac_cv_my_have_ffmpeg}" != "no"; then
AC_DEFINE(LOL_USE_FFMPEG, 1, Define to 1 to use FFmpeg)
LOL_CFLAGS="${LOL_CFLAGS} ${LIBAVFORMAT_CFLAGS} ${LIBAVCODEC_CFLAGS} ${SWSCALE_CFLAGS}"
LOL_LIBS="${LOL_LIBS} ${LIBAVFORMAT_LIBS} ${LIBAVCODEC_LIBS} ${LIBSWSCALE_LIBS}"
LOL_CFLAGS="${LOL_CFLAGS} ${LIBAVFORMAT_CFLAGS} ${LIBAVUTIL_CFLAGS} ${LIBAVCODEC_CFLAGS} ${LIBSWSCALE_CFLAGS}"
LOL_LIBS="${LOL_LIBS} ${LIBAVFORMAT_LIBS} ${LIBAVUTIL_LIBS} ${LIBAVCODEC_LIBS} ${LIBSWSCALE_LIBS}"
fi
AM_CONDITIONAL(LOL_USE_FFMPEG, test "${ac_cv_my_have_ffmpeg}" != "no")



+ 25
- 0
doc/tutorial/16_movie.cpp Bestand weergeven

@@ -0,0 +1,25 @@
//
// Lol Engine — Movie tutorial
//
// Copyright © 2016 Sam Hocevar <sam@hocevar.net>
//
// Lol Engine is free software. It comes without any warranty, to
// the extent permitted by applicable law. You can redistribute it
// and/or modify it under the terms of the Do What the Fuck You Want
// to Public License, Version 2, as published by the WTFPL Task Force.
// See http://www.wtfpl.net/ for more details.
//

#if HAVE_CONFIG_H
# include "config.h"
#endif

#include <lol/engine.h>

using namespace lol;

int main(int argc, char **argv)
{
return 0;
}


+ 6
- 1
doc/tutorial/Makefile.am Bestand weergeven

@@ -4,7 +4,8 @@ include $(top_srcdir)/build/autotools/common.am
if BUILD_TUTORIAL
noinst_PROGRAMS = 01_triangle 02_cube 03_noise 04_texture 05_easymesh \
06_sprite 07_input 08_fbo 09_sound 11_fractal \
12_voronoi 13_shader_builder 14_lol_lua 15_lolimgui
12_voronoi 13_shader_builder 14_lol_lua 15_lolimgui \
16_movie
endif

01_triangle_SOURCES = 01_triangle.cpp 01_triangle.lolfx
@@ -69,3 +70,7 @@ endif
15_lolimgui_CPPFLAGS = $(AM_CPPFLAGS)
15_lolimgui_DEPENDENCIES = @LOL_DEPS@

16_movie_SOURCES = 16_movie.cpp
16_movie_CPPFLAGS = $(AM_CPPFLAGS)
16_movie_DEPENDENCIES = @LOL_DEPS@


Laden…
Annuleren
Opslaan