Subject | Hash | Author | Date (UTC) |
---|---|---|---|
TextureGroup path argument | ffdd5424d24279deab630b414f69812b7a9586b8 | Michael Fogleman | 2013-03-29 12:43:06 |
removed TEXTURE_DATA, just load it from file | 06133b00b0e90d797c048ac1b824c0f9df619d47 | Michael Fogleman | 2013-03-29 12:31:31 |
A more majestic jump/gravity combination | 50247398b898bd6de3bbb8fd4b9e8c9becc1bb70 | Yuval Greenfield | 2013-03-29 11:42:48 |
Fixed ctypes error and load directly from PNG | 6e7f962125cc0f50351c5892620561433b6435fe | blain maguire | 2013-03-05 17:03:41 |
added LICENSE | 92356317b25c36c0fd73929ccb6b9e665d02a260 | Michael Fogleman | 2013-02-03 20:25:19 |
Jump height and mouse sensitivity in main.py | a81e11aaa49aac578b572935a19938fd2e4af48c | H34l0r | 2012-10-23 09:23:10 |
Update README | 886f7722506103b1ac120b268544cd9c20577556 | Michael Fogleman | 2012-02-15 02:20:16 |
reticle performance, time-based queue handling, terrain generation tweaks | d28386fcd85f04a3ce2ec6843b33ad1a4bfe357d | Michael Fogleman | 2012-01-30 19:07:58 |
first commit | 9ad9b952348ec7fc424ab056fe2c776c69cf9741 | Michael Fogleman | 2012-01-30 15:31:51 |
File | Lines added | Lines deleted |
---|---|---|
main.py | 3 | 3 |
File main.py changed (mode: 100644) (index b4d4dd4..f35096c) | |||
... | ... | FACES = [ | |
48 | 48 | ] | ] |
49 | 49 | ||
50 | 50 | class TextureGroup(pyglet.graphics.Group): | class TextureGroup(pyglet.graphics.Group): |
51 | def __init__(self): | ||
51 | def __init__(self, path): | ||
52 | 52 | super(TextureGroup, self).__init__() | super(TextureGroup, self).__init__() |
53 | self.texture = pyglet.image.load('texture.png').get_texture() | ||
53 | self.texture = pyglet.image.load(path).get_texture() | ||
54 | 54 | def set_state(self): | def set_state(self): |
55 | 55 | glEnable(self.texture.target) | glEnable(self.texture.target) |
56 | 56 | glBindTexture(self.texture.target, self.texture.id) | glBindTexture(self.texture.target, self.texture.id) |
... | ... | def sectorize(position): | |
70 | 70 | class Model(object): | class Model(object): |
71 | 71 | def __init__(self): | def __init__(self): |
72 | 72 | self.batch = pyglet.graphics.Batch() | self.batch = pyglet.graphics.Batch() |
73 | self.group = TextureGroup() | ||
73 | self.group = TextureGroup('texture.png') | ||
74 | 74 | self.world = {} | self.world = {} |
75 | 75 | self.shown = {} | self.shown = {} |
76 | 76 | self._shown = {} | self._shown = {} |