我试图让我的渲染功能工作.我正在使用顶点数组.这是我的顶点结构.
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)