Delgine 3D Tools & Content DeleD Community Edition
Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Rendering .DMF

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Community Edition
View previous topic :: View next topic  
Author Message
banshee777
Member


Joined: 10 Feb 2005
Posts: 37

PostPosted: Sat Feb 12, 2005 1:11 pm    Post subject: Rendering .DMF Reply with quote

I'm kinda using QUADS in opengl, but i think the UV cooridants are made for TRAINGLES?

Should render cubes in triiangles?

glBegin(GL_QUADS);
glTexCoord2f(box[i].uv_values0[1],box[i].uv_values1[1]);
glVertex3d(box[i].x4,box[i].y4,box[i].z4);
glTexCoord2f(box[i].uv_values2[1],box[i].uv_values3[1]);
glVertex3d(box[i].x5,box[i].y5,box[i].z5);
glTexCoord2f(box[i].uv_values4[1],box[i].uv_values5[1]);
glVertex3d(box[i].x6,box[i].y6,box[i].z6);
glTexCoord2f(box[i].uv_values6[1],box[i].uv_values7[1]);
glVertex3d(box[i].x7,box[i].y7,box[i].z7);
glEnd();

abit of the cdode

http://geocities.com/geforce2mx2000/engine/QUAD.jpg screenshot..
Back to top
View user's profile Send private message
Paul-Jan
Site Admin


Joined: 08 Aug 2004
Posts: 3066
Location: Lage Zwaluwe

PostPosted: Sat Feb 12, 2005 1:48 pm    Post subject: Reply with quote

I am guessing you just have the wrong numbers inside your uv_values (or, more probably, have them in the wrong order). However, there is no way to see that from that code fragment. UV coordinates are not 'made' for anything. They are just per-vertex data. Both in DeleD and the OpenGL API.

This sounds like a very generic opengl beginners problem. Without wanting to do you wrong, do you have any prior OpenGL experience? You might want to try some simple examples (like those on http://nehe.gamedev.net) first.

If you are really (really really) stuck, you can always try sending me your source code and I'll see if I can find the time to fix it. What flavour of C++ are you in?
Back to top
View user's profile Send private message Visit poster's website
banshee777
Member


Joined: 10 Feb 2005
Posts: 37

PostPosted: Sat Feb 12, 2005 2:07 pm    Post subject: Reply with quote

vertices,materialID,vertice index values,uv values)
4;4;1;2;6;5;0.0000;-1.0000;-3.5000;-1.0000;-3.5000;3.5000;0.0000;3.5000;


1.2.6.5/....vertice index values..not sure what that is.
Back to top
View user's profile Send private message
banshee777
Member


Joined: 10 Feb 2005
Posts: 37

PostPosted: Sat Feb 12, 2005 2:09 pm    Post subject: Reply with quote

Paul-Jan wrote:
I am guessing you just have the wrong numbers inside your uv_values (or, more probably, have them in the wrong order). However, there is no way to see that from that code fragment. UV coordinates are not 'made' for anything. They are just per-vertex data. Both in DeleD and the OpenGL API.

This sounds like a very generic opengl beginners problem. Without wanting to do you wrong, do you have any prior OpenGL experience? You might want to try some simple examples (like those on http://nehe.gamedev.net) first.

If you are really (really really) stuck, you can always try sending me your source code and I'll see if I can find the time to fix it. What flavour of C++ are you in?


c++ just know a little c++ and little opengl...
Back to top
View user's profile Send private message
Paul-Jan
Site Admin


Joined: 08 Aug 2004
Posts: 3066
Location: Lage Zwaluwe

PostPosted: Sat Feb 12, 2005 3:34 pm    Post subject: Reply with quote

About "Vertex index values": first in the file is the vertex data (the x,y,z coordinates per vertex). If you'd store them into an array, those 'vertex index values' are the indices into that array. So 1, 2, 5 and 6 would be the vertices[1], vertices[2], vertices[5] and vertices[6].
Back to top
View user's profile Send private message Visit poster's website
Mr.Fletcher
DeleD PRO user


Joined: 07 Aug 2004
Posts: 1772
Location: Germany

PostPosted: Sun Feb 13, 2005 9:55 am    Post subject: Reply with quote

Basically, you don't use GL_QUADS but GL_POLYGONS, because DeleD doesn't always use Triangles (or Quads) for it's format. You pass the Vertex data then with a loop to OpenGL.
_________________
Behold! The DeleD Wiki! Please help us expanding it Smile
DeleD on IRC
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Community Edition All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum