I am now implementing a small fish project, which the fish can swim freely in the sea.
I want some tutorials, references or libraries on how to implement the light under the sea, which similar to the dolphin example in DirectX SDK. Thanks you very much.
P.S: Is there any homepage about using OpenGL to rewrite the examples in DirectX?
[This message has been edited by takumi (edited 10-27-2002).]
On this website under programming advanced and FAQ, are some examples of underwater effects.
Originally posted by takumi:
[b]Hello everyone.
I am now implementing a small fish project, which the fish can swim freely in the sea.
I want some tutorials, references or libraries on how to implement the light under the sea, which similar to the dolphin example in DirectX SDK. Thanks you very much.
P.S: Is there any homepage about using OpenGL to rewrite the examples in DirectX?
[This message has been edited by takumi (edited 10-27-2002).][/b]
I have followed the demo to implement the underwater caustics. However, the light do not have any ripple effect (movement), it just performed as a static light in my scene.
The Demo use GLUT function to build the display window, and my project are base on NeHe base code. Is that I have miss something out in this part?
Please give me some advises. Thanks you.
[This message has been edited by takumi (edited 10-31-2002).]
I don’t think switching from glut to win32 api would change the gl code part much if at all. I looked at the program underwater.c, if you have coverted it from GLUT to widows API.
What did you replace the glutIdelFunc with?
This is what caused the patterns to chagne.
Originally posted by takumi:
[b]I have followed the demo to implement the underwater caustics. However, the light do not have any ripple effect (movement), it just performed as a static light in my scene.
The Demo use GLUT function to build the display window, and my project are base on NeHe base code. Is that I have miss something out in this part?
Please give me some advises. Thanks you.
[This message has been edited by takumi (edited 10-31-2002).][/b]
[This message has been edited by nexusone (edited 11-01-2002).]
Originally posted by nexusone:
[b]I don’t think switching from glut to win32 api would change the gl code part much if at all. I looked at the program underwater.c, if you have coverted it from GLUT to widows API.
What did you replace the glutIdelFunc with?
This is what caused the patterns to chagne.
[This message has been edited by nexusone (edited 11-01-2002).][/b]
I think I have replace the glutIdelFunc wrongly…
How should I replace the glutIdelFunc correctly in Windows API?
Please teach me…thanks you very very very much.
[This message has been edited by takumi (edited 11-01-2002).]
That’s ok…but, would u mind to give me some ideas that how to implement glutIdelFunc in Windows API? Because I want to learn and try to implement it by myself~~~
I think a simple function called somewhere in your gameloop (like at the beginning) would be fine to do the code in GlutIdleFunc
Am I wrong ?
Just guessing…
Good Luck that’s an interresting question
Originally posted by takumi:
[b]That’s ok…but, would u mind to give me some ideas that how to implement glutIdelFunc in Windows API? Because I want to learn and try to implement it by myself~~~
Go to nehe’s site(previous post) and learn how to open windows with opengl support.
You might want to check out some simple window gui samples at msdn.microsoft.com to understand how window/message management works under win32.
The short answer is, since glut is callback driven you need a way of executing code “all the time”, hence glutIdleFunc. In win32 you would have a while loop instead of the glutMainLoop that processes messages.
You will see code like this all the time in win32 gui c apps: