Package com.ardor3d.renderer

Examples of com.ardor3d.renderer.RenderContext


        if (_delegateMap == null || _delegateMap.isEmpty()) {
            return null;
        }

        // otherwise... grab our current context
        final RenderContext context = ContextManager.getCurrentContext();

        // get the delegate for this context
        RenderDelegate delegate = getRenderDelegate(context.getGlContextRep());
        // if none, check for a default delegate.
        if (delegate == null) {
            delegate = getRenderDelegate(null);
        }
View Full Code Here


        if ((buffers & Renderer.BUFFER_ACCUMULATION) != 0) {
            clear |= GL2.GL_ACCUM_BUFFER_BIT;
        }

        final RenderContext context = ContextManager.getCurrentContext();
        final RendererRecord record = context.getRendererRecord();

        if (strict) {
            // grab our camera to get width and height info.
            final Camera cam = Camera.getCurrentCamera();
View Full Code Here

        gl.glFinish();
    }

    public void applyNormalsMode(final NormalsMode normalsMode, final ReadOnlyTransform worldTransform) {
        final GL gl = GLContext.getCurrentGL();
        final RenderContext context = ContextManager.getCurrentContext();
        final RendererRecord rendRecord = context.getRendererRecord();
        if (normalsMode != NormalsMode.Off) {
            final ContextCapabilities caps = context.getCapabilities();
            switch (normalsMode) {
                case NormalizeIfScaled:
                    if (worldTransform.isRotationMatrix()) {
                        final ReadOnlyVector3 scale = worldTransform.getScale();
                        if (!(scale.getX() == 1.0 && scale.getY() == 1.0 && scale.getZ() == 1.0)) {
View Full Code Here

        }

        final GL gl = GLContext.getCurrentGL();

        // ask for the current state record
        final RenderContext context = ContextManager.getCurrentContext();

        final int id = buffer.getVBOID(context.getGlContextRep());
        if (id == 0) {
            // Not on card... return.
            return;
        }

        buffer.removeVBOID(context.getGlContextRep());

        final IntBuffer idBuff = BufferUtils.createIntBuffer(1);
        idBuff.put(id);
        idBuff.flip();
        gl.glDeleteBuffers(1, idBuff);
View Full Code Here

    }

    public void setupTextureData(final List<FloatBufferData> textureCoords) {
        final GL gl = GLContext.getCurrentGL();

        final RenderContext context = ContextManager.getCurrentContext();
        final ContextCapabilities caps = context.getCapabilities();
        final RendererRecord rendRecord = context.getRendererRecord();

        final TextureState ts = (TextureState) context.getCurrentState(RenderState.StateType.Texture);
        int enabledTextures = rendRecord.getEnabledTextures();
        final boolean valid = rendRecord.isTexturesValid();
        boolean isOn, wasOn;
        if (ts != null) {
            final int max = caps.isMultitextureSupported() ? Math.min(caps.getNumberOfFragmentTexCoordUnits(),
View Full Code Here

    }

    public void setupVertexDataVBO(final FloatBufferData data) {
        final GL gl = GLContext.getCurrentGL();

        final RenderContext context = ContextManager.getCurrentContext();
        final RendererRecord rendRecord = context.getRendererRecord();

        final int vboID = setupVBO(data, context);

        if (vboID != 0) {
            if (gl.isGL2GL3()) {
View Full Code Here

        makeCurrentContext();

        try {

            // Look up a shared context, if a shared JoglCanvasRenderer is given.
            RenderContext sharedContext = null;
            if (settings.getShareContext() != null) {
                sharedContext = ContextManager.getContextForKey(settings.getShareContext().getRenderContext()
                        .getContextKey());
            }
View Full Code Here

public abstract class JoglWireframeStateUtil {

    public static void apply(final JoglRenderer renderer, final WireframeState state) {
        // ask for the current state record
        final RenderContext context = ContextManager.getCurrentContext();
        final WireframeStateRecord record = (WireframeStateRecord) context.getStateRecord(StateType.Wireframe);
        context.setCurrentState(StateType.Wireframe, state);

        if (state.isEnabled()) {
            renderer.setupLineParameters(state.getLineWidth(), 1, (short) 0xFFFF, state.isAntialiased());

            switch (state.getFace()) {
View Full Code Here

    public static void apply(final JoglRenderer renderer, final FogState state) {
        final GL gl = GLContext.getCurrentGL();

        // ask for the current state record
        final RenderContext context = ContextManager.getCurrentContext();
        final ContextCapabilities caps = context.getCapabilities();
        final FogStateRecord record = (FogStateRecord) context.getStateRecord(StateType.Fog);
        context.setCurrentState(StateType.Fog, state);

        if (state.isEnabled()) {
            enableFog(true, record);

            if (record.isValid()) {
View Full Code Here

import com.ardor3d.renderer.state.record.LightStateRecord;

public abstract class JoglLightStateUtil {

    public static void apply(final JoglRenderer renderer, final LightState state) {
        final RenderContext context = ContextManager.getCurrentContext();
        final ContextCapabilities caps = context.getCapabilities();
        final LightStateRecord record = (LightStateRecord) context.getStateRecord(StateType.Light);
        context.setCurrentState(StateType.Light, state);

        if (state.isEnabled() && LightState.LIGHTS_ENABLED) {
            setLightEnabled(true, record);
            setTwoSided(state.getTwoSidedLighting(), record);
            setLocalViewer(state.getLocalViewer(), record);
View Full Code Here

TOP

Related Classes of com.ardor3d.renderer.RenderContext

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.