Jump to content

  • Log In with Google      Sign In   
  • Create Account

OpenGL or D3D?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Goodlife   Members   -  Reputation: 122

Like
Likes
Like

Posted 22 January 2000 - 03:38 AM

All right, dudes, I''ve posted a question here a couple times, and nobody in the D3D camp seems to know the answer. I turn to the OpenGL''ers... In my program, I want to have vertices that have the same xyz coordinate, but different uv coordinates (for textures). In Direct3D, every vertex gets one texture coordinate, so if I have two vertices on top of eachother, but with different tex coords, they have to get transformed twice. Have you ever heard of anything slower? So, my question is, does OpenGL allow you to either attach multiple texture coords to a vertex, or, better yet (this is what I did in my software engine) assign the texture coords when you place the triangle? I might switch over to OpenGL if I have to. Probably should have started there in the first place, since D3D took me six weeks to get proficient in. Thanks in advance! --Goodlife

Sponsor:

#2 merlin9x9   Members   -  Reputation: 174

Like
Likes
Like

Posted 22 January 2000 - 04:19 AM

Yes, OpenGL can do that, if I''m not mistaken. In fact, OpenGL can do 99.9% of what Direct3D can, except for a few little obscure things.

Yes, you should have started with OpenGL. =) You should switch anyway. =)

#3 Nate   Members   -  Reputation: 122

Like
Likes
Like

Posted 22 January 2000 - 05:56 AM

The answer to your question depends on how you are drawing your triangles. If you are using vertex arrays you can''t have multiple verts with the same texture coordinate. I have tried to find a way around this but it turned out that it was easier to just duplicate the vertex and assign it the second texture coordinate. If you are drawing using normal glBegin/glEnd then you can have a vert with multiple texture coords since you can specify the texture coordinate as you draw. Using glBegin/glEnd is not the fastest approach to things though. the best way to go. Hope this helps.




Nate
http://nate.scuzzy.net

#4 trixter   Members   -  Reputation: 122

Like
Likes
Like

Posted 22 January 2000 - 08:06 AM

in D3D, you can make your own vertex format and have multiple texture coordinates per vertex.

#5 Facehat   Members   -  Reputation: 696

Like
Likes
Like

Posted 22 January 2000 - 12:07 PM

Yeah, for D3D you should look up Flexible Vertex Format in the SDK Help. It describes all you need to know about it. You definately want to define your own vertex format since D3D''s won''t fit most peoples needs.

--TheGoop




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS