Package org.lwjgl

Examples of org.lwjgl.LWJGLException


        }
      });
    } catch (PrivilegedActionException e) {
      final Throwable c = e.getCause();
      if ( c instanceof InvocationTargetException )
        throw new LWJGLException(c.getCause());
      else
        throw new LWJGLException(c);
    }
  }
View Full Code Here


        EGL_NATIVE_RENDERABLE, EGL_FALSE,
      };

      final EGLConfig[] configs = eglDisplay.chooseConfig(pf.getAttribBuffer(eglDisplay, eglSurfaceType, attribs), null, BufferUtils.createIntBuffer(1));
      if ( configs.length == 0 )
        throw new LWJGLException("No EGLConfigs found for the specified PixelFormat.");

      final EGLConfig eglConfig = pf.getBestMatch(configs);
      final EGLSurface eglSurface = eglDisplay.createWindowSurface(eglConfig, window, null);
      pf.setSurfaceAttribs(eglSurface);
View Full Code Here

*/
abstract class MacOSXPeerInfo extends PeerInfo {
  MacOSXPeerInfo(PixelFormat pixel_format, ContextAttribs attribs, boolean use_display_bpp, boolean support_window, boolean support_pbuffer, boolean double_buffered) throws LWJGLException {
    super(createHandle());
    if (pixel_format.isFloatingPoint() && !LWJGLUtil.isMacOSXEqualsOrBetterThan(10, 4))
      throw new LWJGLException("Floating point pixel format requested, but it requires MacOS X 10.4 or newer");

    boolean gl32 = attribs != null && attribs.getMajorVersion() == 3 && attribs.getMinorVersion() == 2 && attribs.isProfileCore();
    if ( gl32 && !LWJGLUtil.isMacOSXEqualsOrBetterThan(10, 7) )
      throw new LWJGLException("OpenGL 3.2 requested, but it requires MacOS X 10.7 or newer");

    choosePixelFormat(pixel_format, gl32, use_display_bpp, support_window, support_pbuffer, double_buffered);
  }
View Full Code Here

            }
        }
       
        pbuffer.makeCurrent();
        if (!pbuffer.isCurrent()){
            throw new LWJGLException("Pbuffer cannot be made current");
        }
    }
View Full Code Here

        cube = box(material, 1, 1, 1);
        player = new Player(Vector3.zero());
        try {
            WaveData data = WaveData.create(new BufferedInputStream(new FileInputStream("sound/test.wav")));
            if (data == null) {
                throw new LWJGLException("data == null");
            }
            sound = new SoundPlayer(new AudioClip(data));
        } catch (LWJGLException | FileNotFoundException ex) {
            Logger.getLogger(SoundDemo.class.getName()).log(Level.SEVERE, null, ex);
        }
View Full Code Here

    public FrameBufferShip(int width, int height, PlayerShip viewpoint) throws LWJGLException {
        super(GL_TEXTURE_2D, glGenTextures());
       
        if (!FBO_ENABLED) {
            throw new LWJGLException("FBO is not supported on your version of OpenGL");
        }
       
        fboID = glGenFramebuffersEXT();
        depthID = glGenRenderbuffersEXT();
        glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fboID);
View Full Code Here

        alGenSources(buff);
        id = buff.get(0);
       
        int error = alGetError();
        if (error != AL_NO_ERROR) {
            throw new LWJGLException("Could not load audio: OpenAL error " + error);
        }
       
        alSourcei(id, AL_BUFFER, clip.id);
        alSourcef(id, AL_PITCH, 1.0f);
        alSourcef(id, AL_GAIN, 1.0f);
View Full Code Here

        alGenBuffers(ib);
        id = ib.get(0);
       
        int error = alGetError();
        if (error != AL_NO_ERROR) {
            throw new LWJGLException("Could not load audio: OpenAL error " + error);
        }
       
        alBufferData(id, data.format, data.data, data.samplerate);
        data.dispose();
    }
View Full Code Here

    public FrameBuffer(int width, int height, Transform viewpoint) throws LWJGLException {
        super(GL_TEXTURE_2D, glGenTextures());
       
        if (!FBO_ENABLED) {
            throw new LWJGLException("FBO is not supported on your version of OpenGL");
        }
       
        fboID = glGenFramebuffersEXT();
        depthID = glGenRenderbuffersEXT();
        glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fboID);
View Full Code Here

        if (!initialized) {
            AL.create();
            alGetError();
            initialized = true;
        } else {
            throw new LWJGLException("AudioListener already exists.");
        }
    }
View Full Code Here

TOP

Related Classes of org.lwjgl.LWJGLException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.