0
我們得到了Nvidia880米JOGL崩潰的着色器初始化,在glLinkProgram
一個新的筆記本纔出現了win8.1,我們安裝了7 64
試圖執行JOGL,JAVA崩潰
崩潰時glLinkProgram被稱爲
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j jogamp.opengl.gl4.GL4bcImpl.dispatch_glLinkProgram1(IJ)V+0
j jogamp.opengl.gl4.GL4bcImpl.glLinkProgram(I)V+46
j javax.media.opengl.DebugGL4bc.glLinkProgram(I)V+9
j glsl.GLSLProgramObject.initializeProgram(Ljavax/media/opengl/GL3;Z)V+113
我使用過去編寫的一些代碼來創建着色器,它總是能夠工作,而且我從來沒有遇到過問題,所以我擔心它與nvidia opengl驅動程序有關..
我正在初始化程序這樣
public final void initializeProgram(GL3 gl3, boolean cleanUp) {
_progId = gl3.glCreateProgram();
for (int i = 0; i < _vertexShaders.size(); i++) {
gl3.glAttachShader(_progId, _vertexShaders.get(i));
}
for (int i = 0; i < _fragmentShaders.size(); i++) {
gl3.glAttachShader(_progId, _fragmentShaders.get(i));
}
gl3.glLinkProgram(_progId);
int[] params = new int[]{0};
gl3.glGetProgramiv(_progId, GL3.GL_LINK_STATUS, params, 0);
if (params[0] != 1) {
System.err.println("link status: " + params[0]);
gl3.glGetProgramiv(_progId, GL3.GL_INFO_LOG_LENGTH, params, 0);
System.err.println("log length: " + params[0]);
byte[] abInfoLog = new byte[params[0]];
gl3.glGetProgramInfoLog(_progId, params[0], params, 0, abInfoLog, 0);
System.err.println(new String(abInfoLog));
}
gl3.glValidateProgram(_progId);
if (cleanUp) {
for (int i = 0; i < _vertexShaders.size(); i++) {
gl3.glDetachShader(_progId, _vertexShaders.get(i));
gl3.glDeleteShader(_vertexShaders.get(i));
}
for (int i = 0; i < _fragmentShaders.size(); i++) {
gl3.glDetachShader(_progId, _fragmentShaders.get(i));
gl3.glDeleteShader(_fragmentShaders.get(i));
}
}
}
任何提示?
兩個337和340的驅動失敗
正如jmaasing告訴你的,您的英特爾芯片可能用於代替Nvidia芯片:http://forum.jogamp.org/glLinkProgram-crash -tp4033000p4033001.html – gouessej 2014-09-01 13:13:22
如果可能,請向我們顯示您的glsl代碼。如果你有int計數器的循環(對於int i = 0 ...),嘗試將它們轉換爲浮點循環。它解決了我的超級神祕glLinkProgram崩潰...不知道爲什麼... – 2015-02-14 11:14:57
更多相關信息:在http://stackoverflow.com/questions/27411947/gllinkprogram-crashes-even-though-glcompileshader -does - 不返回任何錯誤 – 2015-02-14 11:47:30