Tag Info

Hot answers tagged

2

You can also use the OpenGL Extensions WGL_NV_DX_interop and WGL_NV_DX_interop2 The first one is well supported by Nvidia and AMD and even Intel chips but works only with D3D9 objects. If you want to use DXGI (DirectX 10 and 11) you need to use the second one which only works with Nvidia and some AMD GPUs. By using these extensions you can render to a ...


2

Since m_VAO is valid in constructor but not in draw(), it seems that the destructor was called before draw(), perhaps by copying an instance of the Polygon class. P.S. Errors like these could be prevented by following the Rule of three.


1

As someone who has implemented an entire Math library including Quaternions let me say that just following a tutorial will not get you anywhere with this. To iron out bugs like this you really need to understand how Quaternions work, what they are and how to use them. It's probably some of the most complicated math in Game development and I don't recommend ...


1

Please take note that the question was unclear and changed meaning 3 times, hence the 3 answers in one How can I verify that a given size is a multiple of another? This is a very good case to use the Modulo operator. Let's say you have a texture tex with size (width, height). Now you want to render the texture with size (drawWidth, drawHeight) on the ...


1

Having done both, I can say that using a single quad is best in circumstances where none of your larger objects take up more than one grid square and/or are square/cube-shaped. Otherwise, you will eventually run into Z-sorting issues. The multiple-quad solution was the best one that I found to deal with that particular situation. IE, if you had larger, ...


1

gl_TexCoord[0].stp = normalize(gl_Vertex.xyz); Is your problem, I believe you need: gl_TexCoord[0].stp = normalize(gl_Normal.xyz * gl_ModelViewMatrix); Possibly without the matrix multiplier -- I'm a bit rusty. Note that the meaning of 'normal' can be a bit confusing here -- The 'vertex normal' (gl_Normal) is a vector pointing directly 'away' from the ...



Only top voted, non community-wiki answers of a minimum length are eligible