Show Posts
|
|
Pages: [1] 2
|
|
1
|
Java Game APIs & Engines / OpenGL Development / Re: Need testers for Nehe lesson 45 port for LWJGL
|
on: 2007-04-04 15:33:26
|
if this is still active, send one to me also, my mail is in profile I have radeon x800
Hi I've just mailed it. Copy it to any folder, create a java project (JCreator/Eclipse/whatever), link the project to LWJGL and ur good to go. u can change in Main.Java: 1
| m_heightMap.loadHeightmap2("Data/tavor64x64.jpg", |
if u change the filename u can load other Heightmaps from any picture format. some lines below u can change also the texture file. u can also modify other params. enjoy 
|
|
|
|
|
2
|
Java Game APIs & Engines / OpenGL Development / need small help with gl12.glDrawRangeElements(...)
|
on: 2007-03-08 14:04:43
|
|
in GL12.glDrawRangeElements(int mode, int start, int end, int count, int type, long indices_buffer_offset) can someone please explain what every parameter specifies? im not sure i got it right and i couldn't find any useful into in google/other.
Lets say i have an indices buffer (size 6 = 2 triangles X 3 vertices) and 6 interleaved vertices in my vertices array (V[3]N[3]C[4]T[2]) of float type.
what do i need to specify in glDrawRangeElements(...) to draw them all (its VBO based).
|
|
|
|
|
6
|
Java Game APIs & Engines / OpenGL Development / Re: A bug in Wiki-LWJGL tutorial?
|
on: 2007-03-01 12:20:05
|
sorry, but i insist  the structure should be V[3*4byte]N[3*4byte]C[4*4byte]T1[2*byte] so if i need the texture (s,t) , i need to do : 1 2
| intlvdarr[4*(3+3+4)+0] = texture_s; intlvdarr[4*(3+3+4)+1] = texture_t; |
the texture offset WOULD be 3+3+2 for the following structure: V[3*4byte]N[3*4byte]T1[2*byte]C[4*4byte] please check it again  thanks.
|
|
|
|
|
8
|
Java Game APIs & Engines / OpenGL Development / Re: A bug in Wiki-LWJGL tutorial?
|
on: 2007-02-27 12:03:05
|
|
yes, i understand what the x4 means, but if u decided that the interleaved structure is like this: V[xyz]N[xyz]C[rgba]T1[st]
then the offset for the starting of the texture should be (3+3+4)*4 and not (3+3+2)*4, since the color have rgba channels = 4 channel..., and it comes before the texture channels...
btw - i already implemented it, and its 3+3+4. please check ur tutorial again (it really helped me, though !).
|
|
|
|
|
10
|
Java Game APIs & Engines / OpenGL Development / Need a reference code for glDrawElements
|
on: 2007-02-24 18:25:10
|
Hi all Im still having problems with using the buffers. I could not find any source that explains simply how to use them currectly with GL (thanks for all the links.. they did not help though). I need a reference code for using LWJGL with glDrawElements (non VBO please!). an app that is using GL_VERTEX_ARRAY,GL_TEXTURE_COORD_ARRAY and GL_COLOR_ARRAY would be best. please mail me to preshel@gmail.comthanks !
|
|
|
|
|
13
|
Game Development / Performance Tuning / OutOfMemoryError: Direct buffer memory
|
on: 2007-02-15 17:06:33
|
Hi, i've made: 1 2 3
| m_vertices = BufferUtil.newFloatBuffer(m_vertexCount * 3* fVertexPerPixel); m_texCoords = BufferUtil.newFloatBuffer(m_vertexCount * 2* fVertexPerPixel); |
and i get the memory error. if i enable "float [] vertices= new float[m_vertexCount * 2* fVertexPerPixel*fVertexPerPixel];" and disable "m_vertices = BufferUtil.newFloatBuffer(m_vertexCount * 3* fVertexPerPixel);", i dont get an error. 1) is the ByteBuffer limited in any way, and have less mem space than the java heap? 2) can i extend the java heap?
|
|
|
|
|
14
|
Game Development / Performance Tuning / Making multiple TriangleStrips Vs. one long Triangle array
|
on: 2007-02-15 14:49:05
|
Hi I am making something regarding a heightmap. well, i have the grid, and I want to use "GL_ARRAY_BUFFER" option (i dont have VBO on my laptop card  ). I can make one long buffer of all my triangles, but I can also arrange my grid as a collection of triangle strips. What is considered to be faster? I can have just one single call for an ordinary triangle array, and I can have multiple calls for my multiple triangle strips. whats usually faster and regarded as better method?
|
|
|
|
|
15
|
Java Game APIs & Engines / OpenGL Development / Re: Using DevIL to make a heightmap from a bmp/jpg file
|
on: 2007-02-15 10:48:05
|
There is no book in DevIL, i guess. for example, when i see on the documentation: ilIsValid(int Type, java.lang.String FileName) I dont know what is it for, what is "Type" param and which constant values are valid for it, etc. anyhoo, i've got the following code: 1 2 3 4 5 6 7 8
| IntBuffer image = BufferUtil.newIntBuffer(1); IL.ilGenImages(image); IL.ilBindImage(image.get(0)); IL.ilLoadImage("Data/heightmap1.bmp"); IL.ilConvertImage(IL.IL_RGB, IL.IL_BYTE); ByteBuffer scratch = IL.ilGetData(); for (int i=0;i<500;i++) System.out.println(""+i+": "+scratch.get(i)); |
why do i see negative numbers on the output?
|
|
|
|
|
16
|
Java Game APIs & Engines / OpenGL Development / Re: Using DevIL to make a heightmap from a bmp/jpg file
|
on: 2007-02-14 16:37:12
|
|
Usually when i'm reading something about a new library, I dont fully understands.
Also, the DevIL documentation practictly dont exists. Just have the methods, and not how to use them.
I looked up for the "imageio" , and i found it, but i could not figure out what to do with it... "image stream" etc. dont mean nothing to me.
maybe i have a deeper problem. How do u guys understand such concepts?
|
|
|
|
|
19
|
Java Game APIs & Engines / OpenGL Development / Re: NullPointerException after calling to GL11.glGenTextures
|
on: 2007-02-13 21:01:07
|
Here is the full log: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
| # # An unexpected error has been detected by HotSpot Virtual Machine: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x69557dda, pid=3544, tid=2472 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_09-b03 mixed mode, sharing) # Problematic frame: # C [nvoglnt.dll+0x57dda] #
--------------- T H R E A D ---------------
Current thread (0x000368b8): JavaThread "main" [_thread_in_native, id=2472]
siginfo: ExceptionCode=0xc0000005, reading address 0x0c0c2fa2
Registers: EAX=0x00000031, EBX=0x0bf92fa2, ECX=0x0bbc5474, EDX=0x42a00000 ESP=0x0007f964, EBP=0x00000030, ESI=0x07485298, EDI=0x0c0c2fa2 EIP=0x69557dda, EFLAGS=0x00010202
Top of Stack: (sp=0x0007f964) 0x0007f964: 00018000 00000004 0747c2c0 00000000 0x0007f974: 0747c2c0 69558d12 00000000 00017f34 0x0007f984: 0007f9f8 000368b8 0747c2c0 26b066e8 0x0007f994: 6960deff 0747c2c0 00000004 00000000 0x0007f9a4: 00018000 26b066e8 10006f53 00000004 0x0007f9b4: 00000000 00018000 00ad832f 00036978 0x0007f9c4: 0007fa00 00000004 00000000 00018000 0x0007f9d4: 69607730 00000000 0007f9dc 26b066e8
Instructions: (pc=0x69557dda) 0x69557dca: 12 8b d5 0d 00 38 00 40 4d 89 41 fc 85 d2 7e 2b 0x69557dda: 8b 07 89 01 83 c1 14 8b 57 04 89 51 f0 03 7e 7c
Stack: [0x00040000,0x00080000), sp=0x0007f964, free space=254k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [nvoglnt.dll+0x57dda]
[error occurred during error reporting, step 120, id 0xc0000005]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j org.lwjgl.opengl.GL11.nglDrawArrays(IIIJ)V+0 j org.lwjgl.opengl.GL11.glDrawArrays(III)V+20 j myUtilities.myHeightMap.render()V+92 j Main.render()V+36 j Main.run()V+31 j Main.main([Ljava/lang/String;)V+3 v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread ) 0x00a72038 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=1120] 0x00a70c20 JavaThread "CompilerThread0" daemon [_thread_blocked, id=2744] 0x00a6ffd0 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=1608] 0x00a48c60 JavaThread "Finalizer" daemon [_thread_blocked, id=3756] 0x00a6ab30 JavaThread "Reference Handler" daemon [_thread_blocked, id=3108] =>0x000368b8 JavaThread "main" [_thread_in_native, id=2472]
Other Threads: 0x00a68df0 VMThread [id=2940] 0x00a8cb88 WatcherThread [id=1812]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap def new generation total 576K, used 208K [0x22a70000, 0x22b10000, 0x22f50000) eden space 512K, 40% used [0x22a70000, 0x22aa41b8, 0x22af0000) from space 64K, 0% used [0x22af0000, 0x22af0000, 0x22b00000) to space 64K, 0% used [0x22b00000, 0x22b00000, 0x22b10000) tenured generation total 3232K, used 2345K [0x22f50000, 0x23278000, 0x26a70000) the space 3232K, 72% used [0x22f50000, 0x2319a7a0, 0x2319a800, 0x23278000) compacting perm gen total 8192K, used 873K [0x26a70000, 0x27270000, 0x2aa70000) the space 8192K, 10% used [0x26a70000, 0x26b4a728, 0x26b4a800, 0x27270000) ro space 8192K, 67% used [0x2aa70000, 0x2afce5d8, 0x2afce600, 0x2b270000) rw space 12288K, 47% used [0x2b270000, 0x2b8187f0, 0x2b818800, 0x2be70000)
Dynamic libraries: 0x00400000 - 0x0040d000 C:\Program Files\Java\jdk1.5.0_09\bin\java.exe 0x77f50000 - 0x77ff7000 C:\WINDOWS\System32\ntdll.dll 0x77e60000 - 0x77f46000 C:\WINDOWS\system32\kernel32.dll 0x77dd0000 - 0x77e5d000 C:\WINDOWS\system32\ADVAPI32.dll 0x78000000 - 0x78087000 C:\WINDOWS\system32\RPCRT4.dll 0x77c10000 - 0x77c63000 C:\WINDOWS\system32\MSVCRT.dll 0x6d730000 - 0x6d8cb000 C:\Program Files\Java\jdk1.5.0_09\jre\bin\client\jvm.dll 0x77d40000 - 0x77dcd000 C:\WINDOWS\system32\USER32.dll 0x7f000000 - 0x7f042000 C:\WINDOWS\system32\GDI32.dll 0x76b40000 - 0x76b6c000 C:\WINDOWS\System32\WINMM.dll 0x76390000 - 0x763ac000 C:\WINDOWS\System32\IMM32.DLL 0x629c0000 - 0x629c8000 C:\WINDOWS\System32\LPK.DLL 0x72fa0000 - 0x72ffa000 C:\WINDOWS\System32\USP10.dll 0x6d2f0000 - 0x6d2f8000 C:\Program Files\Java\jdk1.5.0_09\jre\bin\hpi.dll 0x76bf0000 - 0x76bfb000 C:\WINDOWS\System32\PSAPI.DLL 0x6d700000 - 0x6d70c000 C:\Program Files\Java\jdk1.5.0_09\jre\bin\verify.dll 0x6d370000 - 0x6d38d000 C:\Program Files\Java\jdk1.5.0_09\jre\bin\java.dll 0x6d720000 - 0x6d72f000 C:\Program Files\Java\jdk1.5.0_09\jre\bin\zip.dll 0x10000000 - 0x1004b000 C:\WINDOWS\system32\lwjgl.dll 0x72280000 - 0x722a8000 C:\WINDOWS\System32\DINPUT.dll 0x4fec0000 - 0x4ffe6000 C:\WINDOWS\system32\ole32.dll 0x5ed00000 - 0x5edc6000 C:\WINDOWS\System32\OPENGL32.dll 0x68b20000 - 0x68b3e000 C:\WINDOWS\System32\GLU32.dll 0x51000000 - 0x51050000 C:\WINDOWS\System32\DDRAW.dll 0x73bc0000 - 0x73bc6000 C:\WINDOWS\System32\DCIMAN32.dll 0x77c00000 - 0x77c07000 C:\WINDOWS\system32\VERSION.dll 0x5ad70000 - 0x5ada4000 C:\WINDOWS\System32\uxtheme.dll 0x06ea0000 - 0x06ecb000 C:\WINDOWS\System32\msctfime.ime 0x69500000 - 0x6981e000 C:\WINDOWS\System32\nvoglnt.dll 0x746f0000 - 0x74716000 C:\WINDOWS\System32\Msimtf.dll 0x74720000 - 0x74764000 C:\WINDOWS\System32\MSCTF.dll 0x7c890000 - 0x7c910000 C:\WINDOWS\System32\CLBCATQ.DLL 0x77120000 - 0x771ab000 C:\WINDOWS\system32\OLEAUT32.dll 0x77050000 - 0x77115000 C:\WINDOWS\System32\COMRes.dll 0x6ce10000 - 0x6ce45000 C:\WINDOWS\System32\dinput8.dll 0x688f0000 - 0x688f9000 C:\WINDOWS\System32\HID.DLL 0x76670000 - 0x76757000 C:\WINDOWS\System32\SETUPAPI.DLL 0x6d070000 - 0x6d1d9000 C:\Program Files\Java\jdk1.5.0_09\jre\bin\awt.dll 0x73000000 - 0x73023000 C:\WINDOWS\System32\WINSPOOL.DRV 0x0c1e0000 - 0x0c2d6000 C:\WINDOWS\System32\OpenAL32.dll 0x51080000 - 0x510e1000 C:\WINDOWS\System32\dsound.dll 0x72d20000 - 0x72d29000 C:\WINDOWS\System32\wdmaud.drv 0x72d10000 - 0x72d18000 C:\WINDOWS\System32\msacm32.drv 0x77be0000 - 0x77bf4000 C:\WINDOWS\System32\MSACM32.dll 0x77bd0000 - 0x77bd7000 C:\WINDOWS\System32\midimap.dll 0x5ef80000 - 0x5ef84000 C:\WINDOWS\System32\KsUser.dll
VM Arguments: java_command: Main Launcher Type: SUN_STANDARD
Environment Variables: PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\flexlm\bin;C:\Ptc\promechWildfire\bin;C:\Program Files\Common Files\Autodesk Shared\ USERNAME=asi preshel OS=Windows_NT PROCESSOR_IDENTIFIER=x86 Family 6 Model 9 Stepping 5, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows XP Build 2600 Service Pack 1
CPU:total 1 (cores per cpu 1, threads per core 1) family 6 model 9 stepping 5, cmov, cx8, fxsr, mmx, sse, sse2
Memory: 4k page, physical 261104k(97844k free), swap 639152k(289400k free)
vm_info: Java HotSpot(TM) Client VM (1.5.0_09-b03) for windows-x86, built on Oct 12 2006 01:20:10 by "java_re" with MS VC++ 6.0 |
|
|
|
|
|
20
|
Game Development / Newbie & Debugging Questions / Re: How to make a batch file for my app?
|
on: 2007-02-13 20:58:57
|
honestly ... I don't know  structure would be very good. I'm interested why this thing doesn't work so if you want you can send your app to me and I will try to make a jar file. kova1337(funnyA)gmail.com Thanks. I mailed u all the info needed, and all the files. BTW - i tried to use JSMOOTH, but i could not get it to work anyway.
|
|
|
|
|
21
|
Java Game APIs & Engines / OpenGL Development / Re: NullPointerException after calling to GL11.glGenTextures
|
on: 2007-02-13 00:16:47
|
its impossible to guess whats wrong without the full log, for all we know, you could be calling OpenGL methods without even having created a display - or you could passing illegal buffers to the drivers - it's pure guesswork.
Saying that stuff work in jogl doesn't actually mean anything. Since jogl and lwjgl are two completely different codebases you can't compare them in that regard.
hi the display was created. I copy pasted a legitimate code from texture-loading in LWJGL based NeHe lesson 7....
|
|
|
|
|
22
|
Game Development / Newbie & Debugging Questions / Re: How to make a batch file for my app?
|
on: 2007-02-12 23:26:17
|
|
Isn't jar a package?
anyway, i pushed all the class files of myUtilities package into a jar file, and i've included it in the main jar file. still doesn't work.
im TOTALLY lost.
my app is very light weight... maybe i can send it to someone who is ready to make a batch file? i guess that i'll learn the rest by myself...
I can also describe the structure of my files etc., if it will do any good.
|
|
|
|
|
24
|
Java Game APIs & Engines / OpenGL Development / Re: NullPointerException after calling to GL11.glGenTextures
|
on: 2007-02-12 19:06:02
|
|
It shouldn't crash, since the Nehe tutorial (45) worked with JoGL library.
I just tried to port it to LWJGL, and it crashed when calling to GL11.glGenTextures(m_textureId).
m_textureId is defined as: private IntBuffer m_textureId = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer();
I just copy pasted all that memory stuff from other Nehe - LWJGL lesson, since it worked there (a textured spinning cube).
|
|
|
|
|
25
|
Game Development / Newbie & Debugging Questions / Re: How to make a batch file for my app?
|
on: 2007-02-12 19:00:59
|
ah the pain... use a manifest file, it's nicer way to create jars with manifest. Put your LWJGL jar into your jar file like any other file. Then you need to add class path argument into manifest file to your LWJGL jar file.
This is example how I did it when I worked with jdbc driver:
Ok, I did something else, and it worked , but now i have a totally new bug i have a "java.lang.NoClassDefFoundError" on one of my package classes. the package is defined as a class path in my manifest file as: Class-Path: myUtilities the app crashes when i try to call one of myUtilities classes from my main class. what can it be?
|
|
|
|
|
30
|
Java Game APIs & Engines / OpenGL Development / Extention query
|
on: 2007-02-11 21:49:47
|
i saw that JoGL can make the following code: 1 2 3 4
| boolean has VBO = (gl.isFunctionAvailable("glGenBuffersARB") && gl.isFunctionAvailable("glBindBufferARB") && gl.isFunctionAvailable("glBufferDataARB") && gl.isFunctionAvailable("glDeleteBuffersARB")); |
what is the equvalient procedure in LWJGL?
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|