Skip to content

Commit eaefe39

Browse files
author
swiftcoder
committed
Initial Windows port
Minor bug fixes Point sprite texture coordinate generation still not working on Windows/ATI
1 parent 2cdfab8 commit eaefe39

File tree

7 files changed

+10
-2
lines changed

7 files changed

+10
-2
lines changed

data/shaders/particles.shader

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
uniform sampler2D tex0; \
2525
\
2626
void main() { \
27+
//gl_FragColor = gl_TexCoord[0]; \
2728
gl_FragColor = texture2D(tex0, gl_TexCoord[0].xy); // * vec4(1.0, 1.0, 1.0, gl_TexCoord[1].x); \
2829
}"
2930
}

run.py

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import sys
44

5+
# ugly hack to work around a py2app deficiency
6+
# py2app can't find the included pyode module without this
57
sys.path.insert(0,'../Resources/lib/python2.5/lib-dynload')
68

79
from src import app

src/app.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
def init():
5656
glEnable(GL_CULL_FACE)
57-
glFrontFace(GL_FRONT)
57+
glFrontFace(GL_CCW)
5858

5959
glEnable(GL_DEPTH_TEST)
6060
glDepthFunc(GL_LEQUAL)

src/ode/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@
33

44
if sys.platform == 'darwin':
55
from mac.ode import *
6+
if sys.platform == 'win32':
7+
from win32.ode import *
8+
InitODE()
69
else:
710
assert False, 'ODE not available for this platform'

src/ode/win32/__init__.py

Whitespace-only changes.

src/ode/win32/ode.pyd

666 KB
Binary file not shown.

src/particles.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ def draw(self):
4949
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
5050
glDepthMask(GL_FALSE)
5151

52+
glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_FALSE)
53+
5254
glBindBuffer(GL_ARRAY_BUFFER, self.vbo)
5355

5456
glEnableClientState(GL_VERTEX_ARRAY)
@@ -66,7 +68,7 @@ def draw(self):
6668
glDisableClientState(GL_VERTEX_ARRAY)
6769

6870
glBindBuffer(GL_ARRAY_BUFFER, 0)
69-
71+
7072
glDepthMask(GL_TRUE)
7173
glDisable(GL_BLEND)
7274
glDisable(GL_POINT_SPRITE)

0 commit comments

Comments
 (0)