mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-09-27 15:26:33 -04:00
ATV Demod: replaced GL_POLYGON by GL_TRIANGLES as GL_POLYGON is deprecated and compilation fails in some environments
This commit is contained in:
parent
d5f02aee06
commit
b805cc89c9
@ -149,15 +149,21 @@ void GLShaderArray::RenderPixels(unsigned char *chrData)
|
|||||||
QOpenGLFunctions *ptrF;
|
QOpenGLFunctions *ptrF;
|
||||||
int intI;
|
int intI;
|
||||||
int intJ;
|
int intJ;
|
||||||
int intNbVertices = 4;
|
int intNbVertices = 6;
|
||||||
|
|
||||||
QMatrix4x4 objQMatrix;
|
QMatrix4x4 objQMatrix;
|
||||||
|
|
||||||
GLfloat arrVertices[] =
|
GLfloat arrVertices[] =
|
||||||
{ -1.0f, -1.0f, -1.0f, 1.0f, 1.0f, 1.0f, 1.0f, -1.0f };
|
// 2 3
|
||||||
|
// 1 4
|
||||||
|
//1 2 3 3 4 1
|
||||||
|
{ -1.0f, -1.0f, -1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f };
|
||||||
|
|
||||||
GLfloat arrTextureCoords[] =
|
GLfloat arrTextureCoords[] =
|
||||||
{ 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f };
|
// 1 4
|
||||||
|
// 2 3
|
||||||
|
//1 2 3 3 4 1
|
||||||
|
{ 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f };
|
||||||
|
|
||||||
QRgb *ptrLine;
|
QRgb *ptrLine;
|
||||||
int intVal;
|
int intVal;
|
||||||
@ -209,7 +215,7 @@ void GLShaderArray::RenderPixels(unsigned char *chrData)
|
|||||||
ptrF->glEnableVertexAttribArray(1); // texture coordinates
|
ptrF->glEnableVertexAttribArray(1); // texture coordinates
|
||||||
ptrF->glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 0, arrTextureCoords);
|
ptrF->glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 0, arrTextureCoords);
|
||||||
|
|
||||||
ptrF->glDrawArrays(GL_POLYGON, 0, intNbVertices);
|
ptrF->glDrawArrays(GL_TRIANGLES, 0, intNbVertices);
|
||||||
|
|
||||||
//cleanup
|
//cleanup
|
||||||
ptrF->glDisableVertexAttribArray(0);
|
ptrF->glDisableVertexAttribArray(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user