rougier on master
"Open GL" -> "OpenGL" in docs. Merge pull request #196 from se… (compare)
[[ 1. 0. 0. 0. ] [ 0. 1. 0. 0. ] [ 0. -0. 1. 0. ] [-474.40224 -308.97636 923.01759 1. ]]
[[ 0.00011 0. 0. 0. ] [ 0. 0.0001 0. 0. ] [ 0. 0. -0. 0. ] [-0. -0. -0. 1. ]]
vertex = """
attribute vec3 position;
rotation = vec4( <rotate(position)>, 1.0);
translation = <translate>;
gl_Position = <transform>;
cube["rotate"] = Rotate(angle=30)
cube["translate"] = Translate("rotation", translate=(0.5,0,0))
cube["transform"] = PVMProjection("translation")
I'm trying to use glumpy to display some figures using transparency, and I am wondering about one thing that I discovered using one of the examples :
I'm currently using the cube example (solid-cube.py), and I wanted to change the alpha of its color. However, doing so makes the faces sometimes look different according to the rotation angle, like on this image :
Would anyone have an idea about why this does happen ?
Hard to say without manipulating the actual program
Note you have some exemples of OIT (order independant transparency) implementation there: https://github.com/glumpy/glumpy/tree/master/examples/transparency
I'm looking for an example where one inherits from app.Window instead of using the @window.* decorators.
I tried this, and my on_draw is never called:
class TestWindow(app.Window): def __init__(self, *args, **kwargs): print(args, kwargs) super().__init__(*args, **kwargs) print(self) console = app.Console(rows=10, cols=80, scale=4, color = (1.0,1.0,1.0,1) ) console._default_foreground = 1,0,1,1 console._default_background = 0,1,0,1 self.console = console self.attach(console) def on_draw(self, dt): print("on_draw") try: window = self window.clear() console = self.console console.clear() console.write("hello world") console.draw() print("here") except: logger.exception("draw")
Hey, I am trying to write the contents of the CUDA buffer onto the torch tensor based on the example given here.
The example is very insightful but does the task in reverse. I have altered the
set_src_device -> set_src_array and
set_dst_array -> set_dst_array
Unfortunately, I am unable to retrieve the data correctly. I have torch tensor of type 'f4' and texture also created with type 'f4' instead of 'uint8' as given in the example.
Can anyone let me know why?!