• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

804 Good

About web383

  • Rank
  1. Toy Plane, a one-touch physics-based flyer for iOS, is FREE this weekend! Don't be fooled by the charming graphics, this game can be quite challenging to master.   There are no Ads, no IAP, and no facebook logins. We won't even disrupt your playing by asking you to rate the game.   If you decide to download we sure hope you enjoy playing!
  2. problem with my text rendering

    I had a similar problem with my font rendering, using OpenGL.   The issue was glViewport not being the same size as the frame buffer.  Is there an equivalent glViewport for D3D?
  3. Without seeing any code . The first thing that popped into my head is that something is wrong with texture mipmapping.
  4. Yes, this makes sense to me.  When dealing with any pixel-perfect rendering, you should always represent your positions and sizes as integers.  When you specify a 0.5f, the GPU will ultimately have to choose which pixel it gets mapped to (this is actually done based on your projection matrix).  I'm not sure why it's different on NVIDIA vs ATI, but it's probably due to floating point math differences.   For pixel perfect rendering I would use an orthographic projection that maps directly to your screen resolution.  Also make sure the viewport (glViewport() if you're using OpenGL) is also set to your screen resolution.  Don't rely on the default viewport that is set for you when you bind the OpenGL context.   I've recently implemented font rendering using freetype and have had results almost exactly to what you have shown in your image.
  5. Thanks for the replies.  This is exactly the behavior I've encountered.  Using a timer isn't an issue at all, I was mostly curious if it was possible otherwise.   I'm also using SystemParametersInfo() with SPI_GETKEYBOARDDELAY and SPI_GETKEYBOARDSPEED to query the initial delay and repeat speeds of the keyboard settings, and just applying it to a custom mouse-down repeat event.
  6. I did try that, and my mouse clicks don't seem to be triggering a WM_KEYDOWN message.  Should they be?  Or can VK_LBUTTON only be queried through GetKeyState() and GetAsyncKeyState()?
  7. Is it possible to receive WM_LBUTTONDOWN auto repeat events similar to WM_KEYDOWN with the standard repeat delay?   I'm working on a GUI, and would like to mimic scrollbars and repeat buttons much like the widgets in a C# WinForms application.  I was hoping this would be possible without implementing a custom timer and handling it manually.
  8. OpenGL Learning GLSL all over again

    I believe OpenGL handles all of this during glLinkProgram().  It will bind the inputs and outputs of the vertex and fragment shader... and complain (i.e. fail) if anything doesn't line up.  For older versions of GLSL, there was varying.  I believe it's the same concept... just new keywords.   The only output of a fragment shader is going to be a vec4, since you are writing a color (or value) to a render target.
  9. Great tutorial! Wit this technique, are my world coordinates forced to be from 0 - 256? And objects will only be spatially sorted at a resolution of (1/256)?
  10. For those of you using C++.  How do you implement your delegates?    I've found several resources on the internet:   This looks to be very popular.  The code looks insane. http://www.codeproject.com/Articles/11015/The-Impossibly-Fast-C-Delegates   This is a very novel solution using templates http://molecularmusings.wordpress.com/2011/09/19/generic-type-safe-delegates-and-events-in-c/   This also looks to be a fairly simple design, using polymorphism. http://nocturnal.insomniacgames.com/index.php/Common#Event.h (implemented here - https://github.com/HeliumProject/Foundation/blob/master/Event.h)   I know there is also boost::bind and boost::function.  Which delegates does everyone prefer?
  11. Study Doom 3 code

    This may be of interest to you - http://fabiensanglard.net/doom3/index.php
  12. Try passing the HWND as an Int32 and cast it back to HWND on the unmanaged side.   Unmanaged code: public unsafe void Start(IntPtr hWnd) { Initalize(hWnd.ToInt32()); }  On the unmanaged side: void Initalize(int handle) { hwnd = (HWND)handle; }   Does that work?
  13. Grass and what to do

    I would probably start by creating many textured quads, giving them a sway (via shear matrix), and then batching all of them on the CPU.  Then send them all to the GPU in a single (or minimal) render calls.    The problem here will probably be depth sorting (since the grass textures will have alpha):  You could either turn off depth writes and just let the pixels clash together, or spend the time sorting them if you have enough CPU resources.  I'm sure there are papers on the subject if you want to get more advanced.   If you want the grass to cast shadows, you can still use standard shadow mapping.  During the shadow pass, draw the grass with alpha-testing enabled. 
  14. [quote]Do I want to create multiple buffer objects and then apply different transformations to each of them?[/quote] Yes. To keep things simple, that is perfectly acceptable way to handle things. If you end up rendering lots of little buffers (and rendering performance becomes an issue), you could transform all the vertices on the CPU and batch them together into a single draw call. You could also look into other methods of OpenGL geometry instancing. This typically only works if all objects can be rendered with the same shader and render state.
  • Advertisement