LWJGL Forum

Please login or register.

Login with username, password and session length

Author Topic: [Solved] how can i draw 3d shape from Vector3f list  (Read 132 times)

Andrew Alfazy

  • Newbie
  • *
  • Offline Offline
  • Posts: 15
[Solved] how can i draw 3d shape from Vector3f list
« 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)
Logged

Kai

  • Guest
Re: how can i draw 3d shape from Vector3f list
« Reply #1 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();
Logged

Andrew Alfazy

  • Newbie
  • *
  • Offline Offline
  • Posts: 15
Re: how can i draw 3d shape from Vector3f list
« Reply #2 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
Logged

Kai

  • Guest
Re: how can i draw 3d shape from Vector3f list
« Reply #3 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
Logged

Andrew Alfazy

  • Newbie
  • *
  • Offline Offline
  • Posts: 15
Re: how can i draw 3d shape from Vector3f list
« Reply #4 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 :)
Logged