I have recently made a project using LWJGL 3 but have run into a wall. I have looked all over but cannot seem to figure out why calling GL20.glShaderSource(shaderId, shaderCode) and then subsiquently GL20.glCompileShader(shaderId) returns an error. The error that I receive makes it appear as though lwjgl cannot discern the path to the shader files:
LWJGL Version 3.1.2 build 13
java.lang.Exception: ERROR COMPILING SHADER CODE: VERTEX SHADER FAILED TO
COMPILE WITH THE FOLLOWING ERRORS:
ERROR: 0:1: ERROR(#132) SYNTAX ERROR: "/" PARSE ERROR
ERROR: ERROR(#273) 1 COMPILATION ERRORS. NO CODE GENERATED
at com.wilby.model.ShaderProgram.createShader(ShaderProgram.java:47)
at com.wilby.model.ShaderProgram.createVertexShader(ShaderProgram.java:24)
at com.wilby.Renderer.initialise(Renderer.java:62)
at com.wilby.Game.initialise(Game.java:46)
at com.wilby.Game.loop(Game.java:23)
at com.wilby.Main.run(Main.java:27)
at com.wilby.Main.main(Main.java:16)
However it still makes this error even when the files do not need any prefix to reach it. Like I say, I am completely stumped.
The link to my project is here.
I found the solution. You have to read the file and use that as the string in the shader source method. Facepalm.
Related
I'm trying to compile a simple latex using LaTexTools package, and when I press cmd-B, I get the following error. I've googled this error and all the answers I've read have to do with java files, which I don't have here. I'm not sure how I should go about fixing this.
Error: Could not find or load main class test
[Finished in 0.1s with exit code 1]
[cmd: ['java', 'test']]
[dir: /Users/Username/Desktop]
[path: /Users/Username/Projects/reedsnotes/google-cloud-sdk/bin:/Users/Username/opt/anaconda3/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin]
The below code is annoying me. Ive had this work before without hassle in a different IDE
((AndroidDriver)appDriver).startActivity(new Activity("packageName", "packageActivity.itt.gui.ZoneWelcomeActivity"))
Full error org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: io.appium.uiautomator2.common.exceptions.UiAutomator2Exception: java.lang.IllegalArgumentException: Namespace with prefix 'packageName' has not been declared.
I need to switch between 2 apps on the device and from what i know this is the only way to do it?
I'm just starting out with Scala and have been following its Getting Started instructions. The second part of the instruction involves pulling the hello-world template by running the sbt new scala/hello-world.g8 command.
My problem is that it keeps on giving me this error:
Error: Could not find or load main class Anne
Caused by: java.lang.ClassNotFoundException: Anne
I'd like to know the reason for this, as well as any possible fix I might use.
The following is my insight and attempts on fixing this problem.
Insight:
1. I might have a problem with java installation/scala/sbt installation that needs this class Anne since even with other sbt commands like sbt sbtVersion I get the same error
Attempts:
1. Change command to retrieve from full url:
sbt new https://github.com/scala/hello-world.g8
2.(Edit): Previously I thought the repository scala/hello-world.g8 did not exist and tried getting from other repositories with no luck and with the same error as above. However it was pointed out below that the repository actually exists in this url https://github.com/scala/hello-world.g8, thanks Dmytro Mitin.
I was looking into the incorrect account (sbt) instead of (scala)
(Edit): Day 2
3. Uninstall/Reinstall sbt -- still getting the error
4. Checked if java running properly by compiling sample code and running ( successful )
I was actually running the command in Visual Studio Code's bash terminal. I tried running it with cmd and everything's now working fine.
I have used H2O for about a year now to build and score models but have never used MOJO to do this. This is something I am currently wanting to do and I came across the function h2o.mojo_predict_df to score out my models which will drastically increase runtime as well as allowing me to update my h2o without the worry of my models not scoring in a later version of h2o.
So I have downloaded my .zip from MOJO and corresponding .jar file, let's say they sit in the folder
C:\Folder\Test\Model.zip
C:\Folder\Test\h2o-genmodel.jar
Now am I trying to run it through, lets say my R data frame is called Data then I am using:
h2o.mojo_predict_df(frame = Data,
mojo_zip_path = "C:/Folder/Test/Model.zip",
genmodel_jar_path = "C:/Folder/Test/h2o-genmodel.jar")
However, this produces the error:
Error in safeSystem(cmd_str): SYSTEM COMMAND FAILED (exit status 127).
I am not quite sure what this is. My experience is java is limited. I tried on a different machine and got a completely different error:
"Error: Could not create a Java Virtual Machine".
Error: A fatal exception has occurred. The program will exit.
Unrecognised option : - 1.
Error in safeSystem(cmd_str) : SYSTEM COMMAND FAILED (exit status 1).
I'm not sure why they got different errors. The code ran was exactly the same.
Any help would be appreciated!
As nathan mentioned in the comments the error is due to a bug in Stacked Ensemble Mojo which can be tracked here: 0xdata.atlassian.net/browse/PUBDEV-6026
I've been following this guide to get playn up and running in eclipse indigo. Hit some major bumps along the way (the largest being swithing to gwt 2.3) but I've managed to get it compiling the as files. The problem is when it starts to create the swf I get this flash compilation error:
C:\Users\ted\AppData\Local\Temp\1351877287607-0\testsgameflash.as(145): col: 220 Error: Incorrect number of arguments. Expected no more than 1.
function $replace_0(this$static,from,to){var regex;if(from<256){regex=toPowerOfTwoString(from);regex='\\x'+'00'.substring(regex.length)+regex}else{regex=String.fromCharCode(from)}return this$static.replace(RegExp(regex,'g'),String.fromCharCode(to))}
C:\Users\ted\AppData\Local\Temp\1351877287607-0\testsgameflash.as(146): col: 131 Error: Incorrect number of arguments. Expected no more than 1.
function $replaceAll(this$static,regex,replace){replace=__translateReplaceString(replace);return this$static.replace(RegExp(regex,'g'),replace)}
It looks like it is casting the value as 'RegExp' instead of creating a new instance of RegExp. I'm not sure where the mess up is and I just wondering what I can do to fix it and get everything compiled