Bug #310

Renderer: Fix r_primitive 1

Added by Radegast almost 6 years ago. Updated almost 6 years ago.

Status:Fixed% Done:

100%

Priority:ImmediateSpent time:-
Assignee:Jacker
Category:Client
Target version:2.71rc2
OS: Arch:

Description

This crash was introduced with the new renderer.

http://pastebin.com/CPmWCQgm

Associated revisions

Revision af6fac77
Added by IR4T4 almost 6 years ago

renderer: r_primitives 1 starts again refs #310

History

#1 Updated by Radegast almost 6 years ago

Game crashes on this line:

element(indexes[0]);

at R_DrawStripElements in source:src/renderer/tr_shade.c

R_DrawStripElements(int numIndexes, const glIndex_t *indexes, void (GLAPIENTRY *element)(GLint))

I have absolutely no idea what this code does. Commenting out every element(x) lines makes the game start, but nothing is rendered.

#2 Updated by IR4T4 almost 6 years ago

I think it’s cause by this line:

R_DrawStripElements(numIndexes, indexes, 0); //R_DrawStripElements(numIndexes, indexes, qglArrayElement); FIX THIS

What’s your r_primitives value?

#3 Updated by Radegast almost 6 years ago

  • Assignee set to Jacker
  • % Done changed from 0 to 10

That was it. Manually setting r_primitives to 2 or 3 avoids the crash.

#4 Updated by IR4T4 almost 6 years ago

  • Subject changed from Client crashes upon start up on Mac OS X to Renderer: Fix r_primitive 1
  • Category changed from 20 to 3

Yeah that’s it. I was just writing the explaination as you figured it out as well. The glArrayElement/qglArrayElement code is lost ....

#5 Updated by IR4T4 almost 6 years ago

  • Category changed from 3 to Client

#6 Updated by IR4T4 almost 6 years ago

  • Status changed from New to Fixed
  • % Done changed from 10 to 100

Also available in: Atom PDF