Skip to content

Commit

Permalink
Base of OpenCL code
Browse files Browse the repository at this point in the history
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4346 8ced0084-cf51-0410-be5f-012b33b47a6e
  • Loading branch information
Sonicadvance1 committed Sep 30, 2009
1 parent 076e727 commit fb258e3
Show file tree
Hide file tree
Showing 6 changed files with 358 additions and 16 deletions.
16 changes: 8 additions & 8 deletions Source/Core/VideoCommon/Src/IndexGenerator.cpp
Expand Up @@ -164,8 +164,8 @@ void IndexGenerator2::Start(unsigned short *Triangleptr,unsigned short *Lineptr,
TindexLen = 0;
LindexLen = 0;
PindexLen = 0;
LastTPrimitive = None;
LastLPrimitive = None;
LastTPrimitive = Prim_None;
LastLPrimitive = Prim_None;
}
// Triangles
void IndexGenerator2::AddList(int numVerts)
Expand All @@ -182,7 +182,7 @@ void IndexGenerator2::AddList(int numVerts)
index += numVerts;
numT += numTris;
Tadds++;
LastTPrimitive = List;
LastTPrimitive = Prim_List;
}

void IndexGenerator2::AddStrip(int numVerts)
Expand All @@ -201,7 +201,7 @@ void IndexGenerator2::AddStrip(int numVerts)
index += numVerts;
numT += numTris;
Tadds++;
LastTPrimitive = Strip;
LastTPrimitive = Prim_Strip;
}
void IndexGenerator2::AddFan(int numVerts)
{
Expand All @@ -217,7 +217,7 @@ void IndexGenerator2::AddFan(int numVerts)
index += numVerts;
numT += numTris;
Tadds++;
LastTPrimitive = Fan;
LastTPrimitive = Prim_Fan;
}

void IndexGenerator2::AddQuads(int numVerts)
Expand All @@ -237,7 +237,7 @@ void IndexGenerator2::AddQuads(int numVerts)
index += numVerts;
numT += numTris;
Tadds++;
LastTPrimitive = List;
LastTPrimitive = Prim_List;
}


Expand All @@ -255,7 +255,7 @@ void IndexGenerator2::AddLineList(int numVerts)
index += numVerts;
numL += numLines;
Ladds++;
LastLPrimitive = List;
LastLPrimitive = Prim_List;
}

void IndexGenerator2::AddLineStrip(int numVerts)
Expand All @@ -271,7 +271,7 @@ void IndexGenerator2::AddLineStrip(int numVerts)
index += numVerts;
numL += numLines;
Ladds++;
LastLPrimitive = Strip;
LastLPrimitive = Prim_Strip;
}


Expand Down
14 changes: 7 additions & 7 deletions Source/Core/VideoCommon/Src/IndexGenerator.h
Expand Up @@ -72,14 +72,14 @@ class IndexGenerator2
int GetTriangleindexLen() {return TindexLen;}
int GetLineindexLen() {return LindexLen;}
int GetPointindexLen() {return PindexLen;}
public:

enum IndexPrimitiveType
{
None,
List,
Strip,
Fan
};
Prim_None = 0,
Prim_List,
Prim_Strip,
Prim_Fan
} ;
private:
unsigned short *Tptr;
unsigned short *Lptr;
Expand All @@ -99,4 +99,4 @@ class IndexGenerator2

};

#endif // _INDEXGENERATOR_H
#endif // _INDEXGENERATOR_H

0 comments on commit fb258e3

Please sign in to comment.