Since my the program I am using I am interested what kind of graphic
library you are using to do basic 2D graphic stuff, to see what are
the differences and advantages of each.
I for myself did use wxDC, but moving and zooming did cause flicker
and double buffering was too slow, on 1600x1200 screen resolution.
Now I use PyOpenGL and I am very happy with it, can be integrated with
wxPython, is hardware supported, and the displaylist's makes it
reasonable able fast, the only drawback is the bad compatibility with
py2exe or the installer. (it works without GLUT)
I recently posted an example of how to get PyOpenGL to work with Py2exe to the PyOpenGL list. It's not spectacularly elegant, but it works. Basically, exclude the whole OpenGL package, then manually include a subset of it in your application by copying it to your output directory.
It would be very cool to have an OpenGL-based 2D drawing canvas w/ all the fixin's (mouse and keyboard events per-object, decent text and bitmap support, maybe even some collision-testing support).
Well, enjoy yourself,
Mike
Lucian wrote:
···
Since my the program I am using I am interested what kind of graphic
library you are using to do basic 2D graphic stuff, to see what are
the differences and advantages of each.
I for myself did use wxDC, but moving and zooming did cause flicker
and double buffering was too slow, on 1600x1200 screen resolution.
Now I use PyOpenGL and I am very happy with it, can be integrated with
wxPython, is hardware supported, and the displaylist's makes it
reasonable able fast, the only drawback is the bad compatibility with
py2exe or the installer. (it works without GLUT)
I recently posted an example of how to get PyOpenGL to work with Py2exe
to the PyOpenGL list. It's not spectacularly elegant, but it works.
Basically, exclude the whole OpenGL package, then manually include a
subset of it in your application by copying it to your output directory.
Yes, but if you don`t use GLU you can use py2exe as usual.
It would be very cool to have an OpenGL-based 2D drawing canvas w/ all
the fixin's (mouse and keyboard events per-object, decent text and
bitmap support, maybe even some collision-testing support).
thats true
···
Well, enjoy yourself,
Mike
Lucian wrote:
Since my the program I am using I am interested what kind of graphic
library you are using to do basic 2D graphic stuff, to see what are
the differences and advantages of each.
I for myself did use wxDC, but moving and zooming did cause flicker
and double buffering was too slow, on 1600x1200 screen resolution.
Now I use PyOpenGL and I am very happy with it, can be integrated with
wxPython, is hardware supported, and the displaylist's makes it
reasonable able fast, the only drawback is the bad compatibility with
py2exe or the installer. (it works without GLUT)
Since my the program I am using I am interested what kind of graphic
library you are using to do basic 2D graphic stuff, to see what are
the differences and advantages of each.
I for myself did use wxDC, but moving and zooming did cause flicker
and double buffering was too slow, on 1600x1200 screen resolution.
Now I use PyOpenGL and I am very happy with it, can be integrated with
wxPython, is hardware supported, and the displaylist's makes it
reasonable able fast, the only drawback is the bad compatibility with
py2exe or the installer. (it works without GLUT)
What do you use, and what are your experiences?
I would like to use it but don know how to draw arc with OpenGL.
The easy way is to use the GLU library's gluPartialDisk, which gives you a sweep of triangles from start-angle x to stop-angle y between two radii if you were to draw a whole circle that way you'd get something that looks like a washer.
The more common way (and the way I've always seen used in real code) is to generate the points on the arc, store them in an array, then draw the array whatever way you like.
# calculate 3D points for a steps-segment 2D arc from start through stop
from Numeric import *
start = 0.0
stop = pi
steps = 256
angles = arange( start, stop, (stop-start)/steps, 'd')
xes = cos(angles)
yes = sin(angles)
totals = zeros( (len(angles),3),'d')
totals[:,0] = xes
totals[:,1] = yes
A way I've never seen done, but which is probably considered the "correct" way is to create an evaluator for the equation defining the circle and use that to generate the arc-points as required.
Finally, you could (I would think) very readily create a GLU nurbs curve/quadratic for any given circle/arc if you were comfortable with definining nurbs curves mathematically. That would, potentially, allow for perfectly smooth curves regardless of scaling. Never done it myself (I use modelling tools), but it should be doable.
HTH,
Mike
Niki Spahiev wrote:
···
Lucian wrote:
Since my the program I am using I am interested what kind of graphic
library you are using to do basic 2D graphic stuff, to see what are
the differences and advantages of each.
I for myself did use wxDC, but moving and zooming did cause flicker
and double buffering was too slow, on 1600x1200 screen resolution.
Now I use PyOpenGL and I am very happy with it, can be integrated with
wxPython, is hardware supported, and the displaylist's makes it
reasonable able fast, the only drawback is the bad compatibility with
py2exe or the installer. (it works without GLUT)
What do you use, and what are your experiences?
I would like to use it but don know how to draw arc with OpenGL.