English 中文(简体)
将脊椎阵列与开放式GL中的案文结合起来
原标题:Combining vertex arrays with textures in OpenGL

我试图利用垂直阵列来提取一个相当庞大的粉碎机,含有大量vert。 案文是从这些案文中确定的,很容易按照以下路线立即提取:

glBegin(GL_TRIANGLES) {
  for ( int faceIdx = 0; faceIdx < nFaces; ++faceIdx )
     glVertex3fv(&vertexArray[vIdx]);
     glTexCoord2fv(&texCoord[vIdx++]);
     glVertex3fv(&vertexArray[vIdx]);
     glTexCoord2fv(&texCoord[vIdx++]);      
     glVertex3fv(&vertexArray[vIdx]);
     glTexCoord2fv(&texCoord[vIdx++]);  
  }   
} 
glEnd();

然而,就可读性、速度和其余部分而言,我想使用垂直阵列(以便移至甚远的地方)。 是否有办法绕过把一枚阴道带入阵列多次?

As I understand it at the moment it s necessary to specify each vertex of the mesh as many times as it appears in a face of the mesh, as each vertex identifies to multiple texture coordinates (the textures are captured from a real-world image of the object the mesh approximates), i.e. my vertex/tex coord array reads as if I d filled it in immediate mode.

是否有任何办法使用垂直阵列,同时具体说明文字坐标,而不使用多余(我指的是重复的)vert?

最佳回答

单一垂直体由构成单一垂直体的所有特性组成。 因此,具有相同立场但具有不同文本坐标的两种vert,在概念上有所不同。 因此,对于不同电信公司来说,没有简单地重复垂直位置。

但是,这种纵向重叠通常在某些稀有区域(例如,由于不同的正常情况,或像在你的情况下一样,斜线)是不可或缺的。 因此,你们面前的每一个角落都确实有不同的牙齿? 也许你可以预先将数据作为比照处理,并找到能够分享<>和职位的相邻的脸。 因此,可以分享vert。 如果许多vert子不然的话,我就会被ris笑,而你最后只剩下一小部分重复的vert子。

问题回答

如果我理解你的问题正确的话,就确实有办法避免把同一片面带上多次。 你们可以使用指数变数,使用指数来说明同样的阴道。 这可以大大加快实现。





相关问题
OpenGL 3D Selection

I am trying to create a 3D robot that should perform certain actions when certain body parts are clicked. I have successfully (sort of) implemented picking in that if you click on any x-plane part, it ...

CVDisplayLink instead of NSTimer

I have started to implement cvDisplayLink to drive the render loop instead of nstimer, as detailed in this technical note https://developer.apple.com/library/archive/qa/qa1385/_index.html Is it ...

Can the iPhone simulator handle PVR textures?

I have a really weird problem with PVR textures on the iPhone simulator- the framerate falls through the floor on the iPhone simulator, but on the iPhone itself it works just fine. Has anyone had any ...

Calculate fps (frames per second) for iphone app

I am using an opengl es iphone application. What is the most accurate way to calculate the frames per second of my application for performance tuning?

Java - Zoom / 3D Data Visualization Libraries

What are the best libraries/frameworks for doing 3D and/or Zoom interfaces in Java? I d like to be able to do some prototyping of creating new types of interfaces for navigating within data and ...

FLTK in Cygwin using Eclipse (Linking errors)

I have this assignment due that requires the usage of FLTK. The code is given to us and it should compile straight off of the bat, but I am having linking errors and do not know which other libraries ...

热门标签