Esempio n. 1
0
void StateSystem::VertexFormatState::applyGL(GLbitfield changedFormat, GLbitfield changedBinding) const
{
  for (GLuint i = 0; i < MAX_VERTEXATTRIBS; i++){
    if (!isBitSet(changedFormat,i)) continue;

    switch(formats[i].mode){
    case VERTEXMODE_FLOAT:
      glVertexAttribFormat(i, formats[i].size, formats[i].type, formats[i].normalized, formats[i].relativeoffset);
      break;
    case VERTEXMODE_INT:
    case VERTEXMODE_UINT:
      glVertexAttribIFormat(i, formats[i].size, formats[i].type, formats[i].relativeoffset);
      break;
    }
    glVertexAttribBinding(i,formats[i].binding);
  }

  for (GLuint i = 0; i < MAX_VERTEXBINDINGS; i++){
    if (!isBitSet(changedBinding,i)) continue;

    glVertexBindingDivisor(i,bindings[i].divisor);
    glBindVertexBuffer(i,0,0,bindings[i].stride);
  }
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglVertexBindingDivisor(JNIEnv *__env, jclass clazz, jint index, jint divisor, jlong __functionAddress) {
	glVertexBindingDivisorPROC glVertexBindingDivisor = (glVertexBindingDivisorPROC)(intptr_t)__functionAddress;
	UNUSED_PARAMS(__env, clazz)
	glVertexBindingDivisor(index, divisor);
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_glVertexBindingDivisor(JNIEnv *__env, jclass clazz, jint bindingindex, jint divisor) {
    glVertexBindingDivisorPROC glVertexBindingDivisor = (glVertexBindingDivisorPROC)tlsGetFunction(912);
    UNUSED_PARAM(clazz)
    glVertexBindingDivisor(bindingindex, divisor);
}
Esempio n. 4
0
inline void vertex_binding_divisor(uint32 binding_index, uint32 divisor)
{
    ARC_GL_CLEAR_ERRORS();
    glVertexBindingDivisor(binding_index, divisor);
    ARC_GL_CHECK_FOR_ERRORS();
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglVertexBindingDivisor(JNIEnv *env, jclass clazz, jint bindingindex, jint divisor, jlong function_pointer) {
	glVertexBindingDivisorPROC glVertexBindingDivisor = (glVertexBindingDivisorPROC)((intptr_t)function_pointer);
	glVertexBindingDivisor(bindingindex, divisor);
}
Esempio n. 6
0
static FORCEINLINE void VertexBindingDivisor(GLuint BindingIndex, GLuint Divisor)
{
	glVertexBindingDivisor(BindingIndex, Divisor);
}