Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

447 Neutral

About fs1

  • Rank

Personal Information

  • Interests

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Good point. I have made the code work with a call to glGetNamedBufferSubData. This function returns back valid data. Don’t know how this works flawlessly but not the other ones stated. .
  2. I am calling this from the same thread in a hook, where the buffer is bound by the RealglMapNamedBuffer before my calls. See above the example. I have OpenGL 4.5 is installed. I need to use the gl*Named functions as I have the buffer GLuint. Is there a way to map this buffer other way? How can I use glMapBuffer in this case? thanks!
  3. It throws GL_INVALID_OPERATION what could it be wrong?
  4. Thanks. The example confirms how these functions work. On the other side, the example shows how to write data to the buffer. I appreciate it but don’t understand how it applies to reading back a buffer.
  5. I am doing a function call logger via hooks and trying to read back the content of a OpenGL buffer Inside the hooked function, I am doing the following: void WINAPI hk_glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) { RealglBindBufferRange(target, index, buffer, offset, size); float *temp = (float *)glMapNamedBuffer(buffer, GL_MAP_READ_BIT); // Access temp's contents int e = glGetError(); if (temp) glUnmapBuffer(buffer); } glMapNamedBuffer returns a null temp pointer. The error I receive when I call glGetError is an 0x500 or GL_INVALID_ENUM. I also tried glMapNamedBuffer with the GL_READ_ONLY flags but fails as well. What am I doing wrong? What are other ways to get the content (data) of the GLuint buffer ? Thanks
  6. Thanks @MJP for all the clarification. Regards
  7. Great thanks so much for the example. Appreciate all the help, it is working now. Just one more question. In the D3D_INCLUDE_SYSTEM case, how do you handle the file path if you have different sub-folders to search in? Do you need to work on a loop to find the right file in the whole sub-folders system? Thanks
  8. Thanks @turanszkij for your explanation. I will play with it and let you know how it goes. thanks
  9. I have been trying to see how the ID3DInclude, and how its methods Open and Close work. I would like to add a custom path for the D3DCompile function to search for some of my includes. I have not found any working example. Could someone point me on how to implement these functions? I would like D3DCompile to look at a custom C:\Folder path for some of the include files. Thanks
  10. Thanks! I appreciate your help
  11. Thanks Hodgman. How portable are these commands varying from each GPU card? Do I need different FOURCC depending on the vendor?
  12. I read the article posted here:   http://www.gamasutra.com/blogs/MykhayloKotys/20150428/242150/Fast_perpixel_lit_volumetric_fog_without_depth_prepass.php   He suggests to use a Texture instead as the Scene Depth-Stencil Buffer does not have enough space (8-bit) to store the depth of a scene. Is this correct ?   I would like to proceed using the depth buffer instead of the Texture approach, but appreciate any thoughts on it.   Thanks.
  13. Ok, I understand the logic behind what you are recommending. Thanks so much.
  14. Thanks phil_t Makes sense,I will try one pass as well. Regards!
  15. I am new to Shadows in D3D9/10/11   I have been following this tutorial which is quite clear:   https://takinginitiative.wordpress.com/2011/05/15/directx10-tutorial-10-shadow-mapping/   Let's say you have drawn the scene with couple hundred of draw calls and you are about to render the shadows. The vertex shader is defined as: struct PS_INPUT { float4 pos : SV_POSITION; float4 lpos : TEXCOORD0; //vertex with regard to light view float3 normal : NORMAL; }; //-------------------------------------------------------------------------------------- // Vertex Shader //-------------------------------------------------------------------------------------- PS_INPUT VS( VS_INPUT input ) { PS_INPUT output; output.pos = mul( input.pos, mul( world, viewProj ) ); output.normal = input.normal; //store worldspace projected to light clip space with //a texcoord semantic to be interpolated across the surface output.lpos = mul( input.pos, mul( world, lightViewProj ) ); return output; } My question is, do you need to pass all Draw Calls again as a second pass, or there is a way to get the vertices previously drawn from the GPU or somehwere else? The former seems quite expensive in terms of performance.   Any clarification is highly appreciated.   Thanks !
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!