rougier on master
"Open GL" -> "OpenGL" in docs. Merge pull request #196 from se… (compare)
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?!
Hello, I have a small problem with glumpy and I did not find an answer on the internet so I take the liberty of asking my question here. I would like to call several programs at different times. For example, every 10 seconds I want my window to change the program that is called. For this I have built a list of programs and I simply iterate over the programs in my list. However, only the first program in the list is displayed correctly, then I have a black screen for all the other programs and the window reactivates when I come back to the first program. If someone can help me that would be really great. Thanks in advance!
Translated with www.DeepL.com/Translator (free version)