1,418 reputation
28
bio website nothing-inc.com
location Cape Coral, FL
age 30
visits member for 1 year, 4 months
seen 9 mins 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


7m
revised How to setup glOrtho and Viewport
added 340 characters in body
10h
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).
10h
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.
10h
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.
10h
comment How to setup glOrtho and Viewport
@TrevorPowell: They can be used for both. If you want to match your projection to your viewport so that you project 1:1 with pixel coordinates (e.g. not stretched) you will usually match the dimensions of the orthographic projection with the viewport. The way I see it, there's no other way to interpret "coordinate of the left side of the display" in conjunction with filling just the "area defined by the dimX variables".
12h
revised How to setup glOrtho and Viewport
added 380 characters in body
13h
answered How to setup glOrtho and Viewport
2d
comment Using Delta for a stopwatch, delta too fast than real time seconds
You are mixing and matching different floating-point precisions here and that is enough to raise an eyebrow. I would suggest you represent your delta time consistently using the same precision, either single- or double-precision everywhere.
2d
comment what is the name for the category of game that use a real time clock as the game time like die2nite.com
Off the top of my head, non-monotonic? Be careful this does not lead you down the slippery slope of naively using the system's "wall clock" to represent time in-game, because people and the Operating System itself can change that. The OS will periodically change it according to an atomic clock over the Internet to correct for clock drift, and that can lead your game to think that time ran backwards!
2d
comment How to Load Raw Bayer Images using OpenGL?
@SurvivalMachine: en.wikipedia.org/wiki/Bayer_filter
2d
comment Fragment Shader output type error
@KarimAbdelHamid: Well that sounds like you tried to link a vertex shader as a fragment shader. Try outputting the shader info log even when compilation is successful.
Dec
19
comment Fragment Shader output type error
Is "Fragment Shader output type error." literally the GLSL error message you are getting? That sounds fishy, usually they include a line number or something more descriptive.
Dec
16
comment OpenGL light appears to move with camera and changes with object rotation
Under normal circumstances, in an orthogonal matrix, the inverse is the same thing as the transpose so those two operations cancel eachother out typically. But in the special case where you have non-uniform scaling, something profound happens (as seen here).
Dec
16
comment OpenGL light appears to move with camera and changes with object rotation
"I learned that the normal matrix for orthogonal the same as the modelView." To be more precise, the normal matrix is not necessarily the same as the top-left 3x3 matrix (rotation) of the ModelView matrix - if you have non-uniform scaling in your ModelView matrix then you need to take the inverse transpose. That is actually a somewhat uncommon situation, but in order to cover all bases, the formal definition of the Normal Matrix does just that: NormalMatrix = transpose (inverse (ModelViewMatrix)).
Dec
15
comment The way of avoiding branching for textured and not-textured objects
Well, there are subroutines (as we call them in GL), but I do not think that would really be a performance gain just a rather complicated way of avoiding branching for your two shader variations (this is not the ideal use-case - kind of like instancing, to get really tangible benefits from this you should have lots and lots of minor variations of the same shader). In the D3D world, the (Shader Model 5.0) concept is referred to as Dynamic Linking.
Dec
8
comment Alpha blending sometimes gives the wrong color?
@ClassicThunder: Unsigned types sadly do not exist in Java. You could either mask off all but the lowest 8 bits after using an arithmetic shift or use a logical shift like that. The logical shift makes more sense to me in the end.
Dec
7
comment How to compute point in view space from depth?
View-space means "camera-space" or often "eye-space". Clip-space is actually the coordinate space that results after multiplying eye-space coordinates by the projection matrix. It is what you output in a vertex shader, but pretty much immediately after you output clip-space coordinates, GL will divide them by W to go from clip-space to NDC-space. The thing is... the depth buffer stores window-space Z, that's actually an additional step beyond NDC-space - it relies on your glDepthRange (by default NDCz -1 maps to window-space 0.0 and NDCz 1 maps to window-space 1.0).
Dec
6
comment Transparency on pixel level?
@LPeter1997: I don't know how to explain that one. I suspect you are using some gradient function to calculate the color and alpha value. I would check for under/overflow.
Dec
6
revised Transparency on pixel level?
Java's right-shift operator is tricky - we need to treat the most significant bit as just another bit, instead of the sign -- so use >>>.
Dec
6
comment Transparency on pixel level?
@LPeter1997: I think the fact that Java doesn't have unsigned data types is causing this. If that is the case, then the operator you need to use when calculating a1 is actually >>> rather than >>.