Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

127 Neutral

About Lolums

  • Rank
  1.   Oh, I managed to forget the most important detail.   I'm using Netbeans 8.1 (C++), with the g++/gcc linkers/compilers.   Should I add that path instead? Edit: searched for OpenGL.framework inside the XCode package and it doesn't exist
  2. I've installed XCode and opened it once. The command-line tools are also installed. The linker flag `-framework OpenGL` is present under `Additional options` in the linker settings. Under `Additional Library Directories` in the linker settings, I have added `/System/Library/Frameworks`. The linker and C++ compiler are `g++`. The C compiler is `gcc`. My OS X version is 10.11 (El Capitan). I have included the headers below.     #include <OpenGL/gl.h>     #include <OpenGL/glu.h>  However, the headers still do not resolve.   If I do the same for SDL2, <SDL2/sdl.h> DOES resolve but <SDL2/SDL_opengl.h> has an unresolved include in it, which is <OpenGL/gl.h>
  3. Thank you! I've literally learnt so much from your responses. This made me think about where the problem actually lies, since I was not mapping any buffers or performing any sort of expensive GPU downloads. After running my profiler in "Telemetry" mode for the first time, I've discovered (within two minutes) that actually, the garbage collector usage correlates perfectly with lag spikes and I happen to be wasting a lot of memory in a certain place.
  4.   Ah, I see! In that case, I may just set a time-out and only try to render after half a second or something; this won't be noticeable. Problem with DX12 is that one can't support Linux,  which for me is a crime if one can avoid it. Vulkan looks promising. Thanks for letting me know though.
  5. I've learnt that the upload of VBOs is asynchronous.   How can I check that my VBO is uploaded?   I'd like to do this in order not to try to draw it before the upload is complete, as this halts the program (and a lag spike is felt).   Edit: I've read up on fence syncing but supposing that I have my fence, how do I check for whether it's been used by the GPU without using glWaitSync? I'd like to check and get a boolean response, as opposed to waiting.
  6. Lolums

    Async Upload of Meshes

    You use glBufferData once to create the buffer, then use glMapBuffer many times to update it.   As for sync's - there's a lot of different kinds to look out for, many of which won't be fixed by simply using another CPU thread. e.g. If you attempt to update a resource that's currently in use by the GPU, then you're forcing the driver to block all CPU-side OpenGL calls until the GPU has finished consuming all previous commands, making that resource safe to access. The PDF below outlines the common strategies for "dynamic" (often updated) buffers:     https://www.seas.upenn.edu/~pcozzi/OpenGLInsights/OpenGLInsights-AsynchronousBufferTransfers.pdf   Thanks a bunch. That was useful and I see what I did wrong with glMapBuffer. It turns out that performance was slightly worse for me (the way I implemented it) and that my lag spikes weren't caused by mesh uploads. I did learn a lot though.
  7. Lolums

    Async Upload of Meshes

    I've been playing around with this but found that glMapBuffer only returns a buffer after I call glBufferData. However, this is pretty useless because glBufferData uploads the data in the same thread.   How are we supposed to use this?
  8. Lolums

    Async Upload of Meshes

    Thanks a bunch for these. It's really useful!
  9. My game world is divided into chunks and spikes horribly every time I upload chunk meshes, as there is one mesh per chunk that contains a few thousand vertices and I upload a lot of them. Is there a way to do this on a different thread and use them once they're uploaded?
  • 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!