LWJGL Forum

Please login or register.

Login with username, password and session length
Pages: 1 2 [3] 4 5 ... 10
 21 
 on: August 18, 2017, 10:11:36 
Started by ErChick3n - Last post by ErChick3n
So, now I'm pretty sure the problem is that I have not enough vram(i run some tests using gpu-z while running the game and the issue shows up only when video card memory is full). So I thought about loading and unloading chuncks of map with a margin of 1, so, if i'm looking at chunck 3,3 i will load from chunck 2,2 to chunck 4,4 and i update this every time camera moves. This actually solves the issue but loading and unloading from hdd seems to be a bit too slow. So i thought about two possible solutions, using multithreading, so the main thread runs the game and another one makes the unloading loading stuff, but i'd really prefer the second one that is loading and unloading stuff from video card memory to RAM and vice versa.
Is it possible to do? And if yes, do u know some tutorials or at least some good documentation about this?

 22 
 on: August 18, 2017, 10:07:08 
Started by Clancy - Last post by Kai
Heh. I think I meant "chewing" ;)
Have fun with LWJGL!

 23 
 on: August 18, 2017, 09:54:02 
Started by Andrew Alfazy - Last post by Kai
Your best option is to use OpenGL Display Lists.

 24 
 on: August 18, 2017, 07:47:30 
Started by Andrew Alfazy - Last post by Andrew Alfazy
Very Bad Performance When I Try to render about 16*16*16 Map Made Of Blocks
My Block Code
Code: [Select]
glBegin(GL_QUADS);
glColor3f(clr.x,clr.y,clr.z);

glVertex3f(pos.x-0.5f, pos.y-0.5f, pos.z+0.5f);
glVertex3f(pos.x+0.5f, pos.y-0.5f, pos.z+0.5f);
glVertex3f(pos.x+0.5f, pos.y+0.5f, pos.z+0.5f);
glVertex3f(pos.x-0.5f, pos.y+0.5f, pos.z+0.5f);

glVertex3f(pos.x-0.5f, pos.y-0.5f, pos.z-0.5f);
glVertex3f(pos.x+0.5f, pos.y-0.5f, pos.z-0.5f);
glVertex3f(pos.x+0.5f, pos.y+0.5f, pos.z-0.5f);
glVertex3f(pos.x-0.5f, pos.y+0.5f, pos.z-0.5f);

glVertex3f(pos.x+0.5f, pos.y-0.5f, pos.z-0.5f);
glVertex3f(pos.x+0.5f, pos.y-0.5f, pos.z+0.5f);
glVertex3f(pos.x+0.5f, pos.y+0.5f, pos.z+0.5f);
glVertex3f(pos.x+0.5f, pos.y+0.5f, pos.z-0.5f);

glVertex3f(pos.x-0.5f, pos.y-0.5f, pos.z-0.5f);
glVertex3f(pos.x-0.5f, pos.y-0.5f, pos.z+0.5f);
glVertex3f(pos.x-0.5f, pos.y+0.5f, pos.z+0.5f);
glVertex3f(pos.x-0.5f, pos.y+0.5f, pos.z-0.5f);

glVertex3f(pos.x-0.5f, pos.y+0.5f, pos.z-0.5f);
glVertex3f(pos.x+0.5f, pos.y+0.5f, pos.z-0.5f);
glVertex3f(pos.x+0.5f, pos.y+0.5f, pos.z+0.5f);
glVertex3f(pos.x-0.5f, pos.y+0.5f, pos.z+0.5f);

glVertex3f(pos.x-0.5f, pos.y-0.5f, pos.z-0.5f);
glVertex3f(pos.x+0.5f, pos.y-0.5f, pos.z-0.5f);
glVertex3f(pos.x+0.5f, pos.y-0.5f, pos.z+0.5f);
glVertex3f(pos.x-0.5f, pos.y-0.5f, pos.z+0.5f);

glColor3f(1,1,1);
glEnd();

glBegin(GL_LINES);
glColor3f(0,0,0);
glVertex3f(pos.x+0.5f, pos.y-0.5f, pos.z+0.5f);
glVertex3f(pos.x+0.5f, pos.y+0.5f, pos.z+0.5f);

glVertex3f(pos.x+0.5f, pos.y-0.5f, pos.z-0.5f);
glVertex3f(pos.x+0.5f, pos.y+0.5f, pos.z-0.5f);

glVertex3f(pos.x-0.5f, pos.y-0.5f, pos.z-0.5f);
glVertex3f(pos.x-0.5f, pos.y+0.5f, pos.z-0.5f);

glVertex3f(pos.x-0.5f, pos.y-0.5f, pos.z+0.5f);
glVertex3f(pos.x-0.5f, pos.y+0.5f, pos.z+0.5f);

glVertex3f(pos.x-0.5f, pos.y+0.5f, pos.z-0.5f);
glVertex3f(pos.x+0.5f, pos.y+0.5f, pos.z-0.5f);

glVertex3f(pos.x+0.5f, pos.y+0.5f, pos.z+0.5f);
glVertex3f(pos.x-0.5f, pos.y+0.5f, pos.z+0.5f);

glVertex3f(pos.x-0.5f, pos.y+0.5f, pos.z-0.5f);
glVertex3f(pos.x-0.5f, pos.y+0.5f, pos.z+0.5f);

glVertex3f(pos.x+0.5f, pos.y+0.5f, pos.z-0.5f);
glVertex3f(pos.x+0.5f, pos.y+0.5f, pos.z+0.5f);

glVertex3f(pos.x-0.5f, pos.y-0.5f, pos.z-0.5f);
glVertex3f(pos.x+0.5f, pos.y-0.5f, pos.z-0.5f);

glVertex3f(pos.x+0.5f, pos.y-0.5f, pos.z+0.5f);
glVertex3f(pos.x-0.5f, pos.y-0.5f, pos.z+0.5f);

glVertex3f(pos.x-0.5f, pos.y-0.5f, pos.z-0.5f);
glVertex3f(pos.x-0.5f, pos.y-0.5f, pos.z+0.5f);

glVertex3f(pos.x+0.5f, pos.y-0.5f, pos.z-0.5f);
glVertex3f(pos.x+0.5f, pos.y-0.5f, pos.z+0.5f);
glColor3f(1,1,1);
glEnd();
and Map Code I Call It 1 Time
Code: [Select]
for (int i = 0; i < SizeX*SizeY*SizeZ;i++ ) {

Map.add(new Block(new Vector3f(x,y,z), 0));

if(x < SizeX) {
x++;
}
if(x == SizeX) {
if(y < SizeY) {
y++;
x=0;
}else {
x--;
}
}
if(y == SizeY) {
if(z < SizeZ) {
z++;
y = 0;
x = 0;
}
}
}
and Render Code  I call per Frame
Code: [Select]
for (int i = 0; i < Map.size();i++) {
Map.get(i).Draw();
}

Notes :
I'm Trying 16 x 16 x 16 Map
Minecraft Work better in the same machine
My OpenGL 1.4.0 - Build 4.14.10.4543
Pentium 4 2.8GHz
Windows XP pro 32bit
Ram 2.5 GB

 25 
 on: August 17, 2017, 22:28:20 
Started by Clancy - Last post by Clancy
Points taken :-)

I was referring to the latest *official* release of LWJGL lagging with Vulkan support so it's great to learn about what's happening in the new builds.

And yes, I will do all the "choking" I require and then try to release some more complex Vulkan demos for everyone to benefit.

I'm totally new to LWJGL so please forgive my ignorance in these matters...

 26 
 on: August 17, 2017, 11:02:26 
Started by Clancy - Last post by Kai
Alright. Besides accusing LWJGL's Vulkan support of not being up-to-date and the existing demos not being fresh and complex enough, I'd suggest you start working with LWJGL/Vulkan for once. And the existing demos and all the Vulkan documentation you must read to understand that should give you already some months worth of choking on it.

You are of course encouraged to provide more demos.

This nice repository contains more Vulkan demos: https://github.com/SaschaWillems/Vulkan

 27 
 on: August 17, 2017, 10:43:53 
Started by Clancy - Last post by Clancy
Thanks, but it would be nice to see something "fresher" and a lot more complex.

Maybe, I have a job to do!

 28 
 on: August 17, 2017, 10:42:29 
Started by Clancy - Last post by spasi
The lwjgl3-demos repository contains a few Vulkan demos, here.

 29 
 on: August 17, 2017, 09:15:56 
Started by Clancy - Last post by Clancy
Thanks - that really is impressive and shows true "seriousness" :-)

Has anyone produced any demos of LWJGL apps with Vulkan and/or performed benchmarks versus other APIs?

 30 
 on: August 17, 2017, 07:42:06 
Started by Clancy - Last post by spasi
LWJGL has a dedicated project for Vulkan, lwjgl3-vulkangen. It parses the Vulkan registry and man pages from Vulkan-Docs and generates the LWJGL templates we use in lwjgl3. There are about 450 manually written lines in the Vulkan bindings, everything else is auto-generated. Which means it's always up-to-date. At least in LWJGL snapshots, the last official release (3.1.2) is a bit behind (1.0.49 vs 1.0.58).

Pages: 1 2 [3] 4 5 ... 10