Permalink
Browse files

Add glesv2 wrapper and test case with shaders

Signed-off-by: Carsten Munk <carsten.munk@gmail.com>
  • Loading branch information...
1 parent 2a265cb commit 21bcaf0172f9865c317b7ecc09fa0823d4fd1098 @stskeeps committed Aug 18, 2012
Showing with 1,186 additions and 1 deletion.
  1. +10 −1 Makefile
  2. +1,030 −0 glesv2/gl2.c
  3. +146 −0 glesv2/test.c
View
@@ -12,7 +12,7 @@ COMMON_SOURCES=common/strlcpy.c common/hooks.c common/properties.c
GINGERBREAD_SOURCES=gingerbread/linker.c gingerbread/dlfcn.c gingerbread/rt.c gingerbread/linker_environ.c gingerbread/linker_format.c
-all: libhybris_gingerbread.so test_gingerbread libEGL.so.1 test_egl
+all: libhybris_gingerbread.so test_gingerbread libEGL.so.1 test_egl libGLESv2.so.2 test_glesv2
libhybris_gingerbread.so: $(COMMON_SOURCES) $(GINGERBREAD_SOURCES)
$(CC) -g -shared -o $@ -ldl -pthread -fPIC -Igingerbread -Icommon -DLINKER_DEBUG=1 -DLINKER_TEXT_BASE=0xB0000100 -DLINKER_AREA_SIZE=0x01000000 $(ARCHFLAGS) \
@@ -30,5 +30,14 @@ libEGL.so.1: libEGL.so.1.0
test_egl: libEGL.so.1 egl/test.c libhybris_gingerbread.so
$(CC) -g -o $@ libEGL.so.1 libhybris_gingerbread.so egl/test.c
+libGLESv2.so.2.0: glesv2/gl2.c
+ $(CC) -g -shared -o $@ -fPIC -Wl,-soname,libGLESv2.so.2 $< libhybris_gingerbread.so
+
+libGLESv2.so.2: libGLESv2.so.2.0
+ ln -sf libGLESv2.so.2.0 libGLESv2.so.2
+
+test_glesv2: libEGL.so.1 libGLESv2.so.2 egl/test.c libhybris_gingerbread.so
+ $(CC) -g -o $@ -lm libEGL.so.1 libhybris_gingerbread.so libGLESv2.so.2 glesv2/test.c
+
clean:
rm -rf libhybris_gingerbread.so test_gingerbread
Oops, something went wrong.

0 comments on commit 21bcaf0

Please sign in to comment.