Package com.ardor3d.util

Examples of com.ardor3d.util.Ardor3dException


    public boolean apply(final Mesh mesh, final Renderer renderer, final GLSLShaderObjectsState shader) {
        final RenderContext context = ContextManager.getCurrentContext();
        final ContextCapabilities caps = context.getCapabilities();

        if (!caps.isGeometryInstancingSupported()) {
            throw new Ardor3dException("Geometry instancing not supported for current graphics configuration");
        }

        if (_meshesToDraw <= 0) {
            // reset for next draw call
            _primCount = -1;
View Full Code Here


    public GLCapabilities getCapsForSettings(final DisplaySettings settings, final boolean onscreen,
            final boolean bitmapRequested, final boolean pbufferRequested, final boolean fboRequested) {

        // Validate window dimensions.
        if (settings.getWidth() <= 0 || settings.getHeight() <= 0) {
            throw new Ardor3dException("Invalid resolution values: " + settings.getWidth() + " " + settings.getHeight());
        }

        // Validate bit depth.
        if ((settings.getColorDepth() != 32) && (settings.getColorDepth() != 16) && (settings.getColorDepth() != 24)
                && (settings.getColorDepth() != -1)) {
            throw new Ardor3dException("Invalid pixel depth: " + settings.getColorDepth());
        }

        final GLCapabilities caps = new GLCapabilities(getProfile());
        caps.setHardwareAccelerated(true);
        caps.setDoubleBuffered(true);
View Full Code Here

                gle.printStackTrace();
            } finally {
                attempt++;
                if (attempt == MAX_CONTEXT_GRAB_ATTEMPTS) {
                    // failed, throw exception
                    throw new Ardor3dException("Failed to claim OpenGL context.");
                }
            }
            try {
                Thread.sleep(5);
            } catch (final InterruptedException e1) {
View Full Code Here

            }

            logger.severe(out);

            final String nameString = shaderName.equals("") ? "" : " [ " + shaderName + " ]";
            throw new Ardor3dException("Error compiling GLSL shader " + nameString + ": " + out);
        }
    }
View Full Code Here

                    .readInt(), bis.readInt(), bis.readInt(), bis.readInt(), bis.readInt(), bis.readInt(), bis
                    .readInt());

            // Check magic word and version
            if (header.magic != ('2' << 24) + ('P' << 16) + ('D' << 8) + 'I') {
                throw new Ardor3dException("Not an MD2 file.");
            }
            if (header.version != 8) {
                throw new Ardor3dException("Invalid file version (Version not 8)!");
            }

            // Parse out texture names
            final String[] texNames = new String[header.numSkins];
            bis.seek(header.offsetSkins);
View Full Code Here

            mesh.clearDirty(DirtyType.RenderState);
        }

        final RenderState textureState = mesh.getWorldRenderState(StateType.Texture);
        if (textureState == null) {
            throw new Ardor3dException("No texture state found for mesh: " + mesh);
        }

        texture = ((TextureState) textureState).getTexture(textureIndex);
        textureKey = texture != null ? texture.getTextureKey() : null;
    }
View Full Code Here

     *             if the source is <code>null</code>
     */
    public PropertiesDialog(final PropertiesGameSettings source, final URL imageFile,
            final Stack<Runnable> mainThreadTasks) {
        if (null == source) {
            throw new Ardor3dException("PropertyIO source cannot be null");
        }

        this.source = source;
        this.imageFile = imageFile;
        this.mainThreadTasks = mainThreadTasks;
View Full Code Here

     * @throws Ardor3dException
     *             if the personalFilename is null.
     */
    public PropertiesGameSettings(final String personalFilename, final String dfltsFilename) {
        if (null == personalFilename) {
            throw new Ardor3dException("Must give a valid filename");
        }
        if (!dfltsInitted) {
            dfltsInitted = true;
            // default* setting values are static, therefore, regardless of
            // how many GameSettings we instantiate, the defaults are
View Full Code Here

TOP

Related Classes of com.ardor3d.util.Ardor3dException

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.