]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_video.c
BuildTriangleNeighbors now detects edges shared by three triangles, fixes weird shado...
[xonotic/darkplaces.git] / cl_video.c
index 58f367f4a60fcc2bb5a0c2403d062c8be5c7e9c1..4778c8189c4b57aed1c80c513ba8d7396185f03e 100644 (file)
@@ -56,10 +56,10 @@ void CL_VideoFrame(void)
        }
        if (cl_videosoundrate && (samples = S_RawSamples_QueueWantsMore()))
        {
-               Con_Printf("%i = S_RawSamples_QueueWantsMore()\n", samples);
+               Con_DPrintf("%i = S_RawSamples_QueueWantsMore()\n", samples);
 
                // calculate how much source data we need to fill the output...
-               s = samples * cl_videosoundrate / shm->speed;
+               s = samples * cl_videosoundrate / S_RawSamples_SampleRate();
 
                // reallocate processing buffer if needed
                if (cl_videosoundresamplelength < samples)
@@ -116,7 +116,7 @@ void CL_DrawVideo(void)
                vertices[ 8] = x2;vertices[ 9] = y2;vertices[10] = 0;vertices[11] = 0;
                vertices[12] = x1;vertices[13] = y2;vertices[14] = 0;vertices[15] = 0;
                mesh.texture = cl_videotexture;
-               mesh.numindices = 6;
+               mesh.numtriangles = 2;
                mesh.numvertices = 4;
                mesh.indices = indices;
                mesh.vertices = vertices;
@@ -159,7 +159,7 @@ void CL_VideoStart(char *filename)
        cl_videosoundresampledata = NULL;
 
        cl_videotexturepool = R_AllocTexturePool();
-       cl_videotexture = R_LoadTexture(cl_videotexturepool, "videotexture", cl_videoimagewidth, cl_videoimageheight, NULL, TEXTYPE_RGBA, TEXF_FRAGMENT);
+       cl_videotexture = R_LoadTexture2D(cl_videotexturepool, "videotexture", cl_videoimagewidth, cl_videoimageheight, NULL, TEXTYPE_RGBA, TEXF_FRAGMENT, NULL);
 }
 
 void CL_VideoStop(void)