Hi All,
I've been lurking around for the past few months just learning the API and developing my OpenGL skills building the obligatory terrain engine. I now want to speed it up a bit and am trying to use the ARB_vertex_buffer_objects. I'm just trying to get a simple example that works initially but am having no luck.
I'm using:
lwjgl0.7,
Detonator 45.23 on Geforce 4 TI 4400
Win2k
// in declarations:
private static IntBuffer buf;
private static int data[] = { -1, 1, 0,
-1, -1, 0,
1, -1, 0 };
// in the init:
GL.glEnableClientState(GL.GL_VERTEX_ARRAY);
buf = ByteBuffer.allocateDirect(9*4).order(ByteOrder.nativeOrder()).asIntBuffer().put(data);
GL.glGenBuffersARB(buf);
GL.glBindBufferARB(GL.GL_ARRAY_BUFFER_ARB, buf.get(0));
GL.glBufferDataARB(GL.GL_ARRAY_BUFFER_ARB, 9*4, buf, GL.GL_STATIC_DRAW_ARB);
// in the render loop:
GL.glBindBufferARB(GL.GL_ARRAY_BUFFER_ARB, buf.get(0));
GL.glVertexPointer(3, 0, buf);
GL.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, 3);
I get the following when i try to run it:
Setting display mode to 640 x 480 x 16 @75Hz
Created display.
Created OpenGL.
Timer resolution: 1193182
Number of texture units: 4
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x0
Function=[Unknown.]
Library=(N/A)
NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.
Current Java thread:
at org.lwjgl.opengl.GL.nglGenBuffersARB(Native Method)
at org.lwjgl.opengl.GL.glGenBuffersARB(GL.java:1511)
at viewer.Test3.init(Test3.java:203)
at viewer.Test3.main(Test3.java:106)
Dynamic libraries:
0x00400000 - 0x00406000 D:\j2sdk1.4.0\jre\bin\java.exe
0x77F80000 - 0x77FF9000 C:\WINNT\System32\ntdll.dll
0x77DB0000 - 0x77E0A000 C:\WINNT\system32\ADVAPI32.dll
0x77E80000 - 0x77F36000 C:\WINNT\system32\KERNEL32.DLL
0x77D40000 - 0x77DAF000 C:\WINNT\system32\RPCRT4.DLL
0x78000000 - 0x78046000 C:\WINNT\system32\MSVCRT.dll
0x6D330000 - 0x6D442000 D:\j2sdk1.4.0\jre\bin\client\jvm.dll
0x77E10000 - 0x77E75000 C:\WINNT\system32\USER32.dll
0x77F40000 - 0x77F7C000 C:\WINNT\system32\GDI32.DLL
0x77570000 - 0x775A0000 C:\WINNT\System32\WINMM.dll
0x6D1D0000 - 0x6D1D7000 D:\j2sdk1.4.0\jre\bin\hpi.dll
0x6D300000 - 0x6D30D000 D:\j2sdk1.4.0\jre\bin\verify.dll
0x6D210000 - 0x6D228000 D:\j2sdk1.4.0\jre\bin\java.dll
0x6D320000 - 0x6D32D000 D:\j2sdk1.4.0\jre\bin\zip.dll
0x10000000 - 0x10043000 D:\lwjgl-0.7\lwjgl.dll
0x5F580000 - 0x5F620000 C:\WINNT\System32\DINPUT.dll
0x69510000 - 0x695D7000 C:\WINNT\System32\OPENGL32.dll
0x6FAC0000 - 0x6FADF000 C:\WINNT\System32\GLU32.dll
0x51000000 - 0x5104D000 C:\WINNT\System32\DDRAW.dll
0x728A0000 - 0x728A6000 C:\WINNT\System32\DCIMAN32.dll
0x6E420000 - 0x6E426000 C:\WINNT\System32\INDICDLL.dll
0x75E60000 - 0x75E7A000 C:\WINNT\System32\IMM32.dll
0x6F9A0000 - 0x6F9A7000 C:\WINNT\System32\HID.DLL
0x77890000 - 0x7791D000 C:\WINNT\System32\SETUPAPI.DLL
0x77C10000 - 0x77C6D000 C:\WINNT\System32\USERENV.DLL
0x77B50000 - 0x77BDA000 C:\WINNT\system32\COMCTL32.dll
0x17FE0000 - 0x18342000 C:\WINNT\System32\nvoglnt.dll
0x77920000 - 0x77942000 C:\WINNT\system32\imagehlp.dll
0x72A00000 - 0x72A2D000 C:\WINNT\system32\DBGHELP.dll
0x690A0000 - 0x690AB000 C:\WINNT\System32\PSAPI.DLL
Local Time = Sun Sep 14 14:43:53 2003
Elapsed Time = 4
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.0-b92 mixed mode)
#
# An error report file has been saved as hs_err_pid1400.log.
# Please refer to the file for further information.
#
Thanks to anyone who can help me with this...
Kramer