/** Sets the given attribute * * @param name the name of the attribute * @param value1 the first value * @param value2 the second value * @param value3 the third value * @param value4 the fourth value */ public void setAttributef (String name, float value1, float value2, float value3, float value4) { GL20 gl = Gdx.gl20; int location = fetchAttributeLocation(name); gl.glVertexAttrib4f(location, value1, value2, value3, value4); }
/** Sets the given attribute * * @param name the name of the attribute * @param value1 the first value * @param value2 the second value * @param value3 the third value * @param value4 the fourth value */ public void setAttributef (String name, float value1, float value2, float value3, float value4) { GL20 gl = Gdx.gl20; int location = fetchAttributeLocation(name); gl.glVertexAttrib4f(location, value1, value2, value3, value4); }
/** Enables the vertex attribute with the given name * * @param name the vertex attribute name */ public void enableVertexAttribute (String name) { GL20 gl = Gdx.gl20; checkManaged(); int location = fetchAttributeLocation(name); if (location == -1) return; gl.glEnableVertexAttribArray(location); }
/** Enables the vertex attribute with the given name * * @param name the vertex attribute name */ public void enableVertexAttribute (String name) { GL20 gl = Gdx.gl20; checkManaged(); int location = fetchAttributeLocation(name); if (location == -1) return; gl.glEnableVertexAttribArray(location); }
/** Disables the vertex attribute with the given name * * @param name the vertex attribute name */ public void disableVertexAttribute (String name) { GL20 gl = Gdx.gl20; checkManaged(); int location = fetchAttributeLocation(name); if (location == -1) return; gl.glDisableVertexAttribArray(location); }
/** Disables the vertex attribute with the given name * * @param name the vertex attribute name */ public void disableVertexAttribute (String name) { GL20 gl = Gdx.gl20; checkManaged(); int location = fetchAttributeLocation(name); if (location == -1) return; gl.glDisableVertexAttribArray(location); }
/** Sets the vertex attribute with the given name. The {@link ShaderProgram} must be bound for this to work. * * @param name the attribute name * @param size the number of components, must be >= 1 and <= 4 * @param type the type, must be one of GL20.GL_BYTE, GL20.GL_UNSIGNED_BYTE, GL20.GL_SHORT, * GL20.GL_UNSIGNED_SHORT,GL20.GL_FIXED, or GL20.GL_FLOAT. GL_FIXED will not work on the desktop * @param normalize whether fixed point data should be normalized. Will not work on the desktop * @param stride the stride in bytes between successive attributes * @param buffer the buffer containing the vertex attributes. */ public void setVertexAttribute (String name, int size, int type, boolean normalize, int stride, Buffer buffer) { GL20 gl = Gdx.gl20; checkManaged(); int location = fetchAttributeLocation(name); if (location == -1) return; gl.glVertexAttribPointer(location, size, type, normalize, stride, buffer); }
/** Sets the vertex attribute with the given name. The {@link ShaderProgram} must be bound for this to work. * * @param name the attribute name * @param size the number of components, must be >= 1 and <= 4 * @param type the type, must be one of GL20.GL_BYTE, GL20.GL_UNSIGNED_BYTE, GL20.GL_SHORT, * GL20.GL_UNSIGNED_SHORT,GL20.GL_FIXED, or GL20.GL_FLOAT. GL_FIXED will not work on the desktop * @param normalize whether fixed point data should be normalized. Will not work on the desktop * @param stride the stride in bytes between successive attributes * @param offset byte offset into the vertex buffer object bound to GL20.GL_ARRAY_BUFFER. */ public void setVertexAttribute (String name, int size, int type, boolean normalize, int stride, int offset) { GL20 gl = Gdx.gl20; checkManaged(); int location = fetchAttributeLocation(name); if (location == -1) return; gl.glVertexAttribPointer(location, size, type, normalize, stride, offset); }
/** Sets the vertex attribute with the given name. The {@link ShaderProgram} must be bound for this to work. * * @param name the attribute name * @param size the number of components, must be >= 1 and <= 4 * @param type the type, must be one of GL20.GL_BYTE, GL20.GL_UNSIGNED_BYTE, GL20.GL_SHORT, * GL20.GL_UNSIGNED_SHORT,GL20.GL_FIXED, or GL20.GL_FLOAT. GL_FIXED will not work on the desktop * @param normalize whether fixed point data should be normalized. Will not work on the desktop * @param stride the stride in bytes between successive attributes * @param buffer the buffer containing the vertex attributes. */ public void setVertexAttribute (String name, int size, int type, boolean normalize, int stride, Buffer buffer) { GL20 gl = Gdx.gl20; checkManaged(); int location = fetchAttributeLocation(name); if (location == -1) return; gl.glVertexAttribPointer(location, size, type, normalize, stride, buffer); }
/** Sets the vertex attribute with the given name. The {@link ShaderProgram} must be bound for this to work. * * @param name the attribute name * @param size the number of components, must be >= 1 and <= 4 * @param type the type, must be one of GL20.GL_BYTE, GL20.GL_UNSIGNED_BYTE, GL20.GL_SHORT, * GL20.GL_UNSIGNED_SHORT,GL20.GL_FIXED, or GL20.GL_FLOAT. GL_FIXED will not work on the desktop * @param normalize whether fixed point data should be normalized. Will not work on the desktop * @param stride the stride in bytes between successive attributes * @param offset byte offset into the vertex buffer object bound to GL20.GL_ARRAY_BUFFER. */ public void setVertexAttribute (String name, int size, int type, boolean normalize, int stride, int offset) { GL20 gl = Gdx.gl20; checkManaged(); int location = fetchAttributeLocation(name); if (location == -1) return; gl.glVertexAttribPointer(location, size, type, normalize, stride, offset); }
/** Sets the given attribute * * @param name the name of the attribute * @param value1 the first value * @param value2 the second value * @param value3 the third value * @param value4 the fourth value */ public void setAttributef (String name, float value1, float value2, float value3, float value4) { GL20 gl = Gdx.gl20; int location = fetchAttributeLocation(name); gl.glVertexAttrib4f(location, value1, value2, value3, value4); }
/** Enables the vertex attribute with the given name * * @param name the vertex attribute name */ public void enableVertexAttribute (String name) { GL20 gl = Gdx.gl20; checkManaged(); int location = fetchAttributeLocation(name); if (location == -1) return; gl.glEnableVertexAttribArray(location); }
/** Disables the vertex attribute with the given name * * @param name the vertex attribute name */ public void disableVertexAttribute (String name) { GL20 gl = Gdx.gl20; checkManaged(); int location = fetchAttributeLocation(name); if (location == -1) return; gl.glDisableVertexAttribArray(location); }
/** Sets the vertex attribute with the given name. The {@link ShaderProgram} must be bound for this to work. * * @param name the attribute name * @param size the number of components, must be >= 1 and <= 4 * @param type the type, must be one of GL20.GL_BYTE, GL20.GL_UNSIGNED_BYTE, GL20.GL_SHORT, * GL20.GL_UNSIGNED_SHORT,GL20.GL_FIXED, or GL20.GL_FLOAT. GL_FIXED will not work on the desktop * @param normalize whether fixed point data should be normalized. Will not work on the desktop * @param stride the stride in bytes between successive attributes * @param offset byte offset into the vertex buffer object bound to GL20.GL_ARRAY_BUFFER. */ public void setVertexAttribute (String name, int size, int type, boolean normalize, int stride, int offset) { GL20 gl = Gdx.gl20; checkManaged(); int location = fetchAttributeLocation(name); if (location == -1) return; gl.glVertexAttribPointer(location, size, type, normalize, stride, offset); }
/** Sets the vertex attribute with the given name. The {@link ShaderProgram} must be bound for this to work. * * @param name the attribute name * @param size the number of components, must be >= 1 and <= 4 * @param type the type, must be one of GL20.GL_BYTE, GL20.GL_UNSIGNED_BYTE, GL20.GL_SHORT, * GL20.GL_UNSIGNED_SHORT,GL20.GL_FIXED, or GL20.GL_FLOAT. GL_FIXED will not work on the desktop * @param normalize whether fixed point data should be normalized. Will not work on the desktop * @param stride the stride in bytes between successive attributes * @param buffer the buffer containing the vertex attributes. */ public void setVertexAttribute (String name, int size, int type, boolean normalize, int stride, Buffer buffer) { GL20 gl = Gdx.gl20; checkManaged(); int location = fetchAttributeLocation(name); if (location == -1) return; gl.glVertexAttribPointer(location, size, type, normalize, stride, buffer); }