Renamed context-related functions to more closely match underlying APIs.

This commit is contained in:
Camilla Berglund
2011-07-27 16:01:27 +02:00
parent 7268fc18b4
commit c1ab73b979
13 changed files with 103 additions and 102 deletions
+3 -3
View File
@@ -80,7 +80,7 @@ static GLuint create_texture(void)
static void draw_quad(GLuint texture)
{
int width, height;
glfwGetWindowSize(glfwGetCurrentWindow(), &width, &height);
glfwGetWindowSize(glfwGetCurrentContext(), &width, &height);
glViewport(0, 0, width, height);
@@ -148,11 +148,11 @@ int main(int argc, char** argv)
while (glfwIsWindow(windows[0]) && glfwIsWindow(windows[1]))
{
glfwMakeWindowCurrent(windows[0]);
glfwMakeContextCurrent(windows[0]);
draw_quad(texture);
glfwSwapBuffers();
glfwMakeWindowCurrent(windows[1]);
glfwMakeContextCurrent(windows[1]);
draw_quad(texture);
glfwSwapBuffers();
+1 -1
View File
@@ -73,7 +73,7 @@ int main(void)
{
for (i = 0; i < 4; i++)
{
glfwMakeWindowCurrent(windows[i]);
glfwMakeContextCurrent(windows[i]);
glClear(GL_COLOR_BUFFER_BIT);
glfwSwapBuffers();
}