Browse Source

add max_vertex_attribs property to GLContext

main
cinnaboot 5 years ago
parent
commit
b1e55782b0
  1. 5
      src/shader.cpp
  2. 2
      src/shader.h

5
src/shader.cpp

@ -446,10 +446,7 @@ initCTXSizes(GLContext* gl_ctx)
gl_ctx->max_fragment_blocks); gl_ctx->max_fragment_blocks);
printf("GL_MAX_UNIFORM_BLOCK_SIZE: %d\n", printf("GL_MAX_UNIFORM_BLOCK_SIZE: %d\n",
gl_ctx->max_ublock_size); gl_ctx->max_ublock_size);
printf("GL_MAX_VERTEX_ATTRIBS: %d\n", gl_ctx->max_vertex_attribs);
GLint max_vertex_attribs = 0;
glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &max_vertex_attribs);
printf("GL_MAX_VERTEX_ATTRIBS: %d\n", max_vertex_attribs);
#endif #endif
} }
} }

2
src/shader.h

@ -9,6 +9,7 @@
#include "util.h" #include "util.h"
// TODO: rename structures to consistent style
struct gl_uniform struct gl_uniform
{ {
// NOTE: would be nice to use idx as the location parameter because it seems // NOTE: would be nice to use idx as the location parameter because it seems
@ -89,6 +90,7 @@ struct GLContext
GLint max_vertex_blocks; GLint max_vertex_blocks;
GLint max_fragment_blocks; GLint max_fragment_blocks;
GLint max_ublock_size; GLint max_ublock_size;
GLint max_vertex_attribs;
u32 max_ubos; u32 max_ubos;
u32 num_ubos; u32 num_ubos;

Loading…
Cancel
Save