1,533 reputation
28
bio website nothing-inc.com
location Cape Coral, FL
age 30
visits member for 1 year, 5 months
seen 12 hours ago

My interest in Computer Graphics dates back to AlphaWorld (1995), the first true 3D internet-based virtual world that allowed real-time collaborative construction. In 1998, I began to dabble in OpenGL and have since amassed an expert knowledge in OpenGL and Computer Graphics in general.

Outside of Computer Graphics, I spent a great deal of my academic career working with Real-Time Safety Critical Embedded Systems based on the VxWorks platform. My research has been published in a variety of fields including Machine Learning, Real-Time Operating Systems and Fault Tolerance.

   profile for Andon M. Coleman on Stack Exchange, a network of free, community-driven Q&A sites


Jan
22
answered Where can I find OpenGL state changes profiling?
Jan
15
comment Textures “don't work” when I don't specify any texture parameters. Is this a driver bug or intended behavior?
I suspect it's really just GL_TEXTURE_MIN_FILTER that you have to set. It defaults to GL_LINEAR_MIPMAP_NEAREST and that will produce undefined results if your texture does not have mipmap LODs. If you set it to GL_LINEAR or GL_NEAREST instead, the problem probably goes away.
Jan
3
comment Is it possible to use unnormalized texture coordinates from a GLES2 GLSL fragment shader?
Are you absolutely sure that you are actually running into precision problems and not making a far simpler mistake such as not sampling at texel centers? If you have simply divided your texture coordinates by the dimensions of your texture, you are actually going to be sampling on texel boundaries rather than center. Even with nearest-neighbor filtering, you want to sample as far away from texel boundaries as possible to avoid looking up the wrong value (especially if you have limited precision working against you).
Jan
3
comment Is it possible to use unnormalized texture coordinates from a GLES2 GLSL fragment shader?
Unnormalized texture coordinates as in texel addressing. In desktop GL there were rectangle textures in legacy versions that used integer texture coordinates instead of normalized coordinates (but their primary appeal was usually that they supported non-power-of-two dimensions pre-GL 2.0); later they introduced an explicit texture lookup function for that purpose (texelFetch).
Jan
1
comment What is the best way to keep track of time in a game?
To add to the other answers - use a timer that measures elapsed time and take the delta between updates, but be careful when choosing this timer. Timers based on the "wall clock" (the time you see in the task bar) are notoriously non-monotonic (and low resolution). Make sure you account for the rare possibility of returned time values being in the past (e.g. if the operating system re-syncs the time and finds it was a few seconds fast). Some timers guarantee monotonic non-decreasing behavior (time never goes backwards), but don't expect it unless your API explicitly states this.
Jan
1
comment How can I chain together Stencil tests from the same re-occurring routine, but keep the tests separate?
You want to use both, change the ref value in order to set the bit and change the mask so that you ignore the contents of all the other bits during the test. A value of 3 is 11 in binary, and that would mean that both bit 1 and 2 were set. The idea of the mask is to tell GL which bits you are interested in. If you want bit 3, instead of 3 you would use 0x4 (100 in binary).
Dec
31
answered How can I chain together Stencil tests from the same re-occurring routine, but keep the tests separate?
Dec
30
comment Rendering order of shadowing point lights?
By the way, the metric I use for shadow updates is not actually the number of frames. It's measure in terms of milliseconds. That helps iron things out when the end-user is running at ridiculously low or high framerates. For instance, shadows might only need an update every 20 ms. At 60 FPS, that's every 2 frames, at 30 FPS every frame, at 120 FPS every 3 frames.
Dec
30
answered Rendering order of shadowing point lights?
Dec
28
comment render with const depth value
This rule of thumb applies to modern desktop hardware as well. Ever since the color buffer became compressed and hierarchical Z-buffering became a feature on commodity GPUs (this happened ~2002 on discrete desktop GPUs), clearing the buffers became very important to achieve optimal memory throughput. It's generally not advisable to skip clearing buffers or attempt to replace it with something that seems equivalent on any kind of modern GPU (tile-deferred or not).
Dec
27
comment Can I (safely) assume that people playing my game have a middle mouse button?
I play the majority of my games on a machine with only one mouse button. You cannot even assume we have 2 mouse buttons, much less a middle one. You might consider allowing some arbitrary l-button + keyboard combination to do what you are trying to do with the 3rd mouse button. I use Fn + Primary Mouse button as an alias for right click in my own software. A lot of gamers will have some 3rd party software setup that does this sort of thing, but I prefer to support it directly in my own software.
Dec
23
comment How to setup glOrtho and Viewport
The area defined by those variables is the display. It's kind of like the client region in most window systems. You have the window and then a smaller rectangle in window coordinates that you want to render into. But I agree, if you were having trouble interpreting the question you should have left a comment for the OP and not down-voted my answer.
Dec
22
comment Supersampling - Pixel color average calculation
@Corluk: Oh, okay. Yeah that is basically how it would work. Though the entire structure here is a pixel, and those circles are samples (I assume you mean that 2 samples are red and 2 are blue?). To get a final color for the pixel you take the average of all the samples that belong to it.
Dec
22
comment Supersampling - Pixel color average calculation
@Corluk: I tried to avoid that because if you use single-sample rasterization rules, that pixel's not technically covered (it doesn't satisfy the top-left rule for triangles).
Dec
22
answered Supersampling - Pixel color average calculation
Dec
22
comment How to setup glOrtho and Viewport
If you read the comments you would come to a different conclusion. There are 4 variables defining the dimensions of "display" and the dimensions of "display" are independent from the two variables defining the characteristics of the window (windowWidth and windowHeight) - "display" and " window" are two different things. I don't know how you can possibly interpret the question the way you are, because the viewport already works the way you want unless you touch it manually.
Dec
22
revised How to setup glOrtho and Viewport
added 340 characters in body
Dec
22
comment How to setup glOrtho and Viewport
The OP doesn't want to fill the entire window, just the area defined by the dimX variables - dimL, dimR, dimB and dimT define the region to fill and they are not related to the size of the window (though is presumably smaller in area than the window).
Dec
22
comment How to setup glOrtho and Viewport
@TrevorPowell: That makes no sense, where in the question does it discuss filling the entire screen? What you just pasted says he wants to fill the region defined by the dimX variables. If you used 0,0 as the origin and filled the entire screen that would negate the need to use a viewport in the first place and would definitely not fill the region restricted to dimX.
Dec
22
comment How to setup glOrtho and Viewport
@TrevorPowell: How do you figure? There is no requirement that glViewport have an origin at 0,0 or that the bounds of the viewport fill the entire screen. The only requirements glViewport introduces is that the width and height are >= 0.