Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Final_version_rasterizer! #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added PROJ3_WIN/565Rasterizer.sdf
Binary file not shown.
2 changes: 2 additions & 0 deletions PROJ3_WIN/565Rasterizer/565Rasterizer.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
<CudaCompile>
<CompileOut>$(ProjectDir)$(Platform)/$(Configuration)/%(Filename)%(Extension).obj</CompileOut>
<Include>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\include;C:/ProgramData/NVIDIA Corporation/NVIDIA GPU Computing SDK 4.0/C/common/inc;../shared/glew/includes;../shared/freeglut/includes</Include>
<CodeGeneration>compute_20,sm_20</CodeGeneration>
</CudaCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
Expand All @@ -111,6 +112,7 @@
<CudaCompile>
<CompileOut>$(ProjectDir)$(Platform)/$(Configuration)/%(Filename)%(Extension).obj</CompileOut>
<Include>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\include;C:/ProgramData/NVIDIA Corporation/NVIDIA GPU Computing SDK 4.0/C/common/inc;../shared/glew/includes;../shared/freeglut/includes</Include>
<CodeGeneration>compute_20,sm_20</CodeGeneration>
</CudaCompile>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
Expand Down
5 changes: 5 additions & 0 deletions PROJ3_WIN/565Rasterizer/565Rasterizer.vcxproj.gundeep.nvuser
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<ProjectSettingsModel DefinitionId="a218e900-1199-4ab1-a767-7976786f04d4" DisplayName="Nexus Project User Settings" xmlns="clr-namespace:Ark.PropertyModel;assembly=Ark">
<SettingsPointModel DefinitionId="3eb7ba04-016d-475e-b0ff-daa5f0e59a08" DisplayName="Launch">
<Property Name="Arguments" Value="mesh=&quot;../../objs/cow.obj&quot;" />
</SettingsPointModel>
</ProjectSettingsModel>
Binary file added PROJ3_WIN/Readme Rasterizer.pdf
Binary file not shown.
34 changes: 34 additions & 0 deletions objs/cube.obj
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# cube.obj
#

g cube

v 0.0 0.0 0.0
v 0.0 0.0 1.0
v 0.0 1.0 0.0
v 0.0 1.0 1.0
v 1.0 0.0 0.0
v 1.0 0.0 1.0
v 1.0 1.0 0.0
v 1.0 1.0 1.0

vn 0.0 0.0 1.0
vn 0.0 0.0 -1.0
vn 0.0 1.0 0.0
vn 0.0 -1.0 0.0
vn 1.0 0.0 0.0
vn -1.0 0.0 0.0

f 1//2 7//2 5//2
f 1//2 3//2 7//2
f 1//6 4//6 3//6
f 1//6 2//6 4//6
f 3//3 8//3 7//3
f 3//3 4//3 8//3
f 5//5 7//5 8//5
f 5//5 8//5 6//5
f 1//4 5//4 6//4
f 1//4 6//4 2//4
f 2//1 6//1 8//1
f 2//1 8//1 4//1

23 changes: 23 additions & 0 deletions objs/tri.obj
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# cube.obj
#

g cube

v 0.0 0.0 0.0
v 0.0 0.0 1.0
v 0.0 1.0 0.0
v 0.0 1.0 1.0
v 1.0 0.0 0.0
v 1.0 0.0 1.0
v 1.0 1.0 0.0
v 1.0 1.0 1.0

vn 0.0 0.0 1.0
vn 0.0 0.0 -1.0
vn 0.0 1.0 0.0
vn 0.0 -1.0 0.0
vn 1.0 0.0 0.0
vn -1.0 0.0 0.0

f 2//1 8//1 4//1

6 changes: 3 additions & 3 deletions src/ObjCore/obj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

using namespace std;

obj::obj(){
obj::obj(){ // constructor
vbosize = 0;
nbosize = 0;
cbosize = 0;
Expand All @@ -22,7 +22,7 @@ obj::obj(){

}

obj::~obj(){
obj::~obj(){ //destructor
/*delete vbo;
delete nbo;
delete cbo;
Expand All @@ -37,7 +37,7 @@ obj::~obj(){

void obj::buildVBOs(){
recenter();
vector<float> VBOvec;
vector<float> VBOvec; // vertex buffer object
vector<float> NBOvec;
vector<int> IBOvec;
int index = 0;
Expand Down
Loading