Changeset 1242


Ignore:
Timestamp:
Apr 20, 2012, 10:01:16 PM (8 years ago)
Author:
sam
Message:

tutorial: some refactoring in the tutorials.

Location:
trunk
Files:
3 edited
6 moved

Legend:

Unmodified
Added
Removed
  • trunk/.gitignore

    r1223 r1242  
    3333core.*
    3434vgcore.*
     35callgrind.out.*
     36perf.data*
    3537# Editor cruft
    3638.*.swp
     
    5759# Our binaries
    5860test/testsuite
    59 test/tutorial/tut01
    60 test/tutorial/tut02
    61 test/tutorial/tut03
     61test/tutorial/01_triangle
     62test/tutorial/02_cube
     63test/tutorial/03_fractal
    6264test/benchsuite
    6365test/quad
  • trunk/test/tutorial/01_triangle.cpp

    r1241 r1242  
    5959                "#version 120\n"
    6060                "void main(void) {"
    61                 "    gl_FragColor = vec4(0.7, 0.5, 0.2, 1.0);"
     61                "    gl_FragColor = vec4(0.7, 0.2, 0.5, 1.0);"
    6262                "}"
    6363#else
     
    6868
    6969                "void main(out float4 out_FragColor : COLOR) {"
    70                 "    out_FragColor = float4(0.7, 0.5, 0.2, 1.0);"
     70                "    out_FragColor = float4(0.7, 0.2, 0.5, 1.0);"
    7171                "}"
    7272#endif
  • trunk/test/tutorial/02_cube.cpp

    r1241 r1242  
    8282
    8383        mat4 anim = mat4::rotate(m_angle, vec3(0, 1, 0));
    84         mat4 model = mat4::translate(vec3(0, 0, -4));
     84        mat4 model = mat4::translate(vec3(0, 0, -4.5));
    8585        mat4 view = mat4::lookat(vec3(0, 2, 0), vec3(0, 0, -4), vec3(0, 1, 0));
    8686        mat4 proj = mat4::perspective(45.0f, 640.0f, 480.0f, 0.1f, 10.0f);
  • trunk/test/tutorial/Makefile.am

    r1054 r1242  
    33
    44all-local: $(noinst_PROGRAMS)
    5         test x$(MAKE_FSELF) = xno || make_fself tut01$(EXEEXT) tut01.self
    6         test x$(MAKE_FSELF) = xno || make_fself tut02$(EXEEXT) tut02.self
    7         test x$(MAKE_FSELF) = xno || make_fself tut03$(EXEEXT) tut03.self
     5        for x in $(noinst_PROGRAMS); do \
     6          test x$(MAKE_FSELF) = xno || make_fself $${x}$(EXEEXT) $${x}.self; \
     7        done
    88
    99CLEANFILES = $(noinst_PROGRAMS:%$(EXEEXT)=%.self) \
     
    1111             $(noinst_PROGRAMS:%$(EXEEXT)=%.exe)
    1212
    13 noinst_PROGRAMS = tut01 tut02 tut03
     13noinst_PROGRAMS = 01_triangle 02_cube 03_fractal
    1414
    15 tut01_SOURCES = tut01.cpp
    16 tut01_CPPFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@
    17 tut01_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@
    18 tut01_DEPENDENCIES = $(top_builddir)/src/liblol.a
     1501_triangle_SOURCES = 01_triangle.cpp
     1601_triangle_CPPFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@
     1701_triangle_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@
     1801_triangle_DEPENDENCIES = $(top_builddir)/src/liblol.a
    1919
    20 tut02_SOURCES = tut02.cpp
    21 tut02_CPPFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@
    22 tut02_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@
    23 tut02_DEPENDENCIES = $(top_builddir)/src/liblol.a
     2002_cube_SOURCES = 02_cube.cpp
     2102_cube_CPPFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@
     2202_cube_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@
     2302_cube_DEPENDENCIES = $(top_builddir)/src/liblol.a
    2424
    25 tut03_SOURCES = tut03.cpp
    26 tut03_CPPFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@
    27 tut03_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@
    28 tut03_DEPENDENCIES = $(top_builddir)/src/liblol.a
     2503_fractal_SOURCES = 03_fractal.cpp
     2603_fractal_CPPFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@
     2703_fractal_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@
     2803_fractal_DEPENDENCIES = $(top_builddir)/src/liblol.a
    2929
  • trunk/win32/lolengine.sln

    r1239 r1242  
    4242Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tutorial", "Tutorial", "{E74CF679-CA2A-47E9-B1F4-3779D6AC6B04}"
    4343EndProject
    44 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tut01", "tut01.vcxproj", "{B92ABADC-45BE-4CC5-B724-9426053123A1}"
    45         ProjectSection(ProjectDependencies) = postProject
    46                 {9E62F2FE-3408-4EAE-8238-FD84238CEEDA} = {9E62F2FE-3408-4EAE-8238-FD84238CEEDA}
    47         EndProjectSection
    48 EndProject
    49 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tut02", "tut02.vcxproj", "{7B083DA2-FE08-4F6D-BFDD-195D5C2783EB}"
    50         ProjectSection(ProjectDependencies) = postProject
    51                 {9E62F2FE-3408-4EAE-8238-FD84238CEEDA} = {9E62F2FE-3408-4EAE-8238-FD84238CEEDA}
    52         EndProjectSection
    53 EndProject
    54 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tut03", "tut03.vcxproj", "{6BF81B39-EDC2-4227-9992-C2D8ABEA95AF}"
     44Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "01_triangle", "01_triangle.vcxproj", "{B92ABADC-45BE-4CC5-B724-9426053123A1}"
     45        ProjectSection(ProjectDependencies) = postProject
     46                {9E62F2FE-3408-4EAE-8238-FD84238CEEDA} = {9E62F2FE-3408-4EAE-8238-FD84238CEEDA}
     47        EndProjectSection
     48EndProject
     49Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "02_cube", "02_cube.vcxproj", "{7B083DA2-FE08-4F6D-BFDD-195D5C2783EB}"
     50        ProjectSection(ProjectDependencies) = postProject
     51                {9E62F2FE-3408-4EAE-8238-FD84238CEEDA} = {9E62F2FE-3408-4EAE-8238-FD84238CEEDA}
     52        EndProjectSection
     53EndProject
     54Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "03_fractal", "03_fractal.vcxproj", "{6BF81B39-EDC2-4227-9992-C2D8ABEA95AF}"
    5555        ProjectSection(ProjectDependencies) = postProject
    5656                {9E62F2FE-3408-4EAE-8238-FD84238CEEDA} = {9E62F2FE-3408-4EAE-8238-FD84238CEEDA}
Note: See TracChangeset for help on using the changeset viewer.