LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Andrew Alfazy on August 04, 2017, 21:26:05

Title: [Solved] how can i draw 3d shape from Vector3f list
Post by: Andrew Alfazy on August 04, 2017, 21:26:05
how can i draw 3d shape from Vector3f list (my opengl is 1.4.0 - Build 4.14.10.4543)
Title: Re: how can i draw 3d shape from Vector3f list
Post by: Kai on August 04, 2017, 21:32:00
If your (presumably Intel 945G express chip) really only has OpenGL 1.4 support (even when upgrading your Intel driver), your only way is to use immediate mode, like so:
Code: [Select]
import static org.lwjgl.opengl.GL11.*;
glBegin(GL_TRIANGLES); // <- or GL_TRIANGLE_STRIP or GL_TRIANGLE_FAN or even GL_QUADS
for (Vertex3f v : vertices) {
  glVertex3f(v.x, v.y, v.z);
}
glEnd();
Title: Re: how can i draw 3d shape from Vector3f list
Post by: Andrew Alfazy on August 04, 2017, 21:38:07
I have Tried it,but it's don't give me the correct model
note : I'm loading from blender .opj file
load Vectors only
Title: Re: how can i draw 3d shape from Vector3f list
Post by: Kai on August 04, 2017, 21:40:45
Well, then you probably did not correctly interpret the information in the Wavefront OBJ file.
Please read: http://www.martinreddy.net/gfx/3d/OBJ.spec
Title: Re: how can i draw 3d shape from Vector3f list
Post by: Andrew Alfazy on August 05, 2017, 04:15:13
Thank you for your help I found the problem ;D
(I Haven't Read the Faces "f ") ::)
Your link was helpful :)