Commits

Marc Lepage  committed 78954f9 Draft

Disable everything that fails to compile.

  • Participants
  • Parent commits f03b51e
  • Branches gles

Comments (0)

Files changed (11)

File src/modules/graphics/opengl/Canvas.cpp

 {
 	virtual GLenum createFBO(GLuint &framebuffer, GLuint &depth_stencil,  GLuint &img, int width, int height)
 	{
+#if !defined(HAVE_GLES)
 		// get currently bound fbo to reset to it later
 		GLint current_fbo;
 		glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &current_fbo);
 		glBindRenderbuffer(GL_RENDERBUFFER, 0);
 		glBindFramebuffer(GL_FRAMEBUFFER, (GLuint)current_fbo);
 		return status;
+#else
+		return 0;
+#endif
 	}
 	virtual void deleteFBO(GLuint framebuffer, GLuint depth_stencil,  GLuint img)
 	{
 
 	virtual GLenum createFBO(GLuint &framebuffer, GLuint &depth_stencil, GLuint &img, int width, int height)
 	{
+#if !defined(HAVE_GLES)
 		GLint current_fbo;
 		glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING_EXT, &current_fbo);
 
 		glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, 0);
 		glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, (GLuint)current_fbo);
 		return status;
+#else
+		return 0;
+#endif
 	}
 
 	virtual void deleteFBO(GLuint framebuffer, GLuint depth_stencil, GLuint img)
 	{
 		deleteTexture(img);
+#if !defined(HAVE_GLES)
 		glDeleteRenderbuffersEXT(1, &depth_stencil);
 		glDeleteFramebuffersEXT(1, &framebuffer);
+#endif
 	}
 
 	virtual void bindFBO(GLuint framebuffer)
 	{
+#if !defined(HAVE_GLES)
 		glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, framebuffer);
+#endif
 	}
 };
 
 {
 	if (!strategy)
 	{
+#if !defined(HAVE_GLES)
 		if (GLEE_VERSION_3_0 || GLEE_ARB_framebuffer_object)
 			strategy = &strategyGL3;
 		else if (GLEE_EXT_framebuffer_object && GLEE_EXT_packed_depth_stencil)
 			strategy = &strategyEXT;
 		else
+#endif
 			strategy = &strategyNone;
 	}
 }
 	if (current != NULL)
 		current->stopGrab();
 
+#if !defined(HAVE_GLES)
 	// bind buffer and clear screen
 	glPushAttrib(GL_VIEWPORT_BIT | GL_TRANSFORM_BIT);
 	strategy->bindFBO(fbo);
 
 	// Switch back to modelview matrix
 	glMatrixMode(GL_MODELVIEW);
+#endif
 
 	// indicate we are using this fbo
 	current = this;
 
 	// bind default
 	strategy->bindFBO(0);
+#if !defined(HAVE_GLES)
 	glMatrixMode(GL_PROJECTION);
 	glPopMatrix();
 	glPopAttrib();
+#endif
 	current = NULL;
 }
 
 		previous = current->fbo;
 
 	strategy->bindFBO(fbo);
+#if !defined(HAVE_GLES)
 	glPushAttrib(GL_COLOR_BUFFER_BIT);
 	glClearColor((float)c.r/255.0f, (float)c.g/255.0f, (float)c.b/255.0f, (float)c.a/255.0f);
 	glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
 	glPopAttrib();
+#endif
 
 	strategy->bindFBO(previous);
 }
 
 void Canvas::drawv(const Matrix &t, const vertex *v) const
 {
+#if !defined(HAVE_GLES)
 	glPushMatrix();
 
 	glMultMatrixf((const GLfloat *)t.getElements());
 	glDisableClientState(GL_VERTEX_ARRAY);
 
 	glPopMatrix();
+#endif
 }
 
 } // opengl

File src/modules/graphics/opengl/Font.cpp

 	// don't waste space for empty glyphs. also fixes a division by zero bug with ati drivers
 	if (w > 0 && h > 0)
 	{
+#if !defined(HAVE_GLES)
 		g->list = glGenLists(1);
+#endif
 		if (0 == g->list)
 		{
 			delete g;
 		Quad *q = new Quad(v, (const float) TEXTURE_WIDTH, (const float) TEXTURE_HEIGHT);
 		const vertex *verts = q->getVertices();
 
+#if !defined(HAVE_GLES)
 		glEnableClientState(GL_VERTEX_ARRAY);
 		glEnableClientState(GL_TEXTURE_COORD_ARRAY);
 		glVertexPointer(2, GL_FLOAT, sizeof(vertex), (GLvoid *)&verts[0].x);
 
 		glDisableClientState(GL_TEXTURE_COORD_ARRAY);
 		glDisableClientState(GL_VERTEX_ARRAY);
+#endif
 
 		delete q;
 	}
 
 void Font::print(std::string text, float x, float y, float letter_spacing, float angle, float sx, float sy, float ox, float oy, float kx, float ky)
 {
+#if !defined(HAVE_GLES)
 	float dx = 0.0f; // spacing counter for newline handling
 	glPushMatrix();
 
 		throw love::Exception("%s", e.what());
 	}
 	glPopMatrix();
+#endif
 }
 
 void Font::print(char character, float x, float y)
 
 	if (0 != glyph->texture)
 	{
+#if !defined(HAVE_GLES)
 		glPushMatrix();
 		glTranslatef(x, floor(y+getHeight() + 0.5f), 0.0f);
 		bindTexture(glyph->texture);
 		glCallList(glyph->list);
 		glPopMatrix();
+#endif
 	}
 }
 
 	while (it != glyphs.end())
 	{
 		g = it->second;
+#if !defined(HAVE_GLES)
 		glDeleteLists(g->list, 1);
+#endif
 		delete g;
 		glyphs.erase(it++);
 	}

File src/modules/graphics/opengl/Graphics.cpp

 	s.colorMode = getColorMode();
 	//get line style
 	s.lineStyle = lineStyle;
+#if !defined(HAVE_GLES)
 	//get the point size
 	glGetFloatv(GL_POINT_SIZE, &s.pointSize);
 	//get point style
 	s.pointStyle = (glIsEnabled(GL_POINT_SMOOTH) == GL_TRUE) ? Graphics::POINT_SMOOTH : Graphics::POINT_ROUGH;
+#endif
 	//get scissor status
 	s.scissor = (glIsEnabled(GL_SCISSOR_TEST) == GL_TRUE);
 	//do we have scissor, if so, store the box
 
 	// Enable line/point smoothing.
 	setLineStyle(LINE_SMOOTH);
+#if !defined(HAVE_GLES)
 	glEnable(GL_POINT_SMOOTH);
 	glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
+#endif
 
 	// Enable textures
 	glEnable(GL_TEXTURE_2D);
 	// Set the viewport to top-left corner
 	glViewport(0, 0, width, height);
 
+#if !defined(HAVE_GLES)
 	// Reset the projection matrix
 	glMatrixMode(GL_PROJECTION);
 	glLoadIdentity();
 	// Reset modelview matrix
 	glMatrixMode(GL_MODELVIEW);
 	glLoadIdentity();
+#endif
 
 	// Set pixel row alignment
 	glPixelStorei(GL_UNPACK_ALIGNMENT, 2);
 	// Restore the display state.
 	restoreState(tempState);
 
+#if !defined(HAVE_GLES)
 	// Get the maximum number of matrices
 	// subtract a few to give the engine some room.
 	glGetIntegerv(GL_MAX_MODELVIEW_STACK_DEPTH, &matrixLimit);
 	matrixLimit -= 5;
+#endif
 
 	return success;
 }
 void Graphics::clear()
 {
 	glClear(GL_COLOR_BUFFER_BIT);
+#if !defined(HAVE_GLES)
 	glLoadIdentity();
+#endif
 }
 
 void Graphics::present()
 		error_string << "Not supported by your OpenGL implementation.";
 		break;
 
+#if !defined(HAVE_GLES)
 		// remaining error codes are highly unlikely:
 	case GL_FRAMEBUFFER_UNDEFINED:
 	case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT:
 	case GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:
 		error_string << "Error in implementation. Possible fix: Make canvas width and height powers of two.";
 		break;
+#endif
 
 	default:
 		// my intel hda card wrongly returns 0 to glCheckFramebufferStatus() but sets
 
 void Graphics::setColor(const Color &c)
 {
+#if !defined(HAVE_GLES)
 	glColor4ubv(&c.r);
+#endif
 }
 
 Color Graphics::getColor()
 {
 	float c[4];
+#if !defined(HAVE_GLES)
 	glGetFloatv(GL_CURRENT_COLOR, c);
+#endif
 
 	Color t;
 	t.r = (unsigned char)(255.0f*c[0]);
 
 void Graphics::setBlendMode(Graphics::BlendMode mode)
 {
+#if !defined(HAVE_GLES)
 	glAlphaFunc(GL_GEQUAL, 0);
 
 	if (GLEE_VERSION_1_4 || GLEE_ARB_imaging)
 			throw Exception("This graphics card does not support the subtract blend mode!");
 		// GL_FUNC_ADD is the default even without access to glBlendEquation, so that'll still work.
 	}
+#endif
 
 	if (mode == BLEND_ALPHA)
 		glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 
 void Graphics::setColorMode(Graphics::ColorMode mode)
 {
+#if !defined(HAVE_GLES)
 	if (mode == COLOR_MODULATE)
 		glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 	else if (mode == COLOR_COMBINE)
 	}
 	else // mode = COLOR_REPLACE
 		glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
+#endif
 }
 
 void Graphics::setDefaultImageFilter(const Image::Filter &f)
 Graphics::BlendMode Graphics::getBlendMode()
 {
 	GLint dst, src, equation;
+#if !defined(HAVE_GLES)
 	glGetIntegerv(GL_BLEND_DST, &dst);
 	glGetIntegerv(GL_BLEND_SRC, &src);
+#endif
 	glGetIntegerv(GL_BLEND_EQUATION, &equation);
 
 	if (equation == GL_FUNC_REVERSE_SUBTRACT)  // && src == GL_SRC_ALPHA && dst == GL_ONE
 
 Graphics::ColorMode Graphics::getColorMode()
 {
+#if !defined(HAVE_GLES)
 	GLint mode;
 	glGetTexEnviv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, &mode);
 
 		return COLOR_COMBINE;
 	else // mode == GL_REPLACE
 		return COLOR_REPLACE;
+#endif
 }
 
 const Image::Filter &Graphics::getDefaultImageFilter() const
 
 void Graphics::setPointSize(float size)
 {
+#if !defined(HAVE_GLES)
 	glPointSize((GLfloat)size);
+#endif
 }
 
 void Graphics::setPointStyle(Graphics::PointStyle style)
 {
+#if !defined(HAVE_GLES)
 	if (style == POINT_SMOOTH)
 		glEnable(GL_POINT_SMOOTH);
 	else // love::POINT_ROUGH
 		glDisable(GL_POINT_SMOOTH);
+#endif
 }
 
 void Graphics::setPoint(float size, Graphics::PointStyle style)
 {
+#if !defined(HAVE_GLES)
 	if (style == POINT_SMOOTH)
 		glEnable(GL_POINT_SMOOTH);
 	else // POINT_ROUGH
 		glDisable(GL_POINT_SMOOTH);
 
 	glPointSize((GLfloat)size);
+#endif
 }
 
 float Graphics::getPointSize()
 {
 	GLfloat size;
+#if !defined(HAVE_GLES)
 	glGetFloatv(GL_POINT_SIZE, &size);
+#endif
 	return (float)size;
 }
 
 Graphics::PointStyle Graphics::getPointStyle()
 {
+#if !defined(HAVE_GLES)
 	if (glIsEnabled(GL_POINT_SMOOTH) == GL_TRUE)
 		return POINT_SMOOTH;
 	else
+#endif
 		return POINT_ROUGH;
 }
 
 int Graphics::getMaxPointSize()
 {
 	GLint max;
+#if !defined(HAVE_GLES)
 	glGetIntegerv(GL_POINT_SIZE_MAX, &max);
+#endif
 	return (int)max;
 }
 
 
 void Graphics::point(float x, float y)
 {
+#if !defined(HAVE_GLES)
 	glDisable(GL_TEXTURE_2D);
 	glBegin(GL_POINTS);
 	glVertex2f(x, y);
 	glEnd();
 	glEnable(GL_TEXTURE_2D);
+#endif
 }
 
 // Calculate line boundary points u1 and u2. Sketch:
 	// even indices in overdraw* point to inner vertices => alpha = current-alpha,
 	// odd indices point to outer vertices => alpha = 0.
 	GLfloat c[4];
+#if !defined(HAVE_GLES)
 	glGetFloatv(GL_CURRENT_COLOR, c);
+#endif
 
 	Color *colors = new Color[2*count+2];
 	for (size_t i = 0; i < 2*count+2; ++i)
 						  GLubyte(c[3] * 255.f) * GLubyte(i%2 == 0));
 	}
 
+#if !defined(HAVE_GLES)
 	// draw faded out line halos
 	glEnableClientState(GL_COLOR_ARRAY);
 	glColorPointer(4, GL_UNSIGNED_BYTE, 0, colors);
 	// "if GL_COLOR_ARRAY is enabled, the value of the current color is
 	// undefined after glDrawArrays executes"
 	glColor4fv(c);
+#endif
 
 	delete[] colors;
 }
 		overdraw = new Vector[2*count+2];
 		// TODO: is there a better way to get the pixel size at the current scale?
 		GLfloat m[16];
+#if !defined(HAVE_GLES)
 		glGetFloatv(GL_MODELVIEW_MATRIX, m);
+#endif
 		float det  = m[0]*m[5]*m[10] + m[4]*m[9]*m[2] + m[8]*m[1]*m[6];
 		det       -= m[2]*m[5]*m[8]  + m[6]*m[9]*m[0] + m[10]*m[1]*m[4];
 		pixel_size = 1.f / sqrt(det);
 	pushIntersectionPoints(vertices, overdraw, count-2, count, halfwidth, overdraw_factor, p,q,r);
 	// end get line vertex boundaries
 
+#if !defined(HAVE_GLES)
 	// draw the core line
 	glDisable(GL_TEXTURE_2D);
 	glEnableClientState(GL_VERTEX_ARRAY);
 
 	glDisableClientState(GL_VERTEX_ARRAY);
 	glEnable(GL_TEXTURE_2D);
+#endif
 
 	// cleanup
 	delete[] vertices;
 	}
 	else
 	{
+#if !defined(HAVE_GLES)
 		glDisable(GL_TEXTURE_2D);
 		glEnableClientState(GL_VERTEX_ARRAY);
 		glVertexPointer(2, GL_FLOAT, 0, (const GLvoid *) coords);
 		glDrawArrays(GL_TRIANGLE_FAN, 0, points + 2);
 		glDisableClientState(GL_VERTEX_ARRAY);
 		glEnable(GL_TEXTURE_2D);
+#endif
 	}
 
 	delete[] coords;
 	}
 	else
 	{
+#if !defined(HAVE_GLES)
 		glDisable(GL_TEXTURE_2D);
 		glEnableClientState(GL_VERTEX_ARRAY);
 		glVertexPointer(2, GL_FLOAT, 0, (const GLvoid *)coords);
 		glDrawArrays(GL_POLYGON, 0, count/2-1); // opengl will close the polygon for us
 		glDisableClientState(GL_VERTEX_ARRAY);
 		glEnable(GL_TEXTURE_2D);
+#endif
 	}
 }
 
 {
 	if (userMatrices == matrixLimit)
 		throw Exception("Maximum stack depth reached.");
+#if !defined(HAVE_GLES)
 	glPushMatrix();
+#endif
 	++userMatrices;
 }
 
 {
 	if (userMatrices < 1)
 		throw Exception("Minimum stack depth reached. (More pops than pushes?)");
+#if !defined(HAVE_GLES)
 	glPopMatrix();
+#endif
 	--userMatrices;
 }
 
 void Graphics::rotate(float r)
 {
+#if !defined(HAVE_GLES)
 	glRotatef(LOVE_TODEG(r), 0, 0, 1);
+#endif
 }
 
 void Graphics::scale(float x, float y)
 {
+#if !defined(HAVE_GLES)
 	glScalef(x, y, 1);
+#endif
 }
 
 void Graphics::translate(float x, float y)
 {
+#if !defined(HAVE_GLES)
 	glTranslatef(x, y, 0);
+#endif
 }
 
 void Graphics::shear(float kx, float ky)
 {
 	Matrix t;
 	t.setShear(kx, ky);
+#if !defined(HAVE_GLES)
 	glMultMatrixf((const GLfloat *)t.getElements());
+#endif
 }
 
 void Graphics::drawTest(Image *image, float x, float y, float a, float sx, float sy, float ox, float oy)
 
 	const vertex *vertices = image->getVertices();
 
+#if !defined(HAVE_GLES)
 	glEnableClientState(GL_VERTEX_ARRAY);
 	glEnableClientState(GL_TEXTURE_COORD_ARRAY);
 	glVertexPointer(2, GL_FLOAT, sizeof(vertex), (GLvoid *)&buf[0].x);
 	glDrawArrays(GL_QUADS, 0, 4);
 	glDisableClientState(GL_TEXTURE_COORD_ARRAY);
 	glDisableClientState(GL_VERTEX_ARRAY);
+#endif
 }
 
 bool Graphics::hasFocus()

File src/modules/graphics/opengl/Image.cpp

 	vertices[2].s = s;
 	vertices[3].s = s;
 
+#if !defined(HAVE_GLES)
 	glTexImage2D(GL_TEXTURE_2D,
 				 0,
 				 GL_RGBA8,
 				 GL_RGBA,
 				 GL_UNSIGNED_BYTE,
 				 0);
+#endif
 
 	glTexSubImage2D(GL_TEXTURE_2D,
 					0,
 	glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
 	glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
 
+#if !defined(HAVE_GLES)
 	glTexImage2D(GL_TEXTURE_2D,
 				 0,
 				 GL_RGBA8,
 				 GL_RGBA,
 				 GL_UNSIGNED_BYTE,
 				 data->getData());
+#endif
 
 	setFilter(settings.filter);
 	setWrap(settings.wrap);
 {
 	bind();
 
+#if !defined(HAVE_GLES)
 	glPushMatrix();
 
 	glMultMatrixf((const GLfloat *)t.getElements());
 	glDisableClientState(GL_VERTEX_ARRAY);
 
 	glPopMatrix();
+#endif
 }
 
 bool Image::hasNpot()
 {
+#if !defined(HAVE_GLES)
 	return GLEE_ARB_texture_non_power_of_two != 0;
+#else
+	return true;
+#endif
 }
 
 void Image::setDefaultFilter(const Image::Filter &f)

File src/modules/graphics/opengl/ParticleSystem.cpp

 {
 	if (sprite == 0) return;  // just in case of failure
 
+#if !defined(HAVE_GLES)
 	glPushMatrix();
 	glPushAttrib(GL_CURRENT_BIT);
 
 
 	glPopAttrib();
 	glPopMatrix();
+#endif
 }
 
 void ParticleSystem::update(float dt)

File src/modules/graphics/opengl/PixelEffect.cpp

 	// compile fragment shader code
 	const char *src = _code.c_str();
 	GLint strlen = _code.length();
+#if !defined(HAVE_GLES)
 	glShaderSource(shader, 1, (const GLchar **)&src, &strlen);
+#endif
 	glCompileShader(shader);
 
 	GLint compile_ok;
 
 std::string PixelEffect::getGLSLVersion()
 {
+#if !defined(HAVE_GLES)
 	// GL_SHADING_LANGUAGE_VERSION is not available in OpenGL < 2.1.
 	// Be very pessimistic about the GLSL version in that case.
 	if (!GLEE_VERSION_2_1)
 		return "0.0";
+#endif
 
 	// the version string always begins with a version number of the format
 	//   major_number.minor_number
 
 bool PixelEffect::isSupported()
 {
+#if !defined(HAVE_GLES)
 	return GLEE_VERSION_2_0 && GLEE_ARB_shader_objects && GLEE_ARB_fragment_shader && getGLSLVersion() >= "1.2";
+#else
+	return true;
+#endif
 }
 
 std::string PixelEffect::getWarnings() const

File src/modules/graphics/opengl/Quad.cpp

 
 void Quad::refresh(const Viewport &v, float sw, float sh)
 {
+#if !defined(HAVE_GLES)
 	if (!GLEE_ARB_texture_non_power_of_two)
 	{
 		sw = next_p2(sw);
 		sh = next_p2(sh);
 	}
+#endif
 	viewport = v;
 
 	vertices[0].x = 0;

File src/modules/graphics/opengl/SpriteBatch.cpp

 
 	static Matrix t;
 
+#if !defined(HAVE_GLES)
 	glPushMatrix();
 
 	t.setTransformation(x, y, angle, sx, sy, ox, oy, kx, ky);
 	glMultMatrixf((const GLfloat *)t.getElements());
+#endif
 
 	image->bind();
 
 	// Apply per-sprite color, if a color is set.
 	if (color)
 	{
+#if !defined(HAVE_GLES)
 		glEnableClientState(GL_COLOR_ARRAY);
 		glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(vertex), array_buf->getPointer(color_offset));
+#endif
 	}
 
+#if !defined(HAVE_GLES)
 	glEnableClientState(GL_VERTEX_ARRAY);
 	glVertexPointer(2, GL_FLOAT, sizeof(vertex), array_buf->getPointer(vertex_offset));
 
 	glDisableClientState(GL_COLOR_ARRAY);
 
 	glPopMatrix();
+#endif
 }
 
 void SpriteBatch::addv(const vertex *v, int index)

File src/modules/graphics/opengl/VertexBuffer.cpp

 	, buffer_copy(0)
 	, mapped(0)
 {
+#if !defined(HAVE_GLES)
 	if (!(GLEE_ARB_vertex_buffer_object || GLEE_VERSION_1_5))
 		throw love::Exception("Not supported");
+#endif
 
 	bool ok = load(false);
 
 	mapped = malloc(getSize());
 	if (!mapped)
 		throw love::Exception("Out of memory (oh the humanity!)");
+#if !defined(HAVE_GLES)
 	glGetBufferSubDataARB(getTarget(), 0, getSize(), mapped);
+#endif
 
 	return mapped;
 }
 
 void VBO::unmap()
 {
+#if !defined(HAVE_GLES)
 	glBufferSubDataARB(getTarget(), 0, getSize(), mapped);
+#endif
 	free(mapped);
 	mapped = 0;
 }
 
 void VBO::bind()
 {
+#if !defined(HAVE_GLES)
 	glBindBufferARB(getTarget(), vbo);
+#endif
 }
 
 void VBO::unbind()
 {
+#if !defined(HAVE_GLES)
 	glBindBufferARB(getTarget(), 0);
+#endif
 }
 
 void VBO::fill(size_t offset, size_t size, const void *data)
 {
 	if (mapped)
 		memcpy(static_cast<char *>(mapped) + offset, data, size);
+#if !defined(HAVE_GLES)
 	else
 		glBufferSubDataARB(getTarget(), offset, size, data);
+#endif
 }
 
 const void *VBO::getPointer(size_t offset) const
 
 bool VBO::load(bool restore)
 {
+#if !defined(HAVE_GLES)
 	glGenBuffersARB(1, &vbo);
+#endif
 
 	VertexBuffer::Bind bind(*this);
 
 		/* clear error messages */;
 
 	// Note that if 'src' is '0', no data will be copied.
+#if !defined(HAVE_GLES)
 	glBufferDataARB(getTarget(), getSize(), src, getUsage());
+#endif
 	GLenum err = glGetError();
 
 	// Clean up buffer_copy, if it exists.
 		VertexBuffer::Bind bind(*this);
 
 		GLint size;
+#if !defined(HAVE_GLES)
 		glGetBufferParameterivARB(getTarget(), GL_BUFFER_SIZE, &size);
+#endif
 
 		const char *src = static_cast<char *>(map());
 

File src/modules/graphics/opengl/VertexBuffer.h

 	#include "GLee.h"
 #endif
 
+// STD
+#include <cstddef> // For size_t
+
 namespace love
 {
 namespace graphics

File src/modules/graphics/opengl/wrap_Graphics.cpp

 				supported = false;
 			break;
 		case Graphics::SUPPORT_SUBTRACTIVE:
+#if !defined(HAVE_GLES)
 			supported = (GLEE_VERSION_1_4 || GLEE_ARB_imaging) || (GLEE_EXT_blend_minmax && GLEE_EXT_blend_subtract);
+#endif
 			break;
 		default:
 			supported = false;