[Solved] how can i draw 3d shape from Vector3f list

Started by Andrew Alfazy, August 04, 2017, 21:26:05

Previous topic - Next topic

Andrew Alfazy

how can i draw 3d shape from Vector3f list (my opengl is 1.4.0 - Build 4.14.10.4543)

Kai

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:
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();

Andrew Alfazy

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

Kai

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

Andrew Alfazy

Thank you for your help I found the problem ;D
(I Haven't Read the Faces "f ") ::)
Your link was helpful :)