Coder Social home page Coder Social logo

hello_lwjgl's Introduction

hello_lwjgl's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

hello_lwjgl's Issues

"omega" OpenCL example code not working

Checked in an example for OpenCL. uncomment the omega lines in core.clj & do "lein run omega" to reproduce.

There's no official example that I can find that is supposed to work with 3.0.0b. This blog
http://yarenty.blogspot.com/2015/03/lwjgl3-use-gpu-opencl-for-multithreaded.html
indicates it should work, but I've made enough subtle changes that I don't know if it will ever work...

Giving up for the moment. Anyone feel up to trying to fix this? Or pointing to working example code?

> lein run omega
Hello, Lightweight Java Game Library! V 3.0.0b SNAPSHOT
Run example Omega
  (a simple OpenCL test)
init
CL created
platform created
ctx-props created
errcode created
get devices #object[java.util.ArrayList 0x2320fa6f [CLDevice pointer [0x1024400], CLDevice pointer [0x1022700]]]
device 0 #object[org.lwjgl.opencl.CLDevice 0x4d722ac9 CLDevice pointer [0x1024400]]
context created 140395407619280
queue created 140395407619952
allocated memory
[LWJGL] cl_program_callback
kernel created 0
kernel-work-size created
Exception in thread "main" java.lang.ClassCastException: java.lang.Long cannot be cast to org.lwjgl.PointerBuffer, compiling:(/private/var/folders/zb/w97rn0bn1hl7stfrgk5_04mc0000gn/T/form-init7029757012931126534.clj:1:125)
    at clojure.lang.Compiler.load(Compiler.java:7391)
    at clojure.lang.Compiler.loadFile(Compiler.java:7317)
    at clojure.main$load_script.invokeStatic(main.clj:275)
    at clojure.main$init_opt.invokeStatic(main.clj:277)
    at clojure.main$init_opt.invoke(main.clj:277)
    at clojure.main$initialize.invokeStatic(main.clj:308)
    at clojure.main$null_opt.invokeStatic(main.clj:342)
    at clojure.main$null_opt.invoke(main.clj:339)
    at clojure.main$main.invokeStatic(main.clj:421)
    at clojure.main$main.doInvoke(main.clj:384)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at clojure.lang.Var.invoke(Var.java:383)
    at clojure.lang.AFn.applyToHelper(AFn.java:156)
    at clojure.lang.Var.applyTo(Var.java:700)
    at clojure.main.main(main.java:37)
Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to org.lwjgl.PointerBuffer
    at hello_lwjgl.omega$main.invokeStatic(omega.clj:115)
    at hello_lwjgl.omega$main.invoke(omega.clj:29)
    at hello_lwjgl.core$_main.invokeStatic(core.clj:17)
    at hello_lwjgl.core$_main.doInvoke(core.clj:10)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.lang.Var.invoke(Var.java:379)
    at user$eval5.invokeStatic(form-init7029757012931126534.clj:1)
    at user$eval5.invoke(form-init7029757012931126534.clj:1)
    at clojure.lang.Compiler.eval(Compiler.java:6927)
    at clojure.lang.Compiler.eval(Compiler.java:6917)
    at clojure.lang.Compiler.load(Compiler.java:7379)
    ... 14 more

Indicates a failure near this line:

(CL10/clSetKernelArg1p kernel 0 a-mem)

and that call http://javadoc.lwjgl.org/org/lwjgl/opencl/CL10.html#clSetKernelArg1p(long,%20int,%20long)

public static int clSetKernelArg1p(long kernel,
               int arg_index,
               long arg0)

does not ask for a org.lwjgl.PointerBuffer

0.4.0 not deployed to clojars

I'd like to make aaron-santos/zaffre depend on the official release of hello_lwjgl 0.4.0. Could you deploy it to clojars?

XstartOnFirstThread causes problems with cider-repl integration [Mac OS X]

New to Clojure and it's been decades since I last worked with Java so apologies in advance for a slightly garbled issue! :)

Let me start with what I would like:

  • run emacs
  • M-x cider-jack-in
  • load & evaluate the hello-lwjgl buffer
  • observe the wondrous spinning triangle
  • make changes to (draw) and see it reflected in the wondrous spinning triangle

All very well and fine but basically:

I can run the sample code from lein by passing -XstartOnFirstThread in :jvmopts

BUT

If I try to M-x cider-jack-in with -XstartOnFirstThread present emacs never manages to boot a repl, hanging instead.

Conversely, if I remove -XstartOnFirstThread, I can boot the cider repl but then end up with:

java.lang.IllegalStateException: GLFW windows may only be created 
on the main thread and that thread must be the first thread in the process. 
Please run the JVM with -XstartOnFirstThread.

…when I try to evaluate the hello-lwjgl buffer.

create native app?

Figure out lein uberjar and how to create a native mac/win/linux app.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.