As a long shot you may try with the patch in https://code.google.com/archive/p/pyglet/issues/752 It probably not address directly your problem, but as it eliminates a buffer copy...
On Sun, Feb 26, 2017 at 10:36 AM, Manuel Kaufmann <[email protected]> wrote: > Hi, > > I am using Pyglet 1.2.4 to render a texturized 3D Mesh composed of > triangles and stored as an OBJ file. The mesh is not small, but also not > extremely huge: It takes up about 52 MB on the harddisk and consists of > roughly 800'000 faces (~ 366'500 vertices). The texture is available as a > .jpeg, takes up about 6.5 MB on the harddisk and its resolution is > 8192x8192. > > In order to upload the texture to the GPU, I do the following: > > self._image = pyglet.image.load(image_path) > > ... > self._texture = self._image.get_texture() > > which *sometimes *throws the following error: > > ... > self._texture = self._image.get_texture() > File "D:\Python27\lib\site-packages\pyglet\image\__init__.py", line 818, > in get_texture > force_rectangle) > File "D:\Python27\lib\site-packages\pyglet\image\__init__.py", line 809, > in create_texture > self.anchor_x, self.anchor_y, 0, None) > File "D:\Python27\lib\site-packages\pyglet\image\__init__.py", line 953, > in blit_to_texture > data = self._convert(data_format, data_pitch) > File "D:\Python27\lib\site-packages\pyglet\image\__init__.py", line 1008 > , in _convert > self._ensure_string_data() > File "D:\Python27\lib\site-packages\pyglet\image\__init__.py", line 1076 > , in _ensure_string_data > self._current_data = buf.raw > MemoryError > > I tried to find out why this happens, but to no avail. I know that the > computer I am using is powerful enough to handle mesh sizes like that, both > because the error only happens sometimes and because I can visualize it > without problems using programs like e.g. Meshlab. Any help/hints how I can > resolve or further debug this are greatly appreciated! > > Thanks a lot and best regards > Manuel > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/pyglet-users. For more options, visit https://groups.google.com/d/optout.
