Kaynağa Gözat

test: add a debug quad test application.

legacy
Sam Hocevar sam 13 yıl önce
ebeveyn
işleme
8eeeca422f
2 değiştirilmiş dosya ile 62 ekleme ve 1 silme
  1. +6
    -1
      test/Makefile.am
  2. +56
    -0
      test/debug/quad.cpp

+ 6
- 1
test/Makefile.am Dosyayı Görüntüle

@@ -5,7 +5,7 @@ if USE_CPPUNIT
cppunit_tests = lol-test
endif

noinst_PROGRAMS = $(cppunit_tests)
noinst_PROGRAMS = quad $(cppunit_tests)

TESTS = $(cppunit_tests)

@@ -16,3 +16,8 @@ lol_test_LDADD = $(CPPUNIT_LIBS)
lol_test_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@
lol_test_DEPENDENCIES = $(top_builddir)/src/liblol.a

quad_SOURCES = debug/quad.cpp
quad_CPPFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@
quad_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@
quad_DEPENDENCIES = $(top_builddir)/src/liblol.a


+ 56
- 0
test/debug/quad.cpp Dosyayı Görüntüle

@@ -0,0 +1,56 @@
//
// Lol Engine - Debug Quad test program
//
// Copyright: (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
// This program is free software; 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 Sam Hocevar. See
// http://sam.zoy.org/projects/COPYING.WTFPL for more details.
//

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

#include "core.h"
#include "lolgl.h"
#include "loldebug.h"

using namespace std;
using namespace lol;

#if defined __CELLOS_LV2__
# include "ps3app.h"
#elif defined HAVE_GLES_2X
# include "eglapp.h"
#else
# include "sdlapp.h"
# include "sdlinput.h"
#endif

#if defined _WIN32
# undef main /* FIXME: still needed? */
#endif

int main(int argc, char **argv)
{
#if defined __CELLOS_LV2__
Ps3App app("Quad", vec2i(640, 480), 60.0f);
#elif defined HAVE_GLES_2X
EglApp app("Quad", vec2i(640, 480), 60.0f);
#else
SdlApp app("Quad", vec2i(640, 480), 60.0f);
#endif

/* Register an input driver and some debug stuff */
#if !defined HAVE_GLES_2X
new SdlInput();
#endif
new DebugFps(20, 20);
new DebugQuad();

app.Run();

return EXIT_SUCCESS;
}


Yükleniyor…
İptal
Kaydet