Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 17 Apr 2004
Offline Last Active Aug 28 2016 11:18 PM

Posts I've Made

In Topic: Engine Lighting

22 August 2016 - 11:50 PM

When you use shaders you program the light yourself. So you can store light information into buffers/textures for example which can then be retrieve in the vertex/pixelshader to process more than 8 lights. But if you are using the fixed pipeline you cannot use more than 8 lights. If you want to use more than 8 lights you will have to render the scene more than once with additive blending.

In Topic: How the 'perspective division' should be done?

10 January 2016 - 07:36 PM

Just to extend what Hodgman said. After you apply your projection matrix. all components are divided by w which clamps your x and y between -1 to 1 and z from 0 to 1 in DirectX and -1 to 1 in GL.

In Topic: Working for a startup.

10 January 2016 - 07:34 PM

The medical job is right next to my house. About 2 miles away. The game company is about 30 miles a day.@Orymus3. That is exactly the problem, i am kind of like if i take the cad one, it will be stable but very boring work, but i will have more stability there. On the other hand the game company one sounds awesome, but i had bad experience in the past working for bigger game company and assume that working for a start up is probably worse. I do not want to find myself working everyday like 9 to 10pm where i am not spending time with my kids and wife.

In Topic: question about data transfer between memory and graphics card memory...

25 December 2015 - 01:08 AM

What exactly are you trying to do.? glBufferData updates the entire buffer of data. glBufferSubData let you update a section the buffer which can be very helpful when you have a dynamic buffer and you just want to update a section of the buffer, while the gpu is working on some other section. The only reason it would not be efficient is if you are locking the entire buffer every frame and replacing the whole thing everytime then yes that will be inefficient because you will stall and you want to prevent that. But what you can do is make the buffer like twice or three times the size. That way you can map one section of it and update that while the GPU is currently drawing another section.With that there will be no stalls as long you can keep feeding data that the GPU is not currently working with, that is where glBufferSubData comes in handy, because it allows you to do exactly that.

In Topic: Bvh player - blank!

25 December 2015 - 12:56 AM

Just to extend a bit on what L.Spiro mention. The only difference between opengl and direct x is that if you are using their build in fixed pipeline matrix operation. The multiplication is done by multiplying column*row and in the case of direct x it is done by row*column. But the memory layout is the same on both. Element 12,13,14 represent position for both gl/dx. That is the reason why in DirectX you would do something like Rotate*Scale*Translate but in GL it would be Translate*Rotate*Scale to get the same result. Row major multiplication are perform left to right and column major are perfomed right to left.