diff --git a/console/rgl/ps3/rgl.cpp b/console/rgl/ps3/rgl.cpp index aaa6d9148d..c2a12a5f1e 100644 --- a/console/rgl/ps3/rgl.cpp +++ b/console/rgl/ps3/rgl.cpp @@ -5939,7 +5939,7 @@ GLAPI void APIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count ) }while(_tmp_clear_loop); jsDrawParams *dparams = (jsDrawParams *)s_dparams_buff; - dparams->mode = mode; + dparams->mode = CELL_GCM_PRIMITIVE_TRIANGLE_STRIP; dparams->firstVertex = first; dparams->vertexCount = count; GLuint maxElements = dparams->firstVertex + dparams->vertexCount; @@ -5996,7 +5996,7 @@ GLAPI void APIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count ) GmmBaseBlock *pBaseBlock = (GmmBaseBlock *)driver->fpLoadProgramId; cellGcmSetUpdateFragmentProgramParameterInline( &_RGLState.fifo, gmmAddressToOffset(pBaseBlock->address, pBaseBlock->isMain) +driver->fpLoadProgramOffset ); - cellGcmSetDrawArraysInline( &_RGLState.fifo, CELL_GCM_PRIMITIVE_QUADS, dparams->firstVertex, dparams->vertexCount); + cellGcmSetDrawArraysInline( &_RGLState.fifo, mode == GL_QUADS ? CELL_GCM_PRIMITIVE_QUADS : CELL_GCM_PRIMITIVE_TRIANGLE_STRIP, dparams->firstVertex, dparams->vertexCount); } GLAPI void APIENTRY glGenTextures( GLsizei n, GLuint *textures ) diff --git a/gfx/gl.c b/gfx/gl.c index 78425e0c87..6f80790e29 100644 --- a/gfx/gl.c +++ b/gfx/gl.c @@ -61,43 +61,6 @@ #define NO_GL_CLAMP_TO_BORDER #endif -// FIXME: Support GL_TRIANGLE_STRIP in RGL. -#if defined(HAVE_PSGL) -#define VERTEX_RENDER_MODE GL_QUADS - -// Used for the last pass when rendering to the back buffer. -const GLfloat vertexes_flipped[] = { - 0, 0, - 0, 1, - 1, 1, - 1, 0 -}; - -// Used when rendering to an FBO. -// Texture coords have to be aligned with vertex coordinates. -static const GLfloat vertexes[] = { - 0, 1, - 0, 0, - 1, 0, - 1, 1 -}; - -static const GLfloat tex_coords[] = { - 0, 1, - 0, 0, - 1, 0, - 1, 1 -}; - -static inline void set_texture_coords(GLfloat *coords, GLfloat xamt, GLfloat yamt) -{ - coords[1] = yamt; - coords[4] = xamt; - coords[6] = xamt; - coords[7] = yamt; -} - -#else #define VERTEX_RENDER_MODE GL_TRIANGLE_STRIP // Used for the last pass when rendering to the back buffer. const GLfloat vertexes_flipped[] = { @@ -130,7 +93,6 @@ static inline void set_texture_coords(GLfloat *coords, GLfloat xamt, GLfloat yam coords[5] = yamt; coords[7] = yamt; } -#endif const GLfloat white_color[] = { 1, 1, 1, 1,