Examples of ContextCapabilities


Examples of com.ardor3d.renderer.ContextCapabilities

    }

    public static void apply(final JoglRenderer renderer, final FragmentProgramState state) {
        final GL gl = GLContext.getCurrentGL();
        final RenderContext context = ContextManager.getCurrentContext();
        final ContextCapabilities caps = context.getCapabilities();

        if (caps.isFragmentProgramSupported()) {
            final FragmentProgramStateRecord record = (FragmentProgramStateRecord) context
                    .getStateRecord(StateType.FragmentProgram);
            context.setCurrentState(StateType.FragmentProgram, state);

            if (!record.isValid() || record.getReference() != state) {
View Full Code Here

Examples of com.ardor3d.renderer.ContextCapabilities

            throw new IllegalArgumentException("shaderVariable has no data: " + shaderVariable.name + " type: "
                    + shaderVariable.getClass().getName());
        }

        final RenderContext context = ContextManager.getCurrentContext();
        final ContextCapabilities caps = context.getCapabilities();
        if (caps.isVBOSupported() && !useVBO) {
            renderer.unbindVBO();
        }

        final ShaderObjectsStateRecord record = (ShaderObjectsStateRecord) context.getStateRecord(StateType.GLSLShader);
View Full Code Here

Examples of com.ardor3d.renderer.ContextCapabilities

        _exit = true;
    }

    @MainThread
    public void init() {
        final ContextCapabilities caps = ContextManager.getCurrentContext().getCapabilities();
        logger.info("Display Vendor: " + caps.getDisplayVendor());
        logger.info("Display Renderer: " + caps.getDisplayRenderer());
        logger.info("Display Version: " + caps.getDisplayVersion());
        logger.info("Shading Language Version: " + caps.getShadingLanguageVersion());

        registerInputTriggers();

        AWTImageLoader.registerLoader();
View Full Code Here

Examples of com.ardor3d.renderer.ContextCapabilities

        if (cam == null || initialized) {
            return;
        }
        initialized = true;

        final ContextCapabilities caps = ContextManager.getCurrentContext().getCapabilities();

        if (useRefraction && useProjectedShader && caps.getNumberOfFragmentTextureUnits() < 6 || useRefraction
                && caps.getNumberOfFragmentTextureUnits() < 5) {
            useRefraction = false;
            logger.info("Not enough textureunits, falling back to non refraction water");
        }

        if (!caps.isGLSLSupported()) {
            supported = false;
        }
        if (!(caps.isPbufferSupported() || caps.isFBOSupported())) {
            supported = false;
        }

        if (isSupported()) {
            tRenderer = TextureRendererFactory.INSTANCE.createTextureRenderer( //
View Full Code Here

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

Examples of org.lwjgl.opengl.ContextCapabilities

    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

Examples of org.lwjgl.opengl.ContextCapabilities

  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

Examples of org.lwjgl.opengl.ContextCapabilities

  /** 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

Examples of sun.java2d.pipe.hw.ContextCapabilities

        if (cfginfo == 0) {
            return null;
        }

        int oglCaps = getOGLCapabilities(cfginfo);
        ContextCapabilities caps = new OGLContextCaps(oglCaps, ids[0]);

        return new GLXGraphicsConfig(device, visualnum, cfginfo, caps);
    }
View Full Code Here

Examples of sun.java2d.pipe.hw.ContextCapabilities

    public static D3DGraphicsDevice createDevice(int screen) {
        if (!d3dAvailable) {
            return null;
        }

        ContextCapabilities d3dCaps = getDeviceCaps(screen);
        // could not initialize the device successfully
        if ((d3dCaps.getCaps() & CAPS_DEVICE_OK) == 0) {
            if (WindowsFlags.isD3DVerbose()) {
                System.out.println("Could not enable Direct3D pipeline on " +
                                   "screen " + screen);
            }
            return null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.