This allows api_OpenGL.so to support OpenGL ES.
GLESv2_INCLUDES := $(GL_INCLUDES)
OpenVG_INCLUDES := -I$(TOP)/src/gallium/state_trackers/vega -I$(TOP)/src/gallium/include
+# cflags
+GL_CFLAGS := $(API_DEFINES)
+GLESv1_CM_CFLAGS :=
+GLESv2_CFLAGS :=
+OpenVG_CFLAGS :=
+
# system libs
GL_SYS := -lpthread -lm -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
GLESv1_CM_SYS := -lpthread -lm -L$(TOP)/$(LIB_DIR) -l$(GLESv1_CM_LIB)
default: $(OUTPUTS)
api_%.o: api_%.c
- $(CC) -c -o $@ $< $($*_INCLUDES) $(DEFINES) $(CFLAGS)
+ $(CC) -c -o $@ $< $($*_INCLUDES) $($*_CFLAGS) $(DEFINES) $(CFLAGS)
define mklib
$(MKLIB) -o $(notdir $@) -noprefix -linker '$(CC)' -ldflags '$(LDFLAGS)' \
#include "state_tracker/st_gl_api.h"
+#if FEATURE_GL
PUBLIC struct st_api *
-st_api_create_OpenGL()
+st_api_create_OpenGL(void)
{
return st_gl_api_create();
}
+#endif
+
+#if FEATURE_ES1
+PUBLIC struct st_api *
+st_api_create_OpenGL_ES1(void)
+{
+ return st_gl_api_create_es1();
+}
+#endif
+
+#if FEATURE_ES2
+PUBLIC struct st_api *
+st_api_create_OpenGL_ES2(void)
+{
+ return st_gl_api_create_es2();
+}
+#endif
#include "state_tracker/st_gl_api.h"
PUBLIC struct st_api *
-st_api_create_OpenGL_ES1()
+st_api_create_OpenGL_ES1(void)
{
- return st_gl_api_create();
+ return st_gl_api_create_es1();
}
#include "state_tracker/st_gl_api.h"
PUBLIC struct st_api *
-st_api_create_OpenGL_ES2()
+st_api_create_OpenGL_ES2(void)
{
- /* linker magic creates different versions */
- return st_gl_api_create();
+ return st_gl_api_create_es2();
}
#include "vg_api.h"
PUBLIC struct st_api *
-st_api_create_OpenVG()
+st_api_create_OpenVG(void)
{
return (struct st_api *) vg_api_get();
}