Skip to content

Commit

Permalink
Potential fix for issue #491
Browse files Browse the repository at this point in the history
  • Loading branch information
jooste committed Nov 29, 2023
1 parent 194e6d3 commit a820a28
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bluesky/ui/qtgl/glhelpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ def p_getuboiv(programid, uboid, pname):
funcptr = ctx.getProcAddress(b'glVertexAttrib4Nub')
gl.glVertexAttrib4Nub = funtype(funcptr.__int__())

# void glVertexAttrib1f( GLuint index, GLfloat v0)
funtype = ctypes.CFUNCTYPE(None, ctypes.c_uint32, ctypes.c_float)
funcptr = ctx.getProcAddress(b'glVertexAttrib1f')
gl.glVertexAttrib1f = funtype(funcptr.__int__())

# void glTexImage2D( GLenum target,
# GLint level,
# GLint internalFormat,
Expand Down Expand Up @@ -645,7 +650,8 @@ def draw(self, primitive_type=None, first_vertex=None, vertex_count=None, n_inst
self.texture.bind(0)

if self.single_scale is not None:
shader.setAttributeValue(*self.single_scale)
gl.glVertexAttrib1f(*self.single_scale)
# shader.setAttributeValue(*self.single_scale)

if n_instances > 0:
gl.glDrawArraysInstanced(
Expand Down

0 comments on commit a820a28

Please sign in to comment.