Patch OpenGL temporary address error
This commit is contained in:
parent
73dfb0e950
commit
1e03cded49
@ -20,6 +20,7 @@
|
||||
7489D6131CB000520063AC48 /* HID_Utilities.c in Sources */ = {isa = PBXBuildFile; fileRef = 7489D60D1CB000520063AC48 /* HID_Utilities.c */; settings = {ASSET_TAGS = (); }; };
|
||||
7489D61C1CB000F00063AC48 /* ImmrHIDUtilAddOn.c in Sources */ = {isa = PBXBuildFile; fileRef = 7489D61A1CB000F00063AC48 /* ImmrHIDUtilAddOn.c */; settings = {ASSET_TAGS = (); }; };
|
||||
7489D6211CB005370063AC48 /* LZRW3-A.C in Sources */ = {isa = PBXBuildFile; fileRef = 7489D61F1CB005370063AC48 /* LZRW3-A.C */; settings = {ASSET_TAGS = (); }; };
|
||||
7489D6271CB016C30063AC48 /* mVertex.c in Sources */ = {isa = PBXBuildFile; fileRef = 7489D6261CB016C30063AC48 /* mVertex.c */; settings = {ASSET_TAGS = (); }; };
|
||||
7F06105A0876ED46001EA95C /* ai.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7F060FE50876ED46001EA95C /* ai.cpp */; };
|
||||
7F06105D0876ED46001EA95C /* carphysics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7F060FEA0876ED46001EA95C /* carphysics.cpp */; };
|
||||
7F06105E0876ED46001EA95C /* carselection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7F060FEC0876ED46001EA95C /* carselection.cpp */; };
|
||||
@ -126,6 +127,8 @@
|
||||
7489D61E1CB005370063AC48 /* LZRW.H */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = LZRW.H; sourceTree = "<group>"; };
|
||||
7489D61F1CB005370063AC48 /* LZRW3-A.C */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "LZRW3-A.C"; sourceTree = "<group>"; };
|
||||
7489D6201CB005370063AC48 /* port.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = port.h; sourceTree = "<group>"; };
|
||||
7489D6241CB0152C0063AC48 /* mVertex.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mVertex.h; sourceTree = "<group>"; };
|
||||
7489D6261CB016C30063AC48 /* mVertex.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mVertex.c; sourceTree = "<group>"; };
|
||||
7F060FE50876ED46001EA95C /* ai.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ai.cpp; sourceTree = "<group>"; };
|
||||
7F060FEA0876ED46001EA95C /* carphysics.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = carphysics.cpp; sourceTree = "<group>"; };
|
||||
7F060FEB0876ED46001EA95C /* carphysics.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = carphysics.h; sourceTree = "<group>"; };
|
||||
@ -315,6 +318,7 @@
|
||||
children = (
|
||||
7FE52CD00D579B7500F442A1 /* ASW */,
|
||||
7F0613AC08771244001EA95C /* lzrw */,
|
||||
7489D6251CB0160D0063AC48 /* maride */,
|
||||
7F06136E087703B4001EA95C /* HID */,
|
||||
7F060FE20876ED46001EA95C /* source */,
|
||||
20286C2CFDCF999611CA2CEA /* Resources */,
|
||||
@ -366,6 +370,15 @@
|
||||
name = "External Frameworks and Libraries";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
7489D6251CB0160D0063AC48 /* maride */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7489D6241CB0152C0063AC48 /* mVertex.h */,
|
||||
7489D6261CB016C30063AC48 /* mVertex.c */,
|
||||
);
|
||||
name = maride;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
7F060FE20876ED46001EA95C /* source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -616,6 +629,7 @@
|
||||
7F06105E0876ED46001EA95C /* carselection.cpp in Sources */,
|
||||
7F0610640876ED46001EA95C /* collision.cpp in Sources */,
|
||||
7F0610650876ED46001EA95C /* config.cpp in Sources */,
|
||||
7489D6271CB016C30063AC48 /* mVertex.c in Sources */,
|
||||
7F0610660876ED46001EA95C /* controls.cpp in Sources */,
|
||||
7F0610670876ED46001EA95C /* entities.cpp in Sources */,
|
||||
7F0610680876ED46001EA95C /* environment.cpp in Sources */,
|
||||
|
14
mVertex.c
Normal file
14
mVertex.c
Normal file
@ -0,0 +1,14 @@
|
||||
//
|
||||
// mVertex.c
|
||||
// game
|
||||
//
|
||||
// Created by maride on 02.04.16.
|
||||
//
|
||||
//
|
||||
|
||||
#include "mVertex.h"
|
||||
|
||||
void mVertex3fv(tVector3 vertex) {
|
||||
tVector3 v = *vertex;
|
||||
glVertex3f(v.x, v.y, v.z);
|
||||
}
|
17
mVertex.h
Normal file
17
mVertex.h
Normal file
@ -0,0 +1,17 @@
|
||||
//
|
||||
// mVertex.h
|
||||
// game
|
||||
//
|
||||
// Created by maride on 02.04.16.
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef mVertex_h
|
||||
#define mVertex_h
|
||||
|
||||
#include <OpenGL/gl.h>
|
||||
#include "vectors.h"
|
||||
|
||||
void mVertex3fv(tVector3 vertex);
|
||||
|
||||
#endif /* mVertex_h */
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user