Patch OpenGL temporary address error
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
#include "stencil.h"
|
||||
#include "network.h"
|
||||
|
||||
#include "mVertex.h"
|
||||
|
||||
//#define __USEDISPLAYLISTS
|
||||
#ifndef __TARGET_TOOLAPP
|
||||
#define __USEVERTEXARRAYS
|
||||
@@ -737,10 +739,10 @@ void ModelShadowPassZFail(tFileRef modelRef,tVector3 shadowVector,char *faceSide
|
||||
if(faces[i].vertices[n].neighbor<=-1)
|
||||
{
|
||||
glBegin(GL_TRIANGLE_STRIP);
|
||||
glVertex3fv(&(vertices[faces[i].vertices[n].vertex]*gStencilZoom-sw).x);
|
||||
glVertex3fv(&(vertices[faces[i].vertices[(n+1)%3].vertex]*gStencilZoom-sw).x);
|
||||
glVertex3fv(&(vertices[faces[i].vertices[n].vertex]*gStencilZoom-shadowVector).x);
|
||||
glVertex3fv(&(vertices[faces[i].vertices[(n+1)%3].vertex]*gStencilZoom-shadowVector).x);
|
||||
mVertex3fv((vertices[faces[i].vertices[n].vertex]*gStencilZoom-sw));
|
||||
mVertex3fv((vertices[faces[i].vertices[(n+1)%3].vertex]*gStencilZoom-sw));
|
||||
mVertex3fv((vertices[faces[i].vertices[n].vertex]*gStencilZoom-shadowVector));
|
||||
mVertex3fv((vertices[faces[i].vertices[(n+1)%3].vertex]*gStencilZoom-shadowVector));
|
||||
glEnd();
|
||||
#ifdef __POLYCOUNT
|
||||
gPolyCount+=2;
|
||||
@@ -751,20 +753,20 @@ void ModelShadowPassZFail(tFileRef modelRef,tVector3 shadowVector,char *faceSide
|
||||
{
|
||||
glBegin(GL_TRIANGLES);
|
||||
for(int j=2;j>=0;j--)
|
||||
glVertex3fv(&(vertices[faces[i].vertices[j].vertex]*gStencilZoom-sw).x);
|
||||
mVertex3fv((vertices[faces[i].vertices[j].vertex]*gStencilZoom-sw));
|
||||
|
||||
for(int j=0;j<=2;j++)
|
||||
glVertex3fv(&(vertices[faces[i].vertices[j].vertex]*gStencilZoom-shadowVector).x);
|
||||
mVertex3fv((vertices[faces[i].vertices[j].vertex]*gStencilZoom-shadowVector));
|
||||
glEnd();
|
||||
}
|
||||
else
|
||||
{
|
||||
glBegin(GL_TRIANGLES);
|
||||
for(int j=2;j>=0;j--)
|
||||
glVertex3fv(&(vertices[faces[i].vertices[j].vertex]*gStencilZoom-shadowVector).x);
|
||||
mVertex3fv((vertices[faces[i].vertices[j].vertex]*gStencilZoom-shadowVector));
|
||||
|
||||
for(int j=0;j<=2;j++)
|
||||
glVertex3fv(&(vertices[faces[i].vertices[j].vertex]*gStencilZoom-sw).x);
|
||||
mVertex3fv((vertices[faces[i].vertices[j].vertex]*gStencilZoom-sw));
|
||||
glEnd();
|
||||
}
|
||||
}
|
||||
@@ -777,10 +779,10 @@ void ModelShadowPassZFail(tFileRef modelRef,tVector3 shadowVector,char *faceSide
|
||||
if(faceSide[faces[i].vertices[n].neighbor]!=faceSide[i])
|
||||
{
|
||||
glBegin(GL_TRIANGLE_STRIP);
|
||||
glVertex3fv(&(vertices[faces[i].vertices[n].vertex]*(kShadowZoom*gStencilZoom)).x);
|
||||
glVertex3fv(&(vertices[faces[i].vertices[(n+1)%3].vertex]*(kShadowZoom*gStencilZoom)).x);
|
||||
glVertex3fv(&(vertices[faces[i].vertices[n].vertex]*(kShadowZoom*gStencilZoom)-shadowVector).x);
|
||||
glVertex3fv(&(vertices[faces[i].vertices[(n+1)%3].vertex]*(kShadowZoom*gStencilZoom)-shadowVector).x);
|
||||
mVertex3fv((vertices[faces[i].vertices[n].vertex]*(kShadowZoom*gStencilZoom)));
|
||||
mVertex3fv((vertices[faces[i].vertices[(n+1)%3].vertex]*(kShadowZoom*gStencilZoom)));
|
||||
mVertex3fv((vertices[faces[i].vertices[n].vertex]*(kShadowZoom*gStencilZoom)-shadowVector));
|
||||
mVertex3fv((vertices[faces[i].vertices[(n+1)%3].vertex]*(kShadowZoom*gStencilZoom)-shadowVector));
|
||||
glEnd();
|
||||
#ifdef __POLYCOUNT
|
||||
gPolyCount+=2;
|
||||
@@ -790,14 +792,14 @@ void ModelShadowPassZFail(tFileRef modelRef,tVector3 shadowVector,char *faceSide
|
||||
|
||||
glBegin(GL_TRIANGLES);
|
||||
for(int j=2;j>=0;j--)
|
||||
glVertex3fv(&(vertices[faces[i].vertices[j].vertex]*(kShadowZoom*gStencilZoom)).x);
|
||||
mVertex3fv((vertices[faces[i].vertices[j].vertex]*(kShadowZoom*gStencilZoom)));
|
||||
glEnd();
|
||||
}
|
||||
else
|
||||
{
|
||||
glBegin(GL_TRIANGLES);
|
||||
for(int j=2;j>=0;j--)
|
||||
glVertex3fv(&(vertices[faces[i].vertices[j].vertex]*(kShadowZoom*gStencilZoom)-shadowVector).x);
|
||||
mVertex3fv((vertices[faces[i].vertices[j].vertex]*(kShadowZoom*gStencilZoom)-shadowVector));
|
||||
glEnd();
|
||||
}
|
||||
#ifdef __POLYCOUNT
|
||||
@@ -827,10 +829,10 @@ void ModelShadowPassZPass(tFileRef modelRef,tVector3 shadowVector,char *faceSide
|
||||
if(faces[i].vertices[n].neighbor==-1)
|
||||
{
|
||||
glBegin(GL_TRIANGLE_STRIP);
|
||||
glVertex3fv(&(vertices[faces[i].vertices[n].vertex]*gStencilZoom-sw).x);
|
||||
glVertex3fv(&(vertices[faces[i].vertices[(n+1)%3].vertex]*gStencilZoom-sw).x);
|
||||
glVertex3fv(&(vertices[faces[i].vertices[n].vertex]*gStencilZoom-shadowVector).x);
|
||||
glVertex3fv(&(vertices[faces[i].vertices[(n+1)%3].vertex]*gStencilZoom-shadowVector).x);
|
||||
mVertex3fv((vertices[faces[i].vertices[n].vertex]*gStencilZoom-sw));
|
||||
mVertex3fv((vertices[faces[i].vertices[(n+1)%3].vertex]*gStencilZoom-sw));
|
||||
mVertex3fv((vertices[faces[i].vertices[n].vertex]*gStencilZoom-shadowVector));
|
||||
mVertex3fv((vertices[faces[i].vertices[(n+1)%3].vertex]*gStencilZoom-shadowVector));
|
||||
glEnd();
|
||||
#ifdef __POLYCOUNT
|
||||
gPolyCount+=2;
|
||||
@@ -846,10 +848,10 @@ void ModelShadowPassZPass(tFileRef modelRef,tVector3 shadowVector,char *faceSide
|
||||
if(faceSide[faces[i].vertices[n].neighbor]!=faceSide[i])
|
||||
{
|
||||
glBegin(GL_TRIANGLE_STRIP);
|
||||
glVertex3fv(&(vertices[faces[i].vertices[n].vertex]*(kShadowZoom*gStencilZoom)).x);
|
||||
glVertex3fv(&(vertices[faces[i].vertices[(n+1)%3].vertex]*(kShadowZoom*gStencilZoom)).x);
|
||||
glVertex3fv(&(vertices[faces[i].vertices[n].vertex]*(kShadowZoom*gStencilZoom)-shadowVector).x);
|
||||
glVertex3fv(&(vertices[faces[i].vertices[(n+1)%3].vertex]*(kShadowZoom*gStencilZoom)-shadowVector).x);
|
||||
mVertex3fv((vertices[faces[i].vertices[n].vertex]*(kShadowZoom*gStencilZoom)));
|
||||
mVertex3fv((vertices[faces[i].vertices[(n+1)%3].vertex]*(kShadowZoom*gStencilZoom)));
|
||||
mVertex3fv((vertices[faces[i].vertices[n].vertex]*(kShadowZoom*gStencilZoom)-shadowVector));
|
||||
mVertex3fv((vertices[faces[i].vertices[(n+1)%3].vertex]*(kShadowZoom*gStencilZoom)-shadowVector));
|
||||
glEnd();
|
||||
#ifdef __POLYCOUNT
|
||||
gPolyCount+=2;
|
||||
|
||||
Reference in New Issue
Block a user