小编Mon*_*tis的帖子

在顶点数组中纹理每个多边形 - OpenGL

我试图让我的渲染功能工作.我正在使用顶点数组.这是我的顶点结构.

struct Vertex 
{
    float x, y, z;              // The x, y and z floating point values     
    float u, v;                 // The u - v texture coordinates
    float padding[3];   // needs to be multiple of 32
};
Run Code Online (Sandbox Code Playgroud)

这是我的渲染代码:

// Render the mesh
void WLD::render(GLuint* textures, long curRegion, CFrustum cfrustum)
{

    int num = 0;

    // Set up my indices
    GLuint indicies[3];

    // Cycle through the PVS
    while(num < regions[curRegion].visibility.size())
    {
        int i = regions[curRegion].visibility[num];

        if(!regions[i].dead && regions[i].meshptr != NULL)
        { …
Run Code Online (Sandbox Code Playgroud)

c++ opengl vertex-array

5
推荐指数
1
解决办法
1484
查看次数

标签 统计

c++ ×1

opengl ×1

vertex-array ×1