Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 25 Aug 2009
Offline Last Active Sep 25 2016 06:00 PM

#5178432 Signed angle between two normals?

Posted by on 05 September 2014 - 08:34 PM


Buckeye: 3D vectors don't have signs


You're absolutely correct. Don't know what I thinking.


Thank god, because i was just seriously doubting my understanding of the cross product.

#5171439 Camera Creation Question

Posted by on 04 August 2014 - 11:12 AM

RE your update:


you usually need a temp vector, such as one of the primary axiis to do this. so say you are x+ right, y+ up, z+ forward. take your lookatpoint and subtract position. cross(world.up, forward)with WORLD up(not local) to get right, then cross(forward, right) to get a true up vector.


as you already discovered, Mview = Mcamera-1

#5161137 3d rotation speeds

Posted by on 17 June 2014 - 12:57 PM

But this yields problem of order of composited quaternion rotations. But I gess this is the responsibility of expressing last added quaternion corectly, rather than physical dilema.



And this is what gives so many permutations of Euler or Tait-Bryan angles.

#5159255 Shadow Volumes - Edge finding

Posted by on 09 June 2014 - 07:55 AM

Read through the comment block in the first pass, and then the second. He is gathering directed edges where the i1 comes before i2. This is a shortcut for the second pass, notice the differences between the 2 loops.

#5159160 Clarification on SAT?

Posted by on 08 June 2014 - 05:12 PM

Thanks for the response  Aardvajk,


Sorry I was not clear before, I meant to ask which axes would I project my shapes edge on the X  and Y axes or on an arbitrary axes that is made up by myself.

I think Aardvajk covered that pretty well. For 2 objects in 2D, you will need to project against each face normal of each object, with the exception of normals that are colinear with another normal. For a Triangle, you would have 3 axii, each perpendicular to one of the triangle's edges. For a square, you have 2 axii, the local X and Y, as the other 2 normals are -x and -y, which are collinear with their respective inverses.

#5158217 Still fairly new to 3D design...problem with my doom-style editor

Posted by on 04 June 2014 - 03:07 PM

First sentence answered my question (at least with the ceilings)


Thanks so much.  It worked.  ^^

It's always a guess as to how detailed an answer to give, glad i could help.

#5158122 GetTerrain position help

Posted by on 04 June 2014 - 09:39 AM

If you already have x and z, and get height gives you the y coordinate, what else do you need? or am I misunderstanding your intent?

#5153653 clear only partial bits of stencil buffer

Posted by on 14 May 2014 - 03:03 PM

One option would be to setup a stencil op such as ZERO, or REPLACE ,  in combination with your write mask, and render a full screen quad, so that each pixel of the stencil buffer is written to what you want. This would add some Draw calls, but would get the functionality that you want.

#5153622 How do I add librarys in visual studio 10?

Posted by on 14 May 2014 - 12:26 PM

Important to note when using Burnt_Fyr solution, it you probably want to go to the drop down box at the top and set the configuration to All Release, otherwise it could fail when you build the release version. You don't have to do this, but it makes it easier as you don't have to manually add the libraries to all the configurations.

I didn't advise this, as OP may have different dependencies for debug and release. My own code is broken into several libraries, and each has a separate debug/release config, so when I'm including that library in a debug configuration, I want the debug config of that library, which may have sanity checks or evil helper functions for quick and dirty testing, that I shouldn't rely on in release versions. When I'm compiling a release, I use the stripped down release versions of my libraries.

#5153620 How do I add librarys in visual studio 10?

Posted by on 14 May 2014 - 12:21 PM

Ok, who's the idiot who keep downvoting me and don't have the balls to tell why??? The information i provided is 100% accurate and lots of people do it that way i dont see why i should get downvoted for this. Last week i got downvoted for a post i posted in march... cmon.

I feel your pain, it seems silly to be punished for a valid answer. #pragma comment may be VS specific, but so was my answer.

#5153303 Perfectionism and Programmer's Block

Posted by on 13 May 2014 - 07:54 AM

 Just getting into OpenGL 3+ has become a daunting task, trying to implement a highly versatile rendering system capable of everything I can't forsee.

Analysis paralysis hits everyone eventually. If you can't forsee the need, don't worry about accounting for it. Worry about what needs to be done, or as ApochPIQ said, focus on the actual requirements of the project. If at a later date you need something done differently, make a note in your code, and return to it in a later revision.

#5153075 How do I add librarys in visual studio 10?

Posted by on 12 May 2014 - 09:15 AM

You will need to setup the library directory (project->properties->configuration properties->vc++ directories) if glaux is not in a directory already accessible by the project, as well as the add the library as an additional dependency (project->properties->configuration properties->linker->input) If you are compiling glaux, you can add that project to the existing solution, and use project->properties->common properties->add new reference instead.


If you are including files such as headers, you may need to setup those as well, either as an include from vc++ directories, or through  c/c++->general->additional include directories.


the above applies to vs2010, but should work in 2013 unless everything has been changed again.

#5152549 Two vertexShader cannot function simultaneously

Posted by on 09 May 2014 - 09:58 AM

when you say the pixel shader has no effect, do you mean that nothing is rendered? have you tried pix to see what the vertices look like after the vertex shader has passed?


EDIT: IIRC SetFVF will not work with the shader pipeline, only the FFP. For shaders, vertices need to be bound with VertexDeclarations, which WILL work with the FFP.




EDIT2: I was wrong, FVF vertex buffers can be used with vertex shaders.

#5152353 Direct3D 11 Creating GDI compatible texture for backbuffer

Posted by on 08 May 2014 - 12:08 PM

I suspect that the creation of the surface will fail with that flag active though. Try it by all means but last I recall resources meant for shader binding don't play nice with GDI+.

I would assume that DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE would actually force the backbuffer(and others if not double buffering) to be created with the D3D10_RESOURCE_MISC_GDI_COMPATIBLE in the buffer description, internally.


@BuckEye: glad you found the bug, how did you come by it? That section wasn't part of the original code you posted, did the GDI text work before resizing the window/buffer or was this something that was called before you had actually presented the first frame?

#5152045 Does swapchain->Present always stretch to the target?

Posted by on 07 May 2014 - 08:43 AM

I think Jason's solution should work, ie; present your back buffer, and draw GDI on top afterwards, although to be honest I feel like I'm and ant among giants in this thread. Have you tried rendering to your MSAA-able surface, and then biltting (if possible) or using that as a texture to draw a full screen quad on to a GDI compatible surface?


I tend to do what others have suggested and just use separate HWNDs and swapchains for child areas of the hwndmain client.