Hello Guest

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

  • 4 Replies
  • 3915 Views
*

Andrew Alfazy

[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)
« Last Edit: August 09, 2017, 04:33:03 by Andrew Alfazy »

*

Kai

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

*

Andrew Alfazy

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
« Last Edit: August 04, 2017, 21:39:53 by Andrew Alfazy »

*

Kai

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

*

Andrew Alfazy

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