[QUOTE=Blynx6;18933386]That's C++. I said C#.[/QUOTE]
No you didn't.
[QUOTE=Ortzinator;18933704]No you didn't.[/QUOTE]
Oh shit, I didn't. I thought I did.
[QUOTE=Scoooooby;18927176]Ehh, thanks guys. But I think I'm trying to do something too complicated.
The whole keyboard input part was only a bit of it.
Thanks though :)
And just because this is what I was working on:
[img]http://img695.imageshack.us/img695/5779/captureih.png[/img]
I'm pretty proud of myself, I created that from scratch, it's like a chat room thing.
And the whole Key Press thing was that I want the user to be able to just press the Enter key to submit the message instead of pressing the Enter button on the form.[/QUOTE]
Serif font :barf:
Slap some sans-serif monospace on that bitch yo.
I assume you are using .net, in which case IMO a list box is the best thing to use for this because you can append items to the end and it will automatically add a scroll bar and such.
"cleartype" (aka blurrytype) :barf:
[QUOTE=nullsquared;18936188]"cleartype" (aka blurrytype) :barf:[/QUOTE]
Don't knock ClearType. It can be good.
And also very, very, very bad
[QUOTE=nullsquared;18936188]"cleartype" (aka blurrytype) :barf:[/QUOTE]
I like cleartype personally.
[editline]12:19PM[/editline]
Unless you are using a CRT monitor in which case don't use it.
I also like cleartype
[img]http://gljakal.com/blog/wp-content/uploads/2006/02/VerdanaCompareVertical.png[/img]
[QUOTE=garry;18936773]I also like cleartype
[img]http://gljakal.com/blog/wp-content/uploads/2006/02/VerdanaCompareVertical.png[/img][/QUOTE]
Secon'
I always just do Sleep(1), it seems to solve the 100% CPU usage problem.
[QUOTE=garry;18936773]I also like cleartype
[img]http://gljakal.com/blog/wp-content/uploads/2006/02/VerdanaCompareVertical.png[img][/QUOTE]
My only problem with cleartype is that I like to use Dina/Etc. The blurry fonts hurt my eyes for some reason.
Also, is there something like PDB(program database) but standardized? The generated map files will suffice but if I could use something like a PDB then I could get even more information. (I am making a callstack walker)
[QUOTE=Spoco;18926116]NO! You're suggesting polling which is a horribly inefficient technique to detect a key press. The right way is to make a key hook proc using the Windows API. Normally you'd get a message in your window message queue, but without that you need to make a hook.
[URL]http://msdn.microsoft.com/en-us/library/ms644984%28VS.85%29.aspx[/URL][/QUOTE]
Honestly, how many times a millisecond do you need to check for key presses for that to make any difference
It may be inefficient in comparison, but implementing that is only a matter of a second. Personally if I had to check for one key press, I'd rather use GetAsyncKeyState and just deal with the marginal efficiency drop. Because really, it doesn't matter.
[QUOTE=garry;18937993][url]http://www.google.co.uk/search?rlz=1C1GPCK_enGB352GB352&sourceid=chrome&ie=UTF-8&q=how+to+enable+vsync+in+opengl[/url][/QUOTE]
sorry to burst your bubble, but ive searched before and couldnt find anything because im stupid
im asking anybody in this thread who have got opengl vsync to work to help me.
[QUOTE=ThePuska;18938410]Honestly, how many times a millisecond do you need to check for key presses for that to make any difference
It may be inefficient in comparison, but implementing that is only a matter of a second. Personally if I had to check for one key press, I'd rather use GetAsyncKeyState and just deal with the marginal efficiency drop. Because really, it doesn't matter.[/QUOTE]
Yeah let's use lots of CPU time for nothing, polling for a key press and miss the key press while we're at it just to lower the CPU usage by lowering the polling interval!
Basically the same thing as learning to use system("pause") to pause, because it's easier to do instead of learning to be efficient in the first place.
[QUOTE=Eleventeen;18939297]sorry to burst your bubble, but ive searched before and couldnt find anything because im stupid
im asking anybody in this thread who have got opengl vsync to work to help me.[/QUOTE]
I already gave you a link in the thread you made to a stackoverflow.com entry with a solution and even said that SFML does the same thing as one of the solutions there. You can go see what SFML does now or try figuring it out yourself.
Which would be the third hit in the Google search that Garry gave you.
[QUOTE=Eleventeen;18939297]sorry to burst your bubble, but ive searched before and couldnt find anything because im stupid
im asking anybody in this thread who have got opengl vsync to work to help me.[/QUOTE]
You won't become less stupid if we have to walk you through every step.
Just look at the code in the first hit of the google search.
They all use Windows code.
[QUOTE=Eleventeen;18939825]They all use Windows code.[/QUOTE]
I thought OpenGL is cross-platform?
[B]Edit:[/B]
Apparently vsync isn't.
Try this
[cpp] SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
// if VSync is enabled
if( initialised && pPreferences->video_vsync )
{
SDL_GL_SetAttribute( SDL_GL_SWAP_CONTROL, 1 );
}[/cpp]
[url]http://www.opengl.org/registry/specs/SGI/swap_control.txt[/url] for XServer
[url]http://www.opengl.org/registry/specs/EXT/wgl_swap_control.txt[/url] for Wiggle
Going to start working on my mod manager again.
This time I'm using SVN to make sure I don't lose my files AGAIN.
[QUOTE=Eleventeen;18939825]They all use Windows code.[/QUOTE]
Well SFML certainly has code for Linux also which is why I mentioned it, you can look up what they do in their Linux version of UseVerticalSync function.
[b]Edit:[/b]
[URL]https://sfml.svn.sourceforge.net/svnroot/sfml/trunk/src/SFML/Window/Linux/WindowImplX11.cpp[/URL]
[QUOTE=turby;18936267]Don't knock ClearType. It can be good.
And also very, very, very bad[/QUOTE]
Is that the one with sub-pixel rasterizing?
As much as I like using my monitor at higher resolutions than it was ever intended for, I kinda have problems with fucking with the colors of things.
[QUOTE=Cathbadh;18941064]Is that the one with sub-pixel rasterizing?
As much as I like using my monitor at higher resolutions than it was ever intended for, I kinda have problems with fucking with the colors of things.[/QUOTE]
What the hell are you talking about.
It antialiases text, it has nothing to do with colour.
[QUOTE=ThePuska;18938410]Honestly, how many times a millisecond do you need to check for key presses for that to make any difference
It may be inefficient in comparison, but implementing that is only a matter of a second. Personally if I had to check for one key press, I'd rather use GetAsyncKeyState and just deal with the marginal efficiency drop. Because really, it doesn't matter.[/QUOTE]
Depends on how many keys you want to map. You're making way more syscalls with polling, as opposed to event processing in which you can simply and transparently put the thread to sleep and wake on keyboard interrupts, thereby giving the processor to threads that need it more.
And you must also realize, that every time the state of the keyboard changes, the branch predictor is very likely to fail, so your pipeline's gotta be flushed with every keypress and release. (This is because the conditional branches that depend on the isKeyDown() expression will predict wrong. If isKeyDown() returned false the past 300 times it was executed in that conditional, the branch predictor will go ahead and guess that it will be false the next time too. But alas, when the conditional expression is finally evaluated way down in the pipeline, it ends up being true! Bummer, all the stuff stuck after that in the pipeline is effectively garbage now.)
Meh, I closed my project due to it lagging profuesly due to there being a non-existant bottleneck.
[QUOTE=Jallen;18941493]What the hell are you talking about.
It antialiases text, it has nothing to do with colour.[/QUOTE]
Read up on how sub-pixel rasterizing works. It basically takes the realization that each pixel on your computer screen is made up of 3 smaller blocks, one for each color R-G-B. Cleartype, instead of calling these colors, will just call them 'subpixels,' and will light them up as if they were normal, but really small pixels. If a white vertical line went right through the right side of a normal pixel, then Cleartype would make it blue. Because the blue sub-pixel is on the right third of a normal pixel.
[QUOTE=Eleventeen;18941626]Meh, I closed my project due to it lagging profuesly due to there [b]being[/b] a [b]non-existant[/b] bottleneck.[/QUOTE]
ok
And if you doubted me, Jallen, then it's right here in MSDN:
[quote]ClearType works by accessing the individual vertical color stripe elements in every pixel of an LCD screen.[/quote]
Sorry, you need to Log In to post a reply to this thread.