[IMPROVE] Add direct GL calls support 59/39059/2
authorAlexander Aksenov <a.aksenov@samsung.com>
Wed, 11 Mar 2015 09:43:42 +0000 (12:43 +0300)
committerAlexander Aksenov <a.aksenov@samsung.com>
Fri, 15 May 2015 12:12:56 +0000 (15:12 +0300)
Change-Id: I0a508919a9bdf53298c80af0740fe3c8e8125d69
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
Makefile
probe_graphics/da_gles20_direct.cpp [new file with mode: 0644]
probe_graphics/da_gles20_native.cpp

index 048a9d59ce4c5d191e9f59b8566b37ea02b6b170..0263ac7bc7668f40f822e1290c47f10a3fec0c4e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -118,7 +118,8 @@ TIZEN_SRCS =        $(COMMON_SRCS) $(CAPI_SRCS)\
                ./probe_graphics/da_evas_gl.c                           \
                ./probe_graphics/da_gl_api_init.c                       \
                ./probe_graphics/da_gles20_tizen.cpp                    \
-               ./probe_graphics/da_gles20_native.cpp
+               ./probe_graphics/da_gles20_native.cpp                   \
+               ./probe_graphics/da_gles20_direct.cpp
 
 ASM_SRC = ./helper/da_call_original.S
 
diff --git a/probe_graphics/da_gles20_direct.cpp b/probe_graphics/da_gles20_direct.cpp
new file mode 100644 (file)
index 0000000..c4e93f0
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ *  DA probe
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ *
+ * Vitaliy Cherepanov <v.cherepanov@samsung.com>
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Contributors:
+ * - Samsung RnD Institute Russia
+ *
+ */
+
+//disable tizen redefines
+#define _GL2_MACRO_H_
+#define _GL_MACRO_H_
+
+#include "common_probe_init.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define REAL_NAME(func) func
+#define BEFORE BEFORE_GL_ORIG
+#define CALL_ORIG(func, ...) func##p(__VA_ARGS__)
+#define TYPEDEF(type) typedef type
+
+#include "da_gles20_native.cpp"
+
+#ifdef __cplusplus
+} /* extern C */
+#endif
+
+#undef _GL2_MACRO_H_
+#undef _GL_MACRO_H_
+
index ca892f65d82fa0d4ce41ee2d2317e5dba3de5af2..8627fe9bc5407476158a980f9200f350fcbf824a 100644 (file)
@@ -121,7 +121,7 @@ void REAL_NAME(glAttachShader)(GLuint program, GLuint shader)
 // ==================================================================
 // B 12
 // ==================================================================
-void __get_context_buf_data(GLenum target, char *buf, int buf_size)
+static void __get_context_buf_data(GLenum target, char *buf, int buf_size)
 {
        GLint n_buffer_size, n_buffer_usage_size;
        int print_size;