Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 10679 Details for
Bug 19059
No window shows up when runing my 3d engine
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
patch to nff_load.cc to fix engine
my.diff (text/plain), 1.44 KB, created by
Michael Fitzpatrick
on 2003-04-15 09:29:51 UTC
(
hide
)
Description:
patch to nff_load.cc to fix engine
Filename:
MIME Type:
Creator:
Michael Fitzpatrick
Created:
2003-04-15 09:29:51 UTC
Size:
1.44 KB
patch
obsolete
>diff -u a1/nff_load.cc a2/nff_load.cc >--- a1/nff_load.cc 2001-11-11 18:51:51.000000000 +0000 >+++ a2/nff_load.cc 2003-04-14 22:53:19.000000000 +0100 >@@ -83,26 +83,28 @@ > > //ok get rest of line to parse optional normal direction. > char buf[100]; >- infile.get(buf,100,'\n'); >- char* ptr=buf; >- >- while (isspace(*ptr)) >- ptr++; >- >- if (!strncmp(ptr,"norm",4)) { //normal values >- float a,b,c; >- ptr+=4; >- sscanf(ptr,"%f %f %f",&a,&b,&c); >- vertex_list[no_vertices].model_normal=vector3h(a,b,c,0); //point at infinity >- } else { >- vertex_list[no_vertices].model_normal=vector3h(0,0,0,0); //no normal specified >- } >+ if (infile.peek() != '\n') { >+ infile.get(buf,100,'\n'); >+ char* ptr=buf; >+ >+ while (isspace(*ptr)) >+ ptr++; >+ >+ if (!strncmp(ptr,"norm",4)) { //normal values >+ float a,b,c; >+ ptr+=4; >+ sscanf(ptr,"%f %f %f",&a,&b,&c); >+ vertex_list[no_vertices].model_normal=vector3h(a,b,c,0); //point at infinity >+ } else { >+ vertex_list[no_vertices].model_normal=vector3h(0,0,0,0); //no normal specified >+ } >+ } > > no_vertices++; > } > infile.ignore(INT_MAX,'\n'); //skip to endl > } >- >+printf("lines:%d\n",lin); > ///////////////////////////////////////////////////////////////////////////// > > //get no of surfaces
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 19059
: 10679