mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 16:20:11 -04:00
glgsg: Set maximum vertex attrib stride for WebGL
This commit is contained in:
parent
805fa5a36a
commit
6075307e66
@ -186,7 +186,10 @@ has_fixed_function_pipeline() const {
|
||||
*/
|
||||
INLINE int CLP(GraphicsStateGuardian)::
|
||||
get_max_vertex_attrib_stride() const {
|
||||
#ifdef OPENGLES_1
|
||||
#ifdef __EMSCRIPTEN__
|
||||
// WebGL has a static limit of 255 (yeah, that low).
|
||||
return 255;
|
||||
#elif defined(OPENGLES_1)
|
||||
// Best guess.
|
||||
return 2048;
|
||||
#else
|
||||
|
@ -3522,7 +3522,7 @@ reset() {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef OPENGLES_1
|
||||
#if !defined(OPENGLES_1) && !defined(__EMSCRIPTEN__)
|
||||
_max_vertex_attrib_stride = -1;
|
||||
#ifdef OPENGLES
|
||||
if (is_at_least_gles_version(3, 1))
|
||||
|
@ -753,7 +753,11 @@ protected:
|
||||
bool _use_vertex_attrib_binding;
|
||||
CPT(GeomVertexFormat) _current_vertex_format;
|
||||
const GeomVertexColumn *_vertex_attrib_columns[32];
|
||||
#ifdef __EMSCRIPTEN__
|
||||
static const int _max_vertex_attrib_stride = 255;
|
||||
#else
|
||||
int _max_vertex_attrib_stride = INT_MAX;
|
||||
#endif
|
||||
|
||||
GLuint _current_sbuffer_index;
|
||||
pvector<GLuint> _current_sbuffer_base;
|
||||
|
Loading…
x
Reference in New Issue
Block a user