mirror of
https://github.com/libretro/libretro-samples.git
synced 2025-04-02 10:31:48 -04:00
Add minimal metadata for a Tup build system. Tup will discover any file named "Tupfile" in a the sub-directories where it is run. In this case a tupfile defines the core name and invokes the "include_rules" directive, which will include the Tup rules defined in parent directories. This allows a parent repository with platform-specific build rules to host this repository as a submodule. The sample cores may thus be ported to new platforms without polluting the local makefiles. Naturally the external build rules must be synchronized with the source code herein, the tupfiles here only define TARGET_NAME so that they will never contradict information contained in the makefiles. A sample Tuprules.tup for a super-repository: ifeq ($(TARGET_NAME),advanced_tests) CFLAGS += -I../../libretro-common/include SOURCES_C += libretro-test.c endif CFLAGS += -O3 -Wall -pedantic -std=gnu99 : foreach $(SOURCES_C) |> !libretro_cc |> {objs} : {objs} |> !libretro_ld |> $(TARGET_NAME)_libretro.so |
||
---|---|---|
.. | ||
glsym | ||
jni | ||
libretro.h | ||
libretro_gl_ff_test.c | ||
link.T | ||
Makefile | ||
README.md | ||
Tupfile |
libretro_test_gl_fixedfunction
This sample demonstrates a libretro core using fixed-function OpenGL (GL 1.4 and later / OpenGL ES 1.x). It should work on both desktop (OpenGL 1.4 and later) and mobile (OpenGL ES 1.x and later)
Requirements
On the desktop - A graphics card driver supporting OpenGL 1.4 and/or higher.
On mobile - A graphics card driver supporting OpenGLES 1.x and/or higher.
Programming language
C
Building
To compile, you will need a C compiler and assorted toolchain installed.
make
This targets libretro GL interface, so you need a libretro frontend supporting this interface, such as RetroArch, installed.
Running
After building, this command should run the program:
retroarch -L testgl_ff_libretro.so