Example usage for org.lwjgl.opengl WGL wglMakeCurrent

List of usage examples for org.lwjgl.opengl WGL wglMakeCurrent

Introduction

In this page you can find the example usage for org.lwjgl.opengl WGL wglMakeCurrent.

Prototype

@NativeType("BOOL")
public static boolean wglMakeCurrent(@NativeType("HDC") long hdc, @NativeType("HGLRC") long hglrc) 

Source Link

Document

Makes a specified OpenGL rendering context the calling thread's current rendering context.

Usage

From source file:com.google.gapid.glcanvas.GlCanvas.java

License:Apache License

public void setCurrent() {
    checkWidget();
    long dc = User32.GetDC(handle);
    WGL.wglMakeCurrent(dc, context);
    User32.ReleaseDC(handle, dc);
}

From source file:go.graphics.swing.contextcreator.WGLContextCreator.java

License:Open Source License

@Override
protected void makeCurrent(boolean draw) {
    if (draw) {//from  ww  w .j a  v  a2 s  . com
        WGL.wglMakeCurrent(hdc, context);
    } else {
        WGL.wglMakeCurrent(0, 0);
    }
}