Changed vec4_t down to vec3_t, got the server browser integrated with the menu.dat. csqc is having fun, and nexuiz should work better. Enjoy.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1011 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
a366a4d90a
commit
e348dc30a2
44 changed files with 2031 additions and 1159 deletions
|
@ -223,10 +223,10 @@ vec3_t *trNormalsArray;
|
|||
vec2_t *coordsArray;
|
||||
vec2_t *lightmapCoordsArray;
|
||||
|
||||
vec4_t vertexArray[MAX_ARRAY_VERTS*2];
|
||||
vec3_t vertexArray[MAX_ARRAY_VERTS*2];
|
||||
vec3_t normalsArray[MAX_ARRAY_VERTS];
|
||||
|
||||
vec4_t tempVertexArray[MAX_ARRAY_VERTS];
|
||||
vec3_t tempVertexArray[MAX_ARRAY_VERTS];
|
||||
vec3_t tempNormalsArray[MAX_ARRAY_VERTS];
|
||||
index_t tempIndexesArray[MAX_ARRAY_INDEXES];
|
||||
|
||||
|
@ -362,8 +362,8 @@ void R_PushMesh ( mesh_t *mesh, int features )
|
|||
numverts = MAX_ARRAY_VERTS - numVerts;
|
||||
}
|
||||
|
||||
memcpy ( currentVertex, mesh->xyz_array, numverts * sizeof(vec4_t) );
|
||||
currentVertex += numverts * 4;
|
||||
memcpy ( currentVertex, mesh->xyz_array, numverts * sizeof(vec3_t) );
|
||||
currentVertex += numverts * 3;
|
||||
|
||||
if ( mesh->normals_array && (features & MF_NORMALS) ) {
|
||||
memcpy ( currentNormal, mesh->normals_array, numverts * sizeof(vec3_t) );
|
||||
|
@ -402,6 +402,14 @@ void R_PushMesh ( mesh_t *mesh, int features )
|
|||
}
|
||||
|
||||
|
||||
qboolean R_MeshWillExceed(mesh_t *mesh)
|
||||
{
|
||||
if (numVerts + mesh->numvertexes > MAX_ARRAY_VERTS)
|
||||
return true;
|
||||
if (numIndexes + mesh->numindexes > MAX_ARRAY_INDEXES)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
extern index_t r_quad_indexes[6];// = { 0, 1, 2, 0, 2, 3 };
|
||||
|
||||
|
@ -487,7 +495,7 @@ qboolean varrayactive;
|
|||
void R_IBrokeTheArrays(void)
|
||||
{
|
||||
varrayactive = true;
|
||||
qglVertexPointer( 3, GL_FLOAT, 16, vertexArray ); // padded for SIMD
|
||||
qglVertexPointer( 3, GL_FLOAT, 0, vertexArray );
|
||||
qglColorPointer( 4, GL_UNSIGNED_BYTE, 0, colorArray );
|
||||
|
||||
qglEnableClientState( GL_VERTEX_ARRAY );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue