|
i want to add a realistic waterfall
When the goin gets tough then tough gets going
|
|
|
|
|
Well...that's pretty advanced, but, typically with any water effect, you need a water texture, and then you animate the texture by changing the texture coordinates. If you want realistic waterfall, you'd also need a particle engine to create mist.
I don't have any links to tutorials or code, maybe google for "opengl water tutorial" or poke around on http://nehe.gamedev.net/[^] (that's the second time I've linked to nehe today, what's up with that?!)
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
yeah i hv checked that link, i want ur verdict on a thing i-e i have downloaded an animated waterfall , itb has 20 frames. now i was wondering may be i shud load each frame using threads, shud i go for multithreading
When the goin gets tough then tough gets going
|
|
|
|
|
Multi-threading is not the approach I would take. Is the animated waterfall an .avi? If so, check out Lesson 35 on the nehe site.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
how do v attach a file
When the goin gets tough then tough gets going
|
|
|
|
|
To a message post? I don't think you can. Provide a link instead.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
i want 2 send u the image how 2 attach files
When the goin gets tough then tough gets going
|
|
|
|
|
Don't want your file. Just tell me what format it is.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
the format is GIF
When the goin gets tough then tough gets going
|
|
|
|
|
So it's an animated GIF file? I don't know how to load an animated gif.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
ok thnx any way but if u do get some info related to this do let me know
When the goin gets tough then tough gets going
|
|
|
|
|
hi i want to know,how can we load the movie clip in visual c++ using the graphics library OpenGL.
thx
Regards
NooR
|
|
|
|
|
|
in a string of text "in this- string" how can i tell if the char to the right of the - == a space without aserting?
-- modified at 23:15 Tuesday 11th July, 2006
|
|
|
|
|
It depends on what api you are using. Is it an stl string? or a plain old char buffer or ...
Basically what you want to do is find the index of the '-' char then if it is greater that 0 test if the char at that index - 1 is ' '
You should take care using assert as it is stripped out in release builds.
Objects in mirror are closer than they appear
-- modified at 23:24 Tuesday 11th July, 2006
|
|
|
|
|
are you trying to remove it? or showing a message?
you can use CString.Find function to find a character within the given string. this will return the index of '-' charcter wtihing the given string.
e.g
CString strText = "in this - string"
int nPos = strText.Findd('-');
if((nPos>=0) && strText.GetLength > nPos+2)
{
strText.RemoveAt(nPos+1);
}
HTH
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
My Blog | Understanding State Patte
|
|
|
|
|
i want a space on both sides of the - so it the string is "some- text" i want it to end up as "some - text" i know i can use insert but "some- text" alread has one space and it would end up with 2 on one side.
what i need is
"some-text" = "some - text"
"some- text" = "some - text"
"some -text' = "some - text"
inserting a space i can do i just cant figure out how to tell if/or where a space is in the string.
|
|
|
|
|
here is the code i have written for this
CString strText = "some -text";
printf("%s",(LPCTSTR)strText);
int nLen = strText.GetLength();
int nPos = strText.Find('-');
if ((nPos>=1) && ((nPos+2)<nLen))
{
char chRight = strText.GetAt(nPos+1);
char chLeft = strText.GetAt(nPos-1);
if (chRight != ' ')
strText.Insert(nPos+1,' ');
if (chLeft != ' ')
strText.Insert(nPos,' ');
printf("\n%s",(LPCTSTR)strText);
}
else
{
printf("invalid string to modify");
}
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
My Blog | Understanding State Patte
-- modified at 0:10 Wednesday 12th July, 2006
|
|
|
|
|
Hi,
This will help you
CString csText = "some-text";<br />
int nIndx = csText.Find( "-" );<br />
if( csText[nIndx-1] != ' ')<br />
{<br />
csText.Insert( nIndx, ' ' );<br />
++nIndx;<br />
}<br />
if( csText[nIndx+1] != ' ')<br />
{<br />
csText.Insert( nIndx+1, ' ' );<br />
}<br />
"Dream bigger...Do bigger...Expect smaller"
aji
|
|
|
|
|
Hey there,
thanks for ur suggestion and help.
If you must use On_rx(), you can check how much time elapsed since last On_send() call without using timer.
How do I do this?....Can you show me the code?
Jun wrote:
I'm not going to check the details of your code. Rather, I'll treat it as pseudo code.
First, be careful with OnTimer() and On_rx() logic, which could be conflicting. If you use timer, you should check whether your received the feedback inside OnTimer(), not On_rx(). If you must use On_rx(), you can check how much time elapsed since last On_send() call without using timer. OnTimer() and On_rx() complicate things unnecessarily.
Second, the blocks {} you used in the segment are incorrect:
thathvamsi wrote:
On_rx(wparam,lparam)
{
//checks for packet received
//if no packet received from serial device, then
{
//check for timer
//while(timer has elapsed)
OnTimer()
{
//resend the packet to MPU
post_message(WM_RESEND,null)
}
}
}
Best,
Jun
|
|
|
|
|
Win32 function GetTickCount() returns the time elapsed in milliseconds since the system started. Call it in two place and substract to get the time interval you want.
Best,
Jun
|
|
|
|
|
May someone help me to solve this problem.. plzzzzzzz
PROBLEM STATEMENT:
You are experiencing problems with getting Front Page 98’s hover buttons to function. You are supposed to solve this problem in a very short time. Think about the possible ways that you can do to solve this problem very quickly.
Applet codes of your web page is as follow:
<big><code><applet code="fphover.class" codebase="./" width="120" height="24">
<param name="color" value="#000080">
<param name="hovercolor" value="#0000FF">
<param name="textcolor" value="#FFFFFF">
<param name="text" value="C Programming">
<param name="effect" value="glow">
<param name="url" valuetype="ref" value="http://metalab.uniten.edu.my/~azhana/indexCProg.html">
</applet></code></big>
nothing
|
|
|
|
|
Again ?!%!%!
didn't you post this in every boards on CP ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
How much are you offering?
Objects in mirror are closer than they appear
|
|
|
|
|
You mean what grade will you get?
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
|
|
|
|