OpenGL ES SDK for Android ARM Developer Center
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Common.h File Reference
#include <android/log.h>
#include <cstdio>
#include <cstdlib>
#include <GLES3/gl3.h>
#include <cmath>

Go to the source code of this file.

Macros

#define M_PI   3.14159265358979323846f
 The value of pi approximation. More...
 
#define LOG_TAG   "libNative"
 
#define LOGD(...)   __android_log_print(ANDROID_LOG_DEBBUG, LOG_TAG, __VA_ARGS__)
 
#define LOGE(...)   __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)
 
#define LOGI(...)   __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
 
#define ASSERT(x, s)
 
#define GL_CHECK(x)
 

Functions

float degreesToRadians (float degrees)
 Convert an angle in degrees to radians. More...
 
float signum (float f)
 Get the sign of a number. More...
 

Macro Definition Documentation

#define ASSERT (   x,
 
)
Value:
if (!(x)) \
{ \
LOGE("Assertion failed at %s:%i\n%s\n", __FILE__, __LINE__, s); \
exit(1); \
}
#define LOGE(...)
Definition: Common.h:38
GLint GLint GLint GLint GLint x
Definition: gl2ext.h:574

Definition at line 40 of file Common.h.

#define GL_CHECK (   x)
Value:
x; \
{ \
GLenum glError = glGetError(); \
if(glError != GL_NO_ERROR) { \
LOGE("glGetError() = %i (0x%.8x) at %s:%i\n", glError, glError, __FILE__, __LINE__); \
exit(1); \
} \
}
#define LOGE(...)
Definition: Common.h:38
GLint GLint GLint GLint GLint x
Definition: gl2ext.h:574
typedef GLenum(GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSKHRPROC)(void)

Definition at line 47 of file Common.h.

#define LOG_TAG   "libNative"

Definition at line 36 of file Common.h.

#define LOGD (   ...)    __android_log_print(ANDROID_LOG_DEBBUG, LOG_TAG, __VA_ARGS__)

Definition at line 37 of file Common.h.

#define LOGE (   ...)    __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)

Definition at line 38 of file Common.h.

#define LOGI (   ...)    __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)

Definition at line 39 of file Common.h.

#define M_PI   3.14159265358979323846f

The value of pi approximation.

Definition at line 33 of file Common.h.

Function Documentation

float degreesToRadians ( float  degrees)
inline

Convert an angle in degrees to radians.

Parameters
degreesThe angle (in degrees) to convert to radians.
Returns
As per description.

Definition at line 64 of file Common.h.

float signum ( float  f)
inline

Get the sign of a number.

Parameters
[in]fValue to check the sign of.
Returns
-1.0 if the number's sign is minus, 1.0 if the number's sign is plus and 0.0 if the number's sign is indefinite.

Definition at line 74 of file Common.h.