|
thanks, i solved the problem of th table
but i have another question pls
i implement this function to render the face normal of the mesh but when i debug
i found that the program doesn't enter the loop at all and i get this in the watch of the debug when
i type i: i CXX0017: Error: symbol "i" not found
inline void CMesh::RenderFaceNormals()
{
float t=0.5;
CVector v0,v1;
for(int i=0 ; i<get_numoffaces();i++)
{
="" v0="(verts[faces[i]-">get_v0()]->get_gp()+ verts[faces[i]->get_v1()]->get_gp()+ verts[faces[i]->get_v2()]->get_gp() )/3;
v1 = t * faces[i]->get_normal();
glBegin(GL_LINES);
glVertex3f(v0.X(), v0.Y(), v0.Z()); // origin of the line
glVertex3f(v1.X(), v1.Y(), v1.Z()); // ending point of the line
glEnd();
}
}
it seems that my program doesn't see i??
can anyone help me??
|
|
|
|
|
As written above, I'm not sure how this compiled. Your for loop is malformed by missing the closing parenthesis at the very least and the second semicolon.
"Republicans are the party that says government doesn't work and then they get elected and prove it." -- P.J. O'Rourke I'm a proud denizen of the Real Soapbox[ ^] ACCEPT NO SUBSTITUTES!!!
|
|
|
|
|
No i'm sure there is no syntax errors, the error in the loop header only appear when i copy
from my program
anyone have solutions for my problem????
inline void CMesh::RenderFaceNormals()<br />
{<br />
float t=0.5;<br />
CVector v0,v1;<br />
<br />
for(int i=0 ; i< get_numOfFaces() ;i++)<br />
{<br />
v0 = (verts[faces[i]->get_v0()]->get_gp()+ verts[faces[i]->get_v1()]->get_gp()+ verts[faces[i]->get_v2()]->get_gp() )/3;<br />
v1 = t * faces[i]->get_normal();<br />
<br />
glBegin(GL_LINES);<br />
glVertex3f(v0.X(), v0.Y(), v0.Z());
glVertex3f(v1.X(), v1.Y(), v1.Z());
glEnd();<br />
}<br />
}
|
|
|
|
|
What compiler and version are you using?
"Republicans are the party that says government doesn't work and then they get elected and prove it." -- P.J. O'Rourke I'm a proud denizen of the Real Soapbox[ ^] ACCEPT NO SUBSTITUTES!!!
|
|
|
|
|
Microsoft Visual Studio 2005
|
|
|
|
|
Then it should be ok with defining the loop variable inside the for header. But to determine if something else is causing a side effect, try this:
int i;
for (i = 0 ; whatever your condition was ; i++)
{
your stuff
}
"Republicans are the party that says government doesn't work and then they get elected and prove it." -- P.J. O'Rourke I'm a proud denizen of the Real Soapbox[ ^] ACCEPT NO SUBSTITUTES!!!
|
|
|
|
|
Thanks Tim very much for ur help
i solve the problem, the problem was that my project was in release mode so i changed it now to debuge mode and it works well
i really appreciate your help
|
|
|
|
|
I'm not sure how switching to debug compile from release "fixes" the problem. Usually then that happens, you have a problem with unitialized memory that debug mode automatically sets to zero or you're using something like an assert macro that is compiled out in release mode and leaves a hole in your code but lets debug mode work.
"Republicans are the party that says government doesn't work and then they get elected and prove it." -- P.J. O'Rourke I'm a proud denizen of the Real Soapbox[ ^] ACCEPT NO SUBSTITUTES!!!
|
|
|
|
|
Hi,
if the release build also works well, then you can claim you solved the problem.
if not, you just closed your eyes. switching to debug mode does not solve anything that turning off the computer would not solve.
if you need some advice on fixing release problems, read Debugging Release Mode Problems[^] and this[^].
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hi...
This is graphics related.I need to draw a map .I have the latitude longitude values of it .I was able to map(w-to v) these to screen coordinates and then draw the map.The problem i need help with is how do i do the reverse,because i need to show the latitude longitude values as the mouse moves over the map.For the initial case its simple,just rearrangement of window to view port mapping formula .i.e.,
u = (x-xmin)* sx+ umin
v = (y-ymin)* sy + vmin
But once the zoom and pan operations are applied on the map, I don't know how to get the latitude longitude values from the screen coordinate.
If some one knows how to solve this ,Please help me
Thanks in advance
|
|
|
|
|
Hi,
I want to develop a window like GUI for my appplication(which is running on OpenSUSE).
Are there any tools or libraries that I can use ?
But the condition is that I can't use GPL/LGPL licensed tools/libraries.
Anybody, please reply asap.
Regards,
Manik
|
|
|
|
|
If you can't use any GPL stuff, you can't use Linux, or GNU, or X-Windows.
How about you write your own OS, compiler, Windowing system etc?
|
|
|
|
|
If I bought the license for OpenSuse, doesnt that include X Windows and stuff ?
|
|
|
|
|
I doubt you bought a license for OpenSuse. You MAY have bought a DVD, but that's not a license. Anyone can download and use it legally for free.
Anyway, all Linux distributions are built using the GNU toolchain (gcc etc) which are GPL (or similar).
Who decided you couldn't use GPL code? Do they know what GPL software means?
|
|
|
|
|
Does anyone know a way to disable the ClearType font rendering via a system function?
We render a lot of text (monochrome) into memory bitmaps and dibs and it takes forever. If we disable ClearType via the control panel the process is very, very fast but the users screen looks like crap.
Our apps execute on both XP and Vista.
The user wouldn’t even mind if the screen looked bad during the process and reverted back to cleartype after the process. Any ideas?
Thanks in advance
Tony Teveris
Gerber Scientific Products
Senior Software Engineer
Phone: 860 648 8151
Fax: 860 648 8214
83 Gerber Road West
South Windsor, CT 06074
|
|
|
|
|
See if anything here[^] helps.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I faced with problem of rendering OpenGL objects with 2 or 3 lights on printing preview and printing. It different as by drowing on screen using hardware acceleration. It uses lighting from tow lides for both red and green color, but on printing it looks like light working only from one side.
Here two screen shots
http://good-times.webshots.com/photo...05122917TouQIV
http://good-times.webshots.com/photo...05122917ZgVytp
Can't someone help with the problem?
|
|
|
|
|
Hi all.
I want to create graphical user interface in my Direct3D application using Lua, but I cannot find good examples. If somebody knows how to do it, please show or give me simple example.
Thanks for attention.
|
|
|
|
|
I am not quite sure, but what about that one:
http://lua-users.org/wiki/SampleCode
Friend google showed me.
Cheers
You have the thought that modern physics just relay on assumptions, that somehow depends on a smile of a cat, which isn’t there.( Albert Einstein)
|
|
|
|
|
Thanks a lot, but it's not complete information.
|
|
|
|
|
I am using glDrawArrays function and sets befor glLightModel(GL_LIGHT_MODEL_TWO_SIDE,GL_TRUE). Polygons are drawn with one side lighting. If I change glDrawArrays drawing to usage of glBegin( GL_TRIANGLES ) glEnd() glVertex() then the polygons are drawn with two side lighting. Someone could help me with the problem?
|
|
|
|
|
I found hint to solve the problem - to add aditionals lights with opossite directions.
|
|
|
|
|
But anyway would like to have correct solution of this problem.
|
|
|
|
|
Will I have improvements in drawing with OpenGL, if I would sort objects by their colors (materials) and call functions glColor, glMaterial when the color is changed? How fast glColor, glMaterial functions, what is inside of them?
|
|
|
|
|
Since these days most of OpenGL is accelerated in hardware on your graphics card, it could vary by the card you have installed. It would probably make your code more readable and maintainable if you grouped like properties but I doubt the overhead for a call to glColor is very high.
"Republicans are the party that says government doesn't work and then they get elected and prove it." -- P.J. O'Rourke I'm a proud denizen of the Real Soapbox[ ^] ACCEPT NO SUBSTITUTES!!!
|
|
|
|