}
static GLuint stippleTexture;
-#if defined(_GLES)
+#if defined(_GLES) || defined(__EMSCRIPTEN__)
static bool stippleEnabled;
#endif
public void glesLightModeli( unsigned int pname, int param )
{
+#if !defined(__EMSCRIPTEN__)
if(pname == GL_LIGHT_MODEL_TWO_SIDE)
glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, param);
+#endif
}
#ifdef __ANDROID__
void GLGenBuffers(int count, uint * buffer)
{
-#ifdef __ANDROID__
+#if defined(__ANDROID__) || defined(__EMSCRIPTEN__)
glGenBuffers(count, buffer);
#else
#if defined(__WIN32__)
void GLDeleteBuffers(int count, GLuint * buffer)
{
-#ifdef __ANDROID__
+#if defined(__ANDROID__) || defined(__EMSCRIPTEN__)
glDeleteBuffers(count, buffer);
#else
#if defined(__WIN32__)
void GLBindBuffer(int target, uint buffer)
{
-#ifdef __ANDROID__
+#if defined(__ANDROID__) || defined(__EMSCRIPTEN__)
glBindBuffer(target, buffer);
#else
#if defined(__WIN32__)
else
#endif
-#ifdef __ANDROID__
+#if defined(__ANDROID__) || defined(__EMSCRIPTEN__)
glBufferData(target, size, data, usage);
#else
glColor4fv(oglSurface.foreground);
glBegin(GL_LINES);
-#ifdef _GLES
+#if defined(_GLES) || defined(__EMSCRIPTEN__)
if(stippleEnabled)
{
glTexCoord2f(0.5f, 0);
//Logf("Rectangle\n");
glColor4fv(oglSurface.foreground);
-#ifdef _GLES
+#if defined(_GLES) || defined(__EMSCRIPTEN__)
if(stippleEnabled)
{
glBegin(GL_LINES);
void StretchDI(Display display, Surface surface, Bitmap bitmap, int dx, int dy, int sx, int sy, int w, int h, int sw, int sh)
{
+#if !defined(__EMSCRIPTEN__)
float s2dw,s2dh,d2sw,d2sh;
//bool flipX = false, flipY = false;
glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
}
+#endif
}
void BlitDI(Display display, Surface surface, Bitmap bitmap, int dx, int dy, int sx, int sy, int w, int h)
{
+#if !defined(__EMSCRIPTEN__)
//Logf("BlitDI\n");
//Clip against the edges of the source
glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
}
+#endif
}
void FilterDI(Display display, Surface surface, Bitmap bitmap, int dx, int dy, int sx, int sy, int w, int h, int sw, int sh)
if(stipple)
{
-#if defined(_GLES)
+#if defined(_GLES) || defined(__EMSCRIPTEN__)
stippleEnabled = true;
glesLineStipple(1, (uint16)stipple);
#else
}
else
{
-#if defined(_GLES)
+#if defined(_GLES) || defined(__EMSCRIPTEN__)
stippleEnabled = false;
glMatrixMode(GL_TEXTURE);
glLoadIdentity();