3
$\begingroup$

i just started using bgl with blender scripting and it's giving this error "AttributeError: module 'bgl' has no attribute 'GL_MODELVIEW_MATRIX" i just checked on API documentation and it's supposed to be there any idea?

import bgl
'''code from API doc'''
xval, yval= 100, 40
# Get the scale of the view matrix
view_matrix = bgl.Buffer(bgl.GL_FLOAT, 16)
bgl.glGetFloatv(bgl.GL_MODELVIEW_MATRIX, view_matrix)
f = 1.0 / view_matrix[0]

# Instead of the usual glRasterPos2i(xval, yval)
bgl.glRasterPos2f(xval * f, yval * f)
$\endgroup$

0

You must log in to answer this question.

Browse other questions tagged .