Package org.lwjgl.opengl

Examples of org.lwjgl.opengl.ContextCapabilities


    setMipmapLevels(textureId, (int)Math.round(Math.log((double)tileWidth)/Math.log(2D)));

    GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL12.GL_TEXTURE_MAX_LOD, getMipmapLevels(textureId));

    ContextCapabilities capabilities = GLContext.getCapabilities();
    if (capabilities.OpenGL30) {
      MipMapUtils.mode = 1;
    } else if (capabilities.GL_EXT_framebuffer_object) {
      MipMapUtils.mode = 2;
    } else if (capabilities.OpenGL14) {
View Full Code Here


    GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, filter);
    if (mipmap) {
      GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST_MIPMAP_LINEAR);
      GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL12.GL_TEXTURE_MAX_LOD, 8);

      ContextCapabilities capabilities = GLContext.getCapabilities();
      if (capabilities.OpenGL30) {
        GL30.glGenerateMipmap(GL11.GL_TEXTURE_2D);
      } else if (capabilities.GL_EXT_framebuffer_object) {
        EXTFramebufferObject.glGenerateMipmapEXT(GL11.GL_TEXTURE_2D);
      } else if (capabilities.OpenGL14) {
View Full Code Here

  public void addServerTypeToSnooper(PlayerUsageSnooper par1PlayerUsageSnooper) {
    par1PlayerUsageSnooper.addData("opengl_version", GL11.glGetString(GL11.GL_VERSION));
    par1PlayerUsageSnooper.addData("opengl_vendor", GL11.glGetString(GL11.GL_VENDOR));
    par1PlayerUsageSnooper.addData("client_brand", ClientBrandRetriever.getClientModName());
    par1PlayerUsageSnooper.addData("launched_version", this.launchedVersion);
    ContextCapabilities var2 = GLContext.getCapabilities();
    par1PlayerUsageSnooper.addData("gl_caps[ARB_multitexture]", Boolean.valueOf(var2.GL_ARB_multitexture));
    par1PlayerUsageSnooper.addData("gl_caps[ARB_multisample]", Boolean.valueOf(var2.GL_ARB_multisample));
    par1PlayerUsageSnooper.addData("gl_caps[ARB_texture_cube_map]", Boolean.valueOf(var2.GL_ARB_texture_cube_map));
    par1PlayerUsageSnooper.addData("gl_caps[ARB_vertex_blend]", Boolean.valueOf(var2.GL_ARB_vertex_blend));
    par1PlayerUsageSnooper.addData("gl_caps[ARB_matrix_palette]", Boolean.valueOf(var2.GL_ARB_matrix_palette));
View Full Code Here

  /** Returns true if the extensions GL_ARB_shader_objects,
   * GL_ARB_vertex_shader, and GL_ARB_fragment shader are present.
   *
   * @return true if shaders are supported */
  public static boolean isSupported() {
    ContextCapabilities c = GLContext.getCapabilities();
    return c.GL_ARB_shader_objects && c.GL_ARB_vertex_shader && c.GL_ARB_fragment_shader;
    // return c.OpenGL20;
  }
View Full Code Here

TOP

Related Classes of org.lwjgl.opengl.ContextCapabilities

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.