bool CRenderSystemGLES::TestRender() { static float theta = 0.0; //RESOLUTION_INFO resInfo = g_settings.m_ResInfo[g_guiSettings.m_LookAndFeelResolution]; //glViewport(0, 0, resInfo.iWidth, resInfo.iHeight); g_matrices.PushMatrix(); g_matrices.Rotatef( theta, 0.0f, 0.0f, 1.0f ); EnableGUIShader(SM_DEFAULT); GLfloat col[3][4]; GLfloat ver[3][2]; GLint posLoc = GUIShaderGetPos(); GLint colLoc = GUIShaderGetCol(); glVertexAttribPointer(posLoc, 2, GL_FLOAT, 0, 0, ver); glVertexAttribPointer(colLoc, 4, GL_FLOAT, 0, 0, col); glEnableVertexAttribArray(posLoc); glEnableVertexAttribArray(colLoc); // Setup Colour values col[0][0] = col[0][3] = col[1][1] = col[1][3] = col[2][2] = col[2][3] = 1.0f; col[0][1] = col[0][2] = col[1][0] = col[1][2] = col[2][0] = col[2][1] = 0.0f; // Setup vertex position values ver[0][0] = 0.0f; ver[0][1] = 1.0f; ver[1][0] = 0.87f; ver[1][1] = -0.5f; ver[2][0] = -0.87f; ver[2][1] = -0.5f; glDrawArrays(GL_TRIANGLES, 0, 3); glDisableVertexAttribArray(posLoc); glDisableVertexAttribArray(colLoc); DisableGUIShader(); g_matrices.PopMatrix(); theta += 1.0f; return true; }
bool CRenderSystemGLES::TestRender() { static float theta = 0.0; //RESOLUTION_INFO resInfo = CDisplaySettings::GetInstance().GetCurrentResolutionInfo(); //glViewport(0, 0, resInfo.iWidth, resInfo.iHeight); glMatrixModview.Push(); glMatrixModview->Rotatef( theta, 0.0f, 0.0f, 1.0f ); EnableGUIShader(SM_DEFAULT); GLfloat col[4] = {1.0f, 0.0f, 0.0f, 1.0f}; GLfloat ver[3][2]; GLint posLoc = GUIShaderGetPos(); GLint colLoc = GUIShaderGetCol(); glVertexAttribPointer(posLoc, 2, GL_FLOAT, 0, 0, ver); glVertexAttribPointer(colLoc, 4, GL_FLOAT, 0, 0, col); glEnableVertexAttribArray(posLoc); glEnableVertexAttribArray(colLoc); // Setup vertex position values ver[0][0] = 0.0f; ver[0][1] = 1.0f; ver[1][0] = 0.87f; ver[1][1] = -0.5f; ver[2][0] = -0.87f; ver[2][1] = -0.5f; glDrawArrays(GL_TRIANGLES, 0, 3); glDisableVertexAttribArray(posLoc); glDisableVertexAttribArray(colLoc); DisableGUIShader(); glMatrixModview.Pop(); theta += 1.0f; return true; }