|
The Undefeated wrote: So, what can i do about it?
several things. First light is not light as you see it in the real world. Virtual lighting is a calculation of a direction vector of the light. Without other algorithms, it doesn't even have shadows and you can illuminate anything facing the light, even if it is behind something else obscuring the light.
Without adjusting anything else the entire face of your triangle has one directional surface, the normal vector. That vector determines how light reacts to the surface. Since a single vector exists for the entire surface, the entre surface will calculate the same lighting value. You can specify your own surface normals, in which you want one normal for each vertex rather than one for each triangle. So a triangle now has three surface normals of slightly different variation. The result is smoother light.
If you want more accurate light, you are looking for real-time global illumination, or radiosity on a GPU.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
I already have a wonderfully illuminated rotating green cube, lit by a white spotlight, within a white/grey room. And am already aware of various techniques for creating shadows, and the need for normal vectors to ensure that the light acts they way you expect it. I wanted to know if i could blend the colour of the light, and the surface material.
Though i do appreciate the reply, and was unaware that i could supply a normal for each vertex to aid with smoother lighting.
My current favourite word is: Waffle
Cheese is still good though.
|
|
|
|
|
The Undefeated wrote: I wanted to know if i could blend the colour of the light, and the surface material.
This is done by the material properties. Have you varied the diffuse properties to react to light directly? how high is the specular?
I wasn't sure how advanced you were from your original message.
Have you been through most of these?
http://jerome.jouvie.free.fr/OpenGl/Lessons/Lesson6.php[^]
http://www.falloutsoftware.com/tutorials/gl/gl8.htm[^]
you can also make a very small shading program to control the lighting to only what you want, and exactly how you want, so you can blend the light/material exactly how you think it should be.
http://www.lighthouse3d.com/opengl/glsl/index.php?ogldir1[^]
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
Hi Im working on ListCtrl(ATL Controls) in which i need to add images(Icons) to subitem other than 0th index.I was trying from couple of dayz.Plz help me if u have any idea..
thanks & Regards,
srihari.
|
|
|
|
|
Take a look to http://www.codeproject.com/listctrl/[^]
there are interesting things, specially one from Hans Dietrich "XListCtrl" can help you.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
|
Hi,
Dialog box properties are set as below
STYLE DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE |
WS_CAPTION | WS_SYSMENU
Problem is with minimize button, Dialog box gets minimized task bar when i press on minimize button but when i press left click of the mouse the application is not restoring back and also when i use alt+tab am not able to restore back the application.Only i can restore by pressing right click of the mouse on the application and select "restore" option.
Thanks in advance
|
|
|
|
|
Does this happen with a brand new project (i.e., one that you've added no code to), also?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
No, i tried with new project it works fine with those setting.
|
|
|
|
|
Hi,
when i tried with single dialog box it is working but when i include another it is not working. This is how i did
1)Create an SDI application (as our project is done using SDI application)
2)2 new dialog boxes
3)On execution first dialog box opens with OK and CANCEL button (minimize is working fine).On pressing OK button second dialog box opens whose mimimize is not working.
4)Code changes which i have made is as below
1)
BOOL CTest_minimizebutApp::InitInstance()
{
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CTest_minimizebutDoc),
RUNTIME_CLASS(CMainFrame), // main SDI frame window
RUNTIME_CLASS(CTest_minimizebutView));
dlg.DoModal();
// AddDocTemplate(pDocTemplate);
// Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
}
2)
void CmainDialog::OnOK()
{
// TODO: Add extra validation here
dlg1.DoModal();
CDialog::OnOK();
}
|
|
|
|
|
Hi all,
Just wondering... In MS Visual C# we have the ability to get a list of all the available methods, properties etc in a class as we are coding.
For example, if I typed "Form1." I would get a list of the object methods etc.
Visual C++ seems to be able to do this to a point:
ie. System::Windows::Forms
But it wont let me go any further than this.
I am wondering if there is a plugin that anyone could recommend that extends the default VS2005 C++ help feature.
Thanks,
Mark.
|
|
|
|
|
it wont because there isn't anything more to be displayed.
only public classes/namespaces are displayed using the :: operator.
the . operator displays internals only if applyed on an object.
if you have a pointer, use the -> operator.
show a piece of the code you have if you want us to help more...
|
|
|
|
|
Hi,
I am using Visual Studio .NET 2003 for writing VC++ code. My application was based around a treeview but I wanted to give users the ability to rearrange the node/folder structure of the treeview using drag and drop. for example, Should work roughly like "Organize favorites" in Internet explorer.
|
|
|
|
|
Has anyone come accross this issue on Vista?
I have a program that uses:
hr = IXMLHTTPRequest->send( ... );
which FAILS only on Vista.
Any idea why? Works fine on XP with which we develop.
|
|
|
|
|
|
I don't know as the Vista PC is not a development PC. I will have to investigate that when I can. Just wondered if someone had already crossed this bridge. It's probably due to Vista's tighter security policy (not UAC), and probably have to use a different class instead of IXMLHTTPRequest.
So if anyone knows the answer I would be interested to here from you.
|
|
|
|
|
You could output the value of the hr using OutputDebugString() and then use DebugView from sys internals to see the value on the vista machine.
|
|
|
|
|
Hi All,
I am using CStringArray object to store the strings in array. I used this object in one class where i add strings in to CStringArray object. I want to access this object in other class. But when i access it in other class it gives me garbage values. So how can i access it in another class.
Atul
|
|
|
|
|
There should be no problem doing this. It sounds like your CStringArray may have been delete before the second access.
Is it a member variable of an object that's gone out of scope or did you create it on the stack?
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Do you want to access CStringArray on the other dialogs?
|
|
|
|
|
Atul23 wrote: But when i access it in other class...
How?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
could you pls explain the prblm.
Ajay
|
|
|
|
|
I have a program that have a lot of dialogs and so a lot of butons.
I wanna use my own button in all the dialogs, but I don't want to add a variable for each button on dialogs.
I wnat to do it in just one piece of code, something like this : (in InitDialog())
CWnd* pWnd = GetWindow(GW_CHILD);<br />
<br />
while(pWnd)<br />
{<br />
if(pWnd->GetRuntimeClass() != RUNTIME_CLASS(CButton))<br />
;
<br />
pWnd = pWnd->GetWindow(GW_HWNDNEXT);<br />
}<br />
|
|
|
|
|
Hadi Dayvary wrote: ...but I don't want to add a variable for each button on dialogs.
Why not?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
because there are more than 500 buttons in the project and they are growing,
If there is a better way I like to use it.
I think Professional UI use that way.
|
|
|
|