comparison src/video/SDL_renderer_gles.c @ 3389:3fe2248fde37

Fixed OpenGL ES primitive alpha blending.
author Mike Gorchak <lestat@i.com.ua>
date Tue, 13 Oct 2009 06:28:31 +0000
parents f294338ca6eb
children fe2f10481878
comparison
equal deleted inserted replaced
3388:be67ddef6617 3389:3fe2248fde37
659 data->glVertexPointer(2, GL_SHORT, 0, vertices); 659 data->glVertexPointer(2, GL_SHORT, 0, vertices);
660 data->glEnableClientState(GL_VERTEX_ARRAY); 660 data->glEnableClientState(GL_VERTEX_ARRAY);
661 data->glDrawArrays(GL_POINTS, 0, 1); 661 data->glDrawArrays(GL_POINTS, 0, 1);
662 data->glDisableClientState(GL_VERTEX_ARRAY); 662 data->glDisableClientState(GL_VERTEX_ARRAY);
663 663
664 data->glDisable(GL_BLEND);
665
666 return 0; 664 return 0;
667 } 665 }
668 666
669 static int 667 static int
670 GLES_RenderLine(SDL_Renderer * renderer, int x1, int y1, int x2, int y2) 668 GLES_RenderLine(SDL_Renderer * renderer, int x1, int y1, int x2, int y2)
686 684
687 data->glVertexPointer(2, GL_SHORT, 0, vertices); 685 data->glVertexPointer(2, GL_SHORT, 0, vertices);
688 data->glEnableClientState(GL_VERTEX_ARRAY); 686 data->glEnableClientState(GL_VERTEX_ARRAY);
689 data->glDrawArrays(GL_LINES, 0, 2); 687 data->glDrawArrays(GL_LINES, 0, 2);
690 data->glDisableClientState(GL_VERTEX_ARRAY); 688 data->glDisableClientState(GL_VERTEX_ARRAY);
691
692 data->glDisable(GL_BLEND);
693 689
694 return 0; 690 return 0;
695 } 691 }
696 692
697 static int 693 static int
723 719
724 data->glVertexPointer(2, GL_SHORT, 0, vertices); 720 data->glVertexPointer(2, GL_SHORT, 0, vertices);
725 data->glEnableClientState(GL_VERTEX_ARRAY); 721 data->glEnableClientState(GL_VERTEX_ARRAY);
726 data->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); 722 data->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
727 data->glDisableClientState(GL_VERTEX_ARRAY); 723 data->glDisableClientState(GL_VERTEX_ARRAY);
728
729 data->glDisable(GL_BLEND);
730 724
731 return 0; 725 return 0;
732 } 726 }
733 727
734 static int 728 static int