LWJGL 3.2.0+ fonts

前端 未结 1 874
一个人的身影
一个人的身影 2021-02-10 15:48

I\'ve been working with lwjgl for some time, and recently I\'ve decided to switch from fixed function pipeline to shaders. So, the first thing when I\'m starting my program, I s

相关标签:
1条回答
  • 2021-02-10 16:11

    A similar question popped up on the GameDevSE as well you might want for check it out here

    Citing:

    It sounds like you probably didn't actually request an appropriately-versioned OpenGL context (that is, one with 3.2 support). To do so, you must provide context attributes requesting the desired version when you call Display.create()

    PixelFormat pixelFormat = new PixelFormat();
    ContextAttribs contextAtrributes = new ContextAttribs(3, 2)
        .withForwardCompatible(true)
        .withProfileCore(true);
    
    try {
          Display.setDisplayMode(new DisplayMode(320, 240));
          Display.setTitle("Version selection");
          Display.create(pixelFormat, contextAtrributes);
    } catch (LWJGLException e) {
        e.printStackTrace();
        System.exit(-1);
    }
    
    0 讨论(0)
提交回复
热议问题