My laptop has both Intel integrated graphics and NVidia dedicated graphics, and I can choose which one a particular program gets run on through the right-click menu. I'm learning OpenGL and rendered a basic cube, and compared the framerates with the two. I was surprised to find that while on the dedicated graphics it got around 600 FPS, it got about 1300 FPS on the integrated graphics which doesn't really make sense...anybody know why this is? Here's the relevant rendering code:
GLuint VBO;
glGenBuffers(1, &VBO);
glBindBuffer(GL_ARRAY_BUFFER, VBO);
glBufferData(GL_ARRAY_BUFFER, sizeof(VertexData), VertexData, GL_STATIC_DRAW);
glBindBuffer(GL_ARRAY_BUFFER, 0);
GLuint VAO;
glGenVertexArrays(1, &VAO);
glBindVertexArray(VAO);
GLuint ElementArray;
glGenBuffers(1, &ElementArray);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ElementArray);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(ElementData), ElementData, GL_STATIC_DRAW);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
size_t ColorData = 4 * 8 * sizeof(float);
glBindBuffer(GL_ARRAY_BUFFER, VBO);
glEnableVertexAttribArray(0);
glEnableVertexAttribArray(1);
glVertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, 0, 0);
glVertexAttribPointer(1, 4, GL_FLOAT, GL_FALSE, 0, (void*)ColorData);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ElementArray);
glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindVertexArray(0);
glEnable(GL_CULL_FACE);
glCullFace(GL_BACK);
glFrontFace(GL_CW);
glEnable(GL_DEPTH_TEST);
glDepthMask(GL_TRUE);
glDepthFunc(GL_LEQUAL);
glDepthRange(0.0f, 1.0f);
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClearDepth(1.0f);
glBindVertexArray(VAO);
while(!Window.ShouldClose())
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glDrawElements(GL_TRIANGLE_FAN, 8, GL_UNSIGNED_SHORT, 0);
glDrawElements(GL_TRIANGLE_FAN, 8, GL_UNSIGNED_SHORT, (void*) (8*sizeof(GLshort)));
Window.PollEvents();
Window.SwapBuffers();
}
Maybe it is a driver inefficiency?
If it helps at all, my integrated graphics chipset is the Intel HD Graphics 4000 and my dedicated graphics is a Geforce GT 630 M, and my CPU is Core i5 3230M, with 6 GB RAM