Subversion Repositories eduke32

Rev

Rev 4989 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4989 Rev 4997
Line 95... Line 95...
95
#undef countof
95
#undef countof
96
#define countof(x) (signed)((signed)sizeof((x))/(signed)sizeof((*x)))
96
#define countof(x) (signed)((signed)sizeof((x))/(signed)sizeof((*x)))
97
97
98
#include <android/log.h>
98
#include <android/log.h>
99
#define LOG_TAG "JWZGLES"
99
#define LOG_TAG "JWZGLES"
-
 
100
#define LOGD(...)  __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__)
100
#define LOGE(...)  __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)
101
#define LOGE(...)  __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)
101
102
102
#undef  Assert
103
#undef  Assert
103
104
104
#ifdef HAVE_COCOA
105
#ifdef HAVE_COCOA
Line 249... Line 250...
249
250
250
251
251
static jwzgles_state *state = 0;
252
static jwzgles_state *state = 0;
252
253
253
#ifdef DEBUG
254
#ifdef DEBUG
254
# define LOG(A)                LOGE("jwzgles: " A "\n")
255
# define LOG(A)                LOGD("jwzgles: " A "\n")
255
# define LOG1(A,B)             LOGE("jwzgles: " A "\n",B)
256
# define LOG1(A,B)             LOGD("jwzgles: " A "\n",B)
256
# define LOG2(A,B,C)           LOGE("jwzgles: " A "\n",B,C)
257
# define LOG2(A,B,C)           LOGD("jwzgles: " A "\n",B,C)
257
# define LOG3(A,B,C,D)         LOGE("jwzgles: " A "\n",B,C,D)
258
# define LOG3(A,B,C,D)         LOGD("jwzgles: " A "\n",B,C,D)
258
# define LOG4(A,B,C,D,E)       LOGE("jwzgles: " A "\n",B,C,D,E)
259
# define LOG4(A,B,C,D,E)       LOGD("jwzgles: " A "\n",B,C,D,E)
259
# define LOG5(A,B,C,D,E,F)     LOGE("jwzgles: " A "\n",B,C,D,E,F)
260
# define LOG5(A,B,C,D,E,F)     LOGD("jwzgles: " A "\n",B,C,D,E,F)
260
# define LOG6(A,B,C,D,E,F,G)   LOGE("jwzgles: " A "\n",B,C,D,E,F,G)
261
# define LOG6(A,B,C,D,E,F,G)   LOGD("jwzgles: " A "\n",B,C,D,E,F,G)
261
# define LOG7(A,B,C,D,E,F,G,H) LOGE("jwzgles: " A "\n",B,C,D,E,F,G,H)
262
# define LOG7(A,B,C,D,E,F,G,H) LOGD("jwzgles: " A "\n",B,C,D,E,F,G,H)
262
# define LOG8(A,B,C,D,E,F,G,H,I)\
263
# define LOG8(A,B,C,D,E,F,G,H,I)\
263
         LOGE("jwzgles: "A "\n",B,C,D,E,F,G,H,I)
264
         LOGD("jwzgles: "A "\n",B,C,D,E,F,G,H,I)
264
# define LOG9(A,B,C,D,E,F,G,H,I,J)\
265
# define LOG9(A,B,C,D,E,F,G,H,I,J)\
265
         LOGE("jwzgles: "A "\n",B,C,D,E,F,G,H,I,J)
266
         LOGD("jwzgles: "A "\n",B,C,D,E,F,G,H,I,J)
266
# define LOG10(A,B,C,D,E,F,G,H,I,J,K)\
267
# define LOG10(A,B,C,D,E,F,G,H,I,J,K)\
267
         LOGE("jwzgles: "A "\n",B,C,D,E,F,G,H,I,J,K)
268
         LOGD("jwzgles: "A "\n",B,C,D,E,F,G,H,I,J,K)
268
# define LOG17(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R)\
269
# define LOG17(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R)\
269
         LOGE("jwzgles: "A "\n",B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R)
270
         LOGD("jwzgles: "A "\n",B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R)
270
# define CHECK(S) check_gl_error(S)
271
# define CHECK(S) check_gl_error(S)
271
#else
272
#else
272
// "" defeats -Wempty-body
273
// "" defeats -Wempty-body
273
# define LOG(A)                                     ""
274
# define LOG(A)                                     ""
274
# define LOG1(A,B)                                  ""
275
# define LOG1(A,B)                                  ""
Line 482... Line 483...
482
static void
483
static void
483
check_gl_error (const char *s)
484
check_gl_error (const char *s)
484
{
485
{
485
  GLenum i = glGetError();
486
  GLenum i = glGetError();
486
  if (i == GL_NO_ERROR) return;
487
  if (i == GL_NO_ERROR) return;
-
 
488
487
  fprintf (stderr, "jwzgles: GL ERROR: %s: %s\n", s, mode_desc(i));
489
  LOGE("jwzgles: GL ERROR: %s: %s\n", s, mode_desc(i));
488
}
490
}
489
491
490
#endif /* DEBUG */
492
#endif /* DEBUG */
491
493
492
494