mirror of
https://github.com/glfw/glfw.git
synced 2026-09-22 16:52:57 +00:00
Renamed context-related functions to more closely match underlying APIs.
This commit is contained in:
+3
-3
@@ -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
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user