Quantcast
Channel: Can I draw using normalized coordinates in pyglet? - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Can I draw using normalized coordinates in pyglet?

$
0
0

In the pyglet graphics documentation, it demonstrates how to draw points in 2d space using the screen coordinates

pyglet.graphics.draw(2, pyglet.gl.GL_POINTS,    ('v2i', (10, 15, 30, 35)))

I want to be able to draw using the normalized coordinates, which range from [-1, 1] on each axis, but using the draw call normally, I must give the vertices in terms of pixel coordinates.

The reason I want to do this is that I will be drawing functions of both domain and range [-1, 1], so it is very fitting to draw using the normalized coordinates and not have to worry about converting.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images