本文整理汇总了Java中com.jogamp.opengl.GLProfile.get方法的典型用法代码示例。如果您正苦于以下问题:Java GLProfile.get方法的具体用法?Java GLProfile.get怎么用?Java GLProfile.get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jogamp.opengl.GLProfile
的用法示例。
在下文中一共展示了GLProfile.get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import com.jogamp.opengl.GLProfile; //导入方法依赖的package包/类
public static void main(String[] args) {
GLProfile glp = GLProfile.get("GL3");
GLCapabilities caps = new GLCapabilities(glp);
GLWindow glWindow = GLWindow.create(caps);
glWindow.setSize(800, 600);
glWindow.setVisible(true);
glWindow.addWindowListener(new WindowAdapter() {
public void windowDestroyNotify(WindowEvent e) {
System.exit(0);
}
});
FPSAnimator animator = new FPSAnimator(glWindow, 60);
animator.start();
}
示例2: startNewWindows
import com.jogamp.opengl.GLProfile; //导入方法依赖的package包/类
public void startNewWindows() {
//getting the capabilities object of GL2 profile
final GLProfile profile = GLProfile.get( GLProfile.GL2 );
GLCapabilities capabilities = new GLCapabilities(profile);
// The canvas
final GLCanvas glcanvas = new GLCanvas( capabilities );
triview = new Triangulation3DViewer(chip.getCanvas());
glcanvas.addGLEventListener( triview);
glcanvas.setSize( 800, 800 );
//creating frame
final JFrame frame = new JFrame (" triangulation 3D renderer");
//adding canvas to it
frame.getContentPane().add( glcanvas );
frame.setSize(frame.getContentPane().getPreferredSize() );
frame.setVisible( true );
}
示例3: main
import com.jogamp.opengl.GLProfile; //导入方法依赖的package包/类
public static void main(String[] args) {
// getting the capabilities object of GL2 profile
final GLProfile profile = GLProfile.get(GLProfile.GL2);
GLCapabilities glc = new GLCapabilities(profile);
final GLCanvas glCanvas = new GLCanvas(glc);
GameIntro b = new GameIntro();
glCanvas.addGLEventListener(b);
glCanvas.setSize(1300, 800);
// creating frame
final JFrame frame = new JFrame("Welcome to Heavy Evil");
// adding canvas to it
frame.getContentPane().add(glCanvas);
frame.setSize(frame.getContentPane().getPreferredSize());
frame.setVisible(true);
final FPSAnimator animator = new FPSAnimator(glCanvas, 120, true);
animator.start();
glCanvas.isDoubleBuffered();
}
示例4: getProfile
import com.jogamp.opengl.GLProfile; //导入方法依赖的package包/类
/**
* @return supported GL profile
*/
public static GLProfile getProfile() {
GLProfile glp = null;
if (GLProfile.isAvailable(GLProfile.GL3)) {
Console.println("TDME::Proposing GL3");
glp = GLProfile.get(GLProfile.GL3);
} else
if (GLProfile.isAvailable(GLProfile.GL2)) {
Console.println("TDME::Proposing GL2");
glp = GLProfile.get(GLProfile.GL2);
} else
if (GLProfile.isAvailable(GLProfile.GLES2)) {
Console.println("TDME::Proposing GLES2");
glp = GLProfile.get(GLProfile.GLES2);
} else {
Console.println("TDME::No suiting OpenGL profile available!");
return null;
}
Console.println("TDME::Proposing " + glp + ", GL2 = " + glp.isGL2() + ", GLES2 = " + glp.isGLES2() + ", GL3 = " + glp.isGL3());
return glp;
}
示例5: main
import com.jogamp.opengl.GLProfile; //导入方法依赖的package包/类
public static void main(String[] args) {
Display display = NewtFactory.createDisplay(null);
Screen screen = NewtFactory.createScreen(display, 0);
GLProfile glProfile = GLProfile.get(GLProfile.GL3);
GLCapabilities glCapabilities = new GLCapabilities(glProfile);
glWindow = GLWindow.create(screen, glCapabilities);
glWindow.setSize(1044, 768);
glWindow.setPosition(100, 50);
glWindow.setUndecorated(false);
glWindow.setAlwaysOnTop(false);
glWindow.setFullscreen(false);
glWindow.setPointerVisible(true);
glWindow.confinePointer(false);
glWindow.setTitle("Tutorial 09 - Interpolation");
glWindow.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG);
glWindow.setVisible(true);
Tutorial09 tutorial09 = new Tutorial09();
glWindow.addGLEventListener(tutorial09);
animator = new Animator(glWindow);
animator.start();
}
示例6: main
import com.jogamp.opengl.GLProfile; //导入方法依赖的package包/类
public static void main(String[] args) {
Display display = NewtFactory.createDisplay(null);
Screen screen = NewtFactory.createScreen(display, 0);
GLProfile glProfile = GLProfile.get(GLProfile.GL3);
GLCapabilities glCapabilities = new GLCapabilities(glProfile);
glWindow = GLWindow.create(screen, glCapabilities);
glWindow.setSize(1044, 768);
glWindow.setPosition(100, 50);
glWindow.setUndecorated(false);
glWindow.setAlwaysOnTop(false);
glWindow.setFullscreen(false);
glWindow.setPointerVisible(true);
glWindow.confinePointer(false);
glWindow.setTitle("Tutorial 05 - Uniform Variables");
glWindow.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG);
glWindow.setVisible(true);
Tutorial05 tutorial05 = new Tutorial05();
glWindow.addGLEventListener(tutorial05);
animator = new Animator(glWindow);
animator.start();
}
示例7: main
import com.jogamp.opengl.GLProfile; //导入方法依赖的package包/类
public static void main(String[] args) {
Display display = NewtFactory.createDisplay(null);
Screen screen = NewtFactory.createScreen(display, 0);
GLProfile glProfile = GLProfile.get(GLProfile.GL3);
GLCapabilities glCapabilities = new GLCapabilities(glProfile);
glWindow = GLWindow.create(screen, glCapabilities);
glWindow.setSize(1034, 768);
glWindow.setPosition(100, 50);
glWindow.setUndecorated(false);
glWindow.setAlwaysOnTop(false);
glWindow.setFullscreen(false);
glWindow.setPointerVisible(true);
glWindow.confinePointer(false);
glWindow.setTitle("Tutorial 03 - First triangle");
glWindow.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG);
glWindow.setVisible(true);
Tutorial03 tutorial03 = new Tutorial03();
glWindow.addGLEventListener(tutorial03);
animator = new Animator(glWindow);
animator.start();
}
示例8: main
import com.jogamp.opengl.GLProfile; //导入方法依赖的package包/类
public static void main(String[] args) {
Display display = NewtFactory.createDisplay(null);
Screen screen = NewtFactory.createScreen(display, 0);
GLProfile glProfile = GLProfile.get(GLProfile.GL3);
GLCapabilities glCapabilities = new GLCapabilities(glProfile);
glWindow = GLWindow.create(screen, glCapabilities);
glWindow.setSize(1044, 768);
glWindow.setPosition(100, 50);
glWindow.setUndecorated(false);
glWindow.setAlwaysOnTop(false);
glWindow.setFullscreen(false);
glWindow.setPointerVisible(true);
glWindow.confinePointer(false);
glWindow.setTitle("Tutorial 08 - Scaling Transformation");
glWindow.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG);
glWindow.setVisible(true);
Tutorial08 tutorial08 = new Tutorial08();
glWindow.addGLEventListener(tutorial08);
animator = new Animator(glWindow);
animator.start();
}
示例9: main
import com.jogamp.opengl.GLProfile; //导入方法依赖的package包/类
public static void main(String[] args) {
Display display = NewtFactory.createDisplay(null);
Screen screen = NewtFactory.createScreen(display, 0);
GLProfile glProfile = GLProfile.get(GLProfile.GL3);
GLCapabilities glCapabilities = new GLCapabilities(glProfile);
glWindow = GLWindow.create(screen, glCapabilities);
glWindow.setSize(1044, 768);
glWindow.setPosition(100, 50);
glWindow.setUndecorated(false);
glWindow.setAlwaysOnTop(false);
glWindow.setFullscreen(false);
glWindow.setPointerVisible(true);
glWindow.confinePointer(false);
glWindow.setTitle("Tutorial 04 - Shaders");
glWindow.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG);
glWindow.setVisible(true);
Tutorial04 tutorial04 = new Tutorial04();
glWindow.addGLEventListener(tutorial04);
animator = new Animator(glWindow);
animator.start();
}
示例10: main
import com.jogamp.opengl.GLProfile; //导入方法依赖的package包/类
public static void main(String[] args) {
Display display = NewtFactory.createDisplay(null);
Screen screen = NewtFactory.createScreen(display, 0);
GLProfile glProfile = GLProfile.get(GLProfile.GL3);
GLCapabilities glCapabilities = new GLCapabilities(glProfile);
glWindow = GLWindow.create(screen, glCapabilities);
glWindow.setSize(1044, 768);
glWindow.setPosition(100, 50);
glWindow.setUndecorated(false);
glWindow.setAlwaysOnTop(false);
glWindow.setFullscreen(false);
glWindow.setPointerVisible(true);
glWindow.confinePointer(false);
glWindow.setTitle("Tutorial 06 - Translation Transformation");
glWindow.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG);
glWindow.setVisible(true);
Tutorial06 tutorial06 = new Tutorial06();
glWindow.addGLEventListener(tutorial06);
animator = new Animator(glWindow);
animator.start();
}
示例11: main
import com.jogamp.opengl.GLProfile; //导入方法依赖的package包/类
public static void main(String[] args) {
Display display = NewtFactory.createDisplay(null);
Screen screen = NewtFactory.createScreen(display, 0);
GLProfile glProfile = GLProfile.get(GLProfile.GL3);
GLCapabilities glCapabilities = new GLCapabilities(glProfile);
glWindow = GLWindow.create(screen, glCapabilities);
glWindow.setSize(1024, 768);
glWindow.setPosition(100, 50);
glWindow.setUndecorated(false);
glWindow.setAlwaysOnTop(false);
glWindow.setFullscreen(false);
glWindow.setPointerVisible(true);
glWindow.confinePointer(false);
glWindow.setTitle("Tutorial 02 - Hello Dot");
glWindow.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG);
glWindow.setVisible(true);
Tutorial02 tutorial02 = new Tutorial02();
glWindow.addGLEventListener(tutorial02);
animator = new Animator(glWindow);
animator.start();
}
示例12: main
import com.jogamp.opengl.GLProfile; //导入方法依赖的package包/类
public static void main(String[] args) {
Display display = NewtFactory.createDisplay(null);
Screen screen = NewtFactory.createScreen(display, 0);
GLProfile glProfile = GLProfile.get(GLProfile.GL3);
GLCapabilities glCapabilities = new GLCapabilities(glProfile);
glWindow = GLWindow.create(screen, glCapabilities);
glWindow.setSize(1024, 768);
glWindow.setPosition(100, 50);
glWindow.setUndecorated(false);
glWindow.setAlwaysOnTop(false);
glWindow.setFullscreen(false);
glWindow.setPointerVisible(true);
glWindow.confinePointer(false);
glWindow.setTitle("Tutorial 01 - Open a window");
glWindow.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG);
glWindow.setVisible(true);
Tutorial01 tutorial01 = new Tutorial01();
glWindow.addGLEventListener(tutorial01);
animator = new Animator(glWindow);
animator.start();
}
示例13: main
import com.jogamp.opengl.GLProfile; //导入方法依赖的package包/类
public static void main(String[] args) {
Display display = NewtFactory.createDisplay(null);
Screen screen = NewtFactory.createScreen(display, 0);
GLProfile glProfile = GLProfile.get(GLProfile.GL3);
GLCapabilities glCapabilities = new GLCapabilities(glProfile);
glWindow = GLWindow.create(screen, glCapabilities);
glWindow.setSize(1044, 768);
glWindow.setPosition(100, 50);
glWindow.setUndecorated(false);
glWindow.setAlwaysOnTop(false);
glWindow.setFullscreen(false);
glWindow.setPointerVisible(true);
glWindow.confinePointer(false);
glWindow.setTitle("Tutorial 07 - Rotation Transformation");
glWindow.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG);
glWindow.setVisible(true);
Tutorial07 tutorial07 = new Tutorial07();
glWindow.addGLEventListener(tutorial07);
animator = new Animator(glWindow);
animator.start();
}
示例14: main
import com.jogamp.opengl.GLProfile; //导入方法依赖的package包/类
public static void main(String[] args) {
Display display = NewtFactory.createDisplay(null);
Screen screen = NewtFactory.createScreen(display, 0);
GLProfile glProfile = GLProfile.get(GLProfile.GL3);
GLCapabilities glCapabilities = new GLCapabilities(glProfile);
glWindow = GLWindow.create(screen, glCapabilities);
glWindow.setSize(1044, 768);
glWindow.setPosition(100, 50);
glWindow.setUndecorated(false);
glWindow.setAlwaysOnTop(false);
glWindow.setFullscreen(false);
glWindow.setPointerVisible(true);
glWindow.confinePointer(false);
glWindow.setTitle("Tutorial10 - Indexed Draws");
glWindow.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG);
glWindow.setVisible(true);
Tutorial10 tutorial10 = new Tutorial10();
glWindow.addGLEventListener(tutorial10);
animator = new Animator(glWindow);
animator.start();
}
示例15: Window
import com.jogamp.opengl.GLProfile; //导入方法依赖的package包/类
public Window(KeyboardInputHandler aKeyboardInputHandler, MouseHandler aMouseHandler)
{
//m_GLWindow
//ICON TEST
//IOUtil.ClassResources res = new ClassResources(new String[]{"brick.png"}, getClass().getClassLoader(), getClass());
System.setProperty("newt.window.icons", "grimhaus/com/G2Dj/Resource/Graphics/icon-16.png grimhaus/com/G2Dj/Resource/Graphics/icon-32.png");
//NewtFactory.setWindowIcons(res);
//Configure the GL
Display display = NewtFactory.createDisplay(null);
Screen screen = NewtFactory.createScreen(display, 0);
GLProfile glProfile = GLProfile.get(GLProfile./*GL4ES3*/GL2ES2);
GLCapabilities glCapabilities = new GLCapabilities(glProfile);
//Create the GL context & create the window
m_GLWindow = GLWindow.create(screen, glCapabilities);
//Configure the window
setTitle("G2Dj");
setSize(1024, 768);
setPosition(50, 50);
setAlwaysOnTop(false);
setDisplayMode(DisplayMode.Windowed);
setPointerVisible(true);
setPointerLockMode(PointerLockMode.Free);
//Bypass JOGL's multithreaded event system
m_GLWindow.setAutoSwapBufferMode(false);//timing of bufferswaps is up to me
m_GLWindow.getContext().makeCurrent();//Ownership of the context is given to this thread
//Attach window event listeners
m_GLWindow.addWindowListener((WindowListener)this);
m_GLWindow.addKeyListener((KeyListener)aKeyboardInputHandler);
m_GLWindow.addMouseListener((MouseListener)aMouseHandler);
GL gl = m_GLWindow.getGL();
grimhaus.com.G2Dj.Imp.Graphics.GL.gl = m_GLWindow.getGL().getGL2ES2();
}