Skip to content

Commit

Permalink
add comments to existing problems with raytracer example. update buil…
Browse files Browse the repository at this point in the history
…d.sh for mac.

git-svn-id: svn://svn.code.sf.net/p/x10/code/trunk@28025 a326200e-df2c-42e0-81fa-597e909af41d
  • Loading branch information
mtake committed Aug 3, 2014
1 parent 6b1e4b4 commit 8995370
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion x10.gl/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

(cd src-x10; find . -name '*.x10' -print0 | xargs -0 jar cf ../x10_gl.jar)

../x10.dist/bin/x10c++ -O -NO_CHECKS -STATIC_CHECKS -buildx10lib . src-x10/x10/gl/GL.x10 -o x10_gl -d include -cxx-postarg -lGL -cxx-postarg -lglut -cxx-postarg -lGLEW
if [[ `uname` = Darwin* ]]; then
GLLIBS="-cxx-postarg -framework -cxx-postarg OpenGL -cxx-postarg -framework -cxx-postarg GLUT"
else
GLLIBS="-cxx-postarg -lGL -cxx-postarg -lglut"
fi

../x10.dist/bin/x10c++ -O -NO_CHECKS -STATIC_CHECKS -buildx10lib . src-x10/x10/gl/GL.x10 -o x10_gl -d include ${GLLIBS} -cxx-postarg -lGLEW

(cd include; find . -name '*.cc' -print0 | xargs -0 rm)
2 changes: 2 additions & 0 deletions x10.gl/src-x10/x10/gl/GL.x10
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,14 @@ public final class GL {
@Native("c++", "::glTexParameteri(#target, #value, #data)")
public static def glTexParameteri (target:Int, value:Int, data:Int) : void { }
// this the version associated with GL.GL_PIXEL_UNPACK_BUFFER
// FIXME raytracer#GLFrontend.x10 needs this
// @Native("c++", "::glTexSubImage2D(#target, #level, #xOffset, #yOffset, #width, #height, #format, #typ, #bufferOffset)")
// public static def glTexSubImage2D (target:Int, level:Int, xOffset:Int, yOffset:Int, width:Int, height:Int, format:Int, typ:Int, bufferOffset:Int) : void { }
@Native("c++", "::glTexImage2D(#target, #level, #xOff, #yOff, #w, #h, #border, #fmt, x10aux::lookup_or_null(#data, #dataOffset))")
public static def glTexImage2D[T] (target:Int, level:Int, xOff:Int, yOff:Int, w:Int, h:Int, border:Int, fmt:Int, data:Rail[T], dataOffset:Int) : void { }
public static def glMapBuffer[T] (target:Int, value:Int, len:Int) : Rail[T] {
@Native("c++", "TPMGL(T) *tmp = (TPMGL(T)*)::glMapBuffer(target, value);") { }
// FIXME raytracer#GLFrontend.x10 needs this
@Native("c++", "return typename x10::lang::Rail<TPMGL(T)>::Rail(tmp, tmp, len);") { }
return Zero.get[Rail[T]]();
}
Expand Down

0 comments on commit 8995370

Please sign in to comment.