2

I'm trying to make a simple 2d game in OpenGL ES 2 using marmalde (mostly for learning) and I'm having some problem with rotated quads. The edges of the quads do not look good and I'm guessing that there is something that I'm missing in my code.

I'm rotating the quads by changing the quads corner-positions. I'm drawing the quads like this:

glVertexAttribPointer(0, 2, GL_FLOAT, 0, 0, squareVertices);
glEnableVertexAttribArray(0);
glBindTexture(GL_TEXTURE_2D, textureID);
glVertexAttribPointer(1, 2, GL_FLOAT, 0, 0, textureVertices);
glEnableVertexAttribArray(1);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); 

enter image description here

Alecktos
  • 77
  • 1
  • 6

1 Answers1

2

There is app.icf file in data folder

Add following lines to enable antialising

[GL]
EGL_SAMPLE_BUFFERS=1
EGL_SAMPLES=4

Even when you enable Antialising it may not work in simulator but will work on devices. Simulator image quality depends on OpenGL ES driver that you select in Configuration -> GL

Max
  • 6,286
  • 5
  • 44
  • 86