Package com.ardor3d.util

Examples of com.ardor3d.util.Ardor3dException


        _inOrthoMode = true;
    }

    public void unsetOrtho() {
        if (!_inOrthoMode) {
            throw new Ardor3dException("Not in Orthographic mode.");
        }
        // remove ortho mode, and go back to original
        // state
        final RendererRecord matRecord = ContextManager.getCurrentContext().getRendererRecord();
        LwjglRendererUtil.switchMode(matRecord, GL11.GL_PROJECTION);
View Full Code Here


                case CubeMap:
                    GL11.glTexSubImage2D(LwjglTextureStateUtil.getGLCubeMapFace(dstFace), 0, dstOffsetX, dstOffsetY,
                            dstWidth, dstHeight, pixelFormat, GL11.GL_UNSIGNED_BYTE, source);
                    break;
                default:
                    throw new Ardor3dException("Unsupported type for updateTextureSubImage: " + destination.getType());
            }
        } finally {
            // Restore the texture configuration (when necessary)...
            // Restore alignment.
            if (origAlignment != alignment) {
View Full Code Here

    public void checkCardError() throws Ardor3dException {
        try {
            org.lwjgl.opengl.Util.checkGLError();
        } catch (final OpenGLException exception) {
            throw new Ardor3dException("Error in opengl: " + exception.getMessage(), exception);
        }
    }
View Full Code Here

            } else if (dataBuffer instanceof ShortBuffer) {
                ARBBufferObject.glBufferDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, (ShortBuffer) dataBuffer,
                        getGLVBOAccessMode(data.getVboAccessMode()));
            }
        } else {
            throw new Ardor3dException("Attempting to create a vbo id for a FloatBufferData with no Buffer value.");
        }
        return vboID;
    }
View Full Code Here

            } else if (dataBuffer instanceof ByteBuffer) {
                ARBBufferObject.glBufferDataARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB,
                        (ByteBuffer) dataBuffer, getGLVBOAccessMode(data.getVboAccessMode()));
            }
        } else {
            throw new Ardor3dException("Attempting to create a vbo id for a IndexBufferData with no Buffer value.");
        }
        return vboID;
    }
View Full Code Here

        // check if we are already setup... if so, throw error.
        if (tex.getTextureKey() == null) {
            tex.setTextureKey(TextureKey.getRTTKey(tex.getMinificationFilter()));
        } else if (tex.getTextureIdForContext(context.getGlContextRep()) != 0) {
            throw new Ardor3dException("Texture is already setup and has id.");
        }

        // Create the texture
        final IntBuffer ibuf = BufferUtils.createIntBuffer(1);
        GL11.glGenTextures(ibuf);
View Full Code Here

     * @throws Ardor3dException
     *             if size is less than or equal to zero or roughtness is less than 0.
     */
    public MidPointHeightMapGenerator(final int size, final float roughness) {
        if (!MathUtils.isPowerOfTwo(size)) {
            throw new Ardor3dException("Size must be (2^N) sized.");
        }
        if (roughness < 0 || size <= 0) {
            throw new Ardor3dException("size and roughness must be " + "greater than 0");
        }
        this.roughness = roughness;
        this.size = size;
    }
View Full Code Here

     * @param roughness
     *            how chaotic will the heightmap be.
     */
    public void setRoughness(final float roughness) {
        if (roughness < 0) {
            throw new Ardor3dException("roughness must be greater than 0");
        }
        this.roughness = roughness;
    }
View Full Code Here

                out = new String(infoBytes);
            }

            logger.severe(out);

            throw new Ardor3dException("Error linking GLSL shader: " + out);
        }
    }
View Full Code Here

                out = new String(infoBytes);
            }

            logger.severe(out);
            final String nameString = shaderName.equals("") ? "" : " [ " + shaderName + " ]";
            throw new Ardor3dException("Error compiling GLSL shader " + nameString + ": " + out);

        }
    }
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.