异常访问冲突?
Exception Access Violation?
我不明白,我正在学习 LWJGL,但是当我输入该代码时:
public void render()
{
glBindBuffer(GL_ARRAY_BUFFER, vID);
glVertexPointer(3, GL_FLOAT, 0, 0L);
glEnableClientState(GL_VERTEX_ARRAY);
glDrawArrays(GL_QUADS, 0, CHUNK_SIZE * CHUNK_SIZE * CHUNK_SIZE * (3 * 4 * 6));
glDisableClientState(GL_VERTEX_ARRAY);
}
java 投掷:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000056fda8e0, pid=8840, tid=8336
#
# JRE version: Java(TM) SE Runtime Environment (7.0_75-b13) (build 1.7.0_75-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.75-b04 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C [atio6axx.dll+0x21a8e0]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\Chargon\Desktop\Programming\JavaRessource\PandorasGame\hs_err_pid8840.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
我该如何解决类似的问题?我启用客户端状态并且 vertexPointer 浮点数为“3”。我真的需要一些帮助 x.x 非常感谢
LWJGL 中的访问冲突主要是由缓冲区大小和渲染调用计数不合适引起的。
您应该检查您的 vID 是否真的包含要绘制的 CHUNK_SIZE * CHUNK_SIZE * CHUNK_SIZE * (3 * 4 * 6)
个元素。参见 here。
我猜它应该是 CHUNK_SIZE * CHUNK_SIZE * CHUNK_SIZE * (4 * 6)
: CHUNK_SIZE^3 个元素,有 6 个边,每个边由 4 个顶点组成。
我不明白,我正在学习 LWJGL,但是当我输入该代码时:
public void render()
{
glBindBuffer(GL_ARRAY_BUFFER, vID);
glVertexPointer(3, GL_FLOAT, 0, 0L);
glEnableClientState(GL_VERTEX_ARRAY);
glDrawArrays(GL_QUADS, 0, CHUNK_SIZE * CHUNK_SIZE * CHUNK_SIZE * (3 * 4 * 6));
glDisableClientState(GL_VERTEX_ARRAY);
}
java 投掷:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000056fda8e0, pid=8840, tid=8336
#
# JRE version: Java(TM) SE Runtime Environment (7.0_75-b13) (build 1.7.0_75-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.75-b04 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C [atio6axx.dll+0x21a8e0]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\Chargon\Desktop\Programming\JavaRessource\PandorasGame\hs_err_pid8840.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
我该如何解决类似的问题?我启用客户端状态并且 vertexPointer 浮点数为“3”。我真的需要一些帮助 x.x 非常感谢
LWJGL 中的访问冲突主要是由缓冲区大小和渲染调用计数不合适引起的。
您应该检查您的 vID 是否真的包含要绘制的 CHUNK_SIZE * CHUNK_SIZE * CHUNK_SIZE * (3 * 4 * 6)
个元素。参见 here。
我猜它应该是 CHUNK_SIZE * CHUNK_SIZE * CHUNK_SIZE * (4 * 6)
: CHUNK_SIZE^3 个元素,有 6 个边,每个边由 4 个顶点组成。