rougier on master
"Open GL" -> "OpenGL" in docs. Merge pull request #196 from se… (compare)
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)
examples/snippet-viewport.py. It gave a decent looking image at first, but any trackball motion simply flipped the image 180°. I'm pretty sure it's the event wiring that I've got wrong. The vertex shader is pretty trivial -
gl_Position=trackball(a_position); <viewport.transform>;and the fragment shader begins with
<viewport.clipping>. Everything is fine if I use the default viewport, or if I constrain the viewport and don't wire the trackball.
on_resizehas to hand the sub-viewport size to the trackball, and set
on_mouse_scrollboth check if (x,y) is in the extent, and only then do
transform.on_mouse_scroll. Seems as if it oughtn't to be this hard, but at least that part of my program is working now.