ew | 1 Aug 06:03 2014
Picon

rotation

Hi,

I've only started recently to use the pyglet module.

I have drawn a line on the window.

What I'd like to do are the following:

1) Be able to rotate the line 360 degrees in any direction
2) the line rotates accordingly.

I know I need to add an event (on_mouse_drag ?), but what
I'd like to know is do I need to do the mathematical calculations
to update the line (to make it rotate), or does it automatically
do it when I call some function like rotateScene(xDegrees, yDegrees, zDegrees)?
I'm still reading up on the docs though, so I could've missed
some details.

Thanks

ew

--
You received this message because you are subscribed to the Google Groups "pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
01AutoMonkey | 28 Jul 23:31 2014
Picon

GLM (OpenGL Mathematics) equivalent for Pyglet?

I'm halfway through the http://open.gl/ tutorials (http://open.gl/transformations) and am being introduced to "Matrices" to do transformations (rotation, scaling, etc). So far I've been able to translate the C++ in the tutorials to Python, more specifically:

  • C++ to Python
  • SFML to Pyglet
  • GLEW to pyglet.gl
  • SOIL to pyglet.image

But to do matrice transformations I'm being asked to use GLM (OpenGL Mathematics http://glm.g-truc.net/0.9.5/index.html), and I haven't been able to wrap my head around an appropriate equivalent for that in Pyglet, so I'm wondering, has anyone here had any experience with or know of a way for doing things in Pyglet which in C++ would require GLM?

A simple example would be to use GLM to create a mat4 value which is then used in the vertex shader through a uniform variable:

glm::mat4 trans; trans = glm::rotate(trans, 180.0f, glm::vec3(0.0f, 0.0f, 1.0f));
...
GLint uniTrans = glGetUniformLocation(shaderProgram, "trans");
...
glUniformMatrix4fv
(uniTrans, 1, GL_FALSE, glm::value_ptr(trans));


I'm using:
- Pyglet 1.2
- OpenGL 3.2+

--
You received this message because you are subscribed to the Google Groups "pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
Raymond Liu | 26 Jul 22:47 2014
Picon

Scrollable window?

How do you create a scrollable window? Say I want to create a window that displays an image much bigger than the window, and I want to be able to scroll up and down and left and right to see the image, how do I do that?

--
You received this message because you are subscribed to the Google Groups "pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
Raymond Liu | 23 Jul 21:17 2014
Picon

One window handling another window's events.

Hi! I have two subclasses of pyglet, InfoWindow and MainWindow. I have one instance of each, info_window and main_window. This is just a toy example. I want info_window to display the mouse coordinates when it's in main_window, not when it's in itself. I thought obviously I need to use the on_mouse_motion event. But when I use this event in info_window, it only catches mouse motion in itself, not main_window. So the question is, how do I make info_window handle the on_mouse_motion event that occurs in main_window?

I realise that there are other ways of achieving my desired behaviour, but I thought it would be quite nice to be able to achieve it the way I described above, that is, handling another window's event. Is it possible?

--
You received this message because you are subscribed to the Google Groups "pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
Jose Luis Da | 15 Jul 17:31 2014

How to listen for a specific event?

Hi all, 

I want to, within a loop, check at a certain point if the left button of the mouse, for example, has been pressed. I know that you have to use the method "on_mouse_press", but I do not know how to assign the return of the function to a variable, because I do not know how to call this function at a certain point.

Is there a way to bypass "on_mouse_press" and call directly a method that only listens to the mouse?


Thank you,
jl

--
You received this message because you are subscribed to the Google Groups "pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
snheath | 10 Jul 09:33 2014

Screen tearing in compositing WM

Hey all,
Just noticed that when you play my game in a linux system using a window manager with compositing
turned on (I'm using MATE) you get a lot of screen tearing, even when vsync is enabled.  Does
anyone know what causes this, and what I can do to avoid it?

Example video here: https://www.youtube.com/watch?v=3ROPYmIuJmw

Thanks,
Simon

--

-- 
You received this message because you are subscribed to the Google Groups "pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

Raymond Liu | 6 Jul 17:05 2014
Picon

Error in the docs

Hi! Just spotted a slight error in the 1.2 docs page, here, where a sentence appears as "Locations in the path beginning with an ampersand (‘’ <at> ’’ symbol) specify Python packages." I'd like to politely point out that the " <at> " symbol is not ampersand. The ampersand symbol is "&"; the " <at> " symbol is the "at sign". Check wikipedia.

--
You received this message because you are subscribed to the Google Groups "pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
Raymond Liu | 6 Jul 16:49 2014
Picon

Migrating from PyGame, enlarge image by 2.

Hi! I've been using PyGame until now. I'm no expert at PyGame, and have been told that Pyglet is more pythonic and elegant. Having had a brief stroll through the programming guide, I agree! I love the decorators for one thing.

I'm building a GUI app for myself, and one of the most important funcionalities is that it is able to display images at 2x, 4x, or 8x its original size, and that the enlargement be done jaggieless. I know that PyGame has pygame.transform.scale2x() that does this. Is there an equivalent Pyglet way of doing this? I had a quick read through the programming guide and couldn't find anything. I'd be happy even with a non-jaggieless way of scaling images. Please help. Thank you!

--
You received this message because you are subscribed to the Google Groups "pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
Aldy Syahdeini | 4 Jul 08:54 2014
Picon

Asking about pyglet ability

Hey, I need to make a 3d model of colliery, I have used direct3d (managed directx) but it I got stuck on picking 3d point.
now,I try to find alternative library such us pyglet. 
So I have collection of random x,y,z point (in txt) and I try to make terrain, because the point is random some of my friend suggest 
using tin ( triangulated irregular network ) to make it look solid, is there any alternative solution in pyglet for generating solid terrain of random points?
I also need to click on the point on the terrain so I know the x,y,z positition of the point, is this possible in pyglet?
thanks.

--
You received this message because you are subscribed to the Google Groups "pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
Peter Vaňušanik | 28 Jun 04:55 2014
Picon

Re: Draw on texture/buffer

Shouldn't you be abusing your son? :P

On Sat, Jun 28, 2014 at 12:51 AM, Gendo Ikari <komradstudios <at> gmail.com> wrote:
Hi.
I want to use pyglet to compose images from text, other images, etc... (rotations, resizings, and so on). I do not need any window. I'm just using pyglet as a nice layer upon opengl to manipulate textures.
I've got a few questions.
1) How can I change the active framebuffer?
2) How can I draw on a specific image/texture? (blit is not enough, not all pyglet objects have a blit_into method).
3) How can I save image with specific DPI?
Thank you in advance.

--
You received this message because you are subscribed to the Google Groups "pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
Gendo Ikari | 28 Jun 00:51 2014
Picon

Draw on texture/buffer

Hi.
I want to use pyglet to compose images from text, other images, etc... (rotations, resizings, and so on). I do not need any window. I'm just using pyglet as a nice layer upon opengl to manipulate textures.
I've got a few questions.
1) How can I change the active framebuffer?
2) How can I draw on a specific image/texture? (blit is not enough, not all pyglet objects have a blit_into method).
3) How can I save image with specific DPI?
Thank you in advance.

--
You received this message because you are subscribed to the Google Groups "pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

Gmane