cgrant

Members
  • Content count

    417
  • Joined

  • Last visited

Community Reputation

1829 Excellent

1 Follower

About cgrant

  • Rank
    Member

Personal Information

  • Interests
    Design
    Programming
  1. Like other have mentioned, its not legal to do so, but I don't see why would have to expose Map/UnMap to your API? If Map return a pointer to memory, wouldn't that be sufficient to pass through your API and have some kind of sync point to trigger the unmapping. When I say sync point, I'm referring to another exposed generic API call that does an unmap internally.
  2. S3TC and gamma correction

    The question is somewhat open ended as there as several factors to consider: 1. What color space is your DCC/Offline tool working in and how does it save the values into the input to the texture compression tool? That is a question only you can answer as we do not know what tool you use. 2. Is the texture compression tool gamma-aware ? Does it just blindly assume input values are linear and does the block compression on these values ? Again only a question you can answer as again the tool is your choosing. So you would have to dig into the manual/notes. 3. What texture format is was the S3TC created with ? If the texture was created with a non-SRGB format even though the image was indeed sRGB encoded, then the texture sampling hardware is going assume the texture is linear ( since that is how it was specified ). Texture filter is a linear operation so the result is going to be incorrect as we are now doing linear operation on non-linear content. If the texture was created with a sRGB format and if the hw supports it ( any modern GPU should do this correctly now ), then the texture sample will do the sRGB->linear conversion first, followed by filtering = correct result.
  3. The code is a little bit hard on the eyes, but I don't see where you are calling wglChoosePixelFormatARB or however you get to this to choose the correct pixel format for the device context used to create the OpenGL context. I suggest you take a look at this https://www.khronos.org/opengl/wiki/Creating_an_OpenGL_Context_(WGL) to verify that you are not missing a few steps. A few attributes are required to get the correct pixel format, but its should be pretty straightforward.
  4. 3D Horrible texture/object popping

    Until there is unlimited resources for rendering ( processing power, memory etc ), there will always be tradeoff in rendering. Devs usually choose the lesser of 2 evils. Nothing is free, but step can be take to minimize the visual anomalies. You can use some form of progressive mesh for all visual representation, but then you pay the price in requiring more processing power to do so...so would you prefer a game that doesn't pop, vs one that runs like 'you know what'. I agree its can be distracting at times, but for the most part this shouldn't be a show stopper for any good game ( unless you are more interesting in how the game looks vs the story. ). Ex..and this is just my opinon/preference. Assassin's Creed ( the first game ) on XBox 360 , was so bad that characters (NPC) would pop into the scene almost right next to you, but it did not ruin the experience for me as the game itself was more engrossing that I was able to overlook those issues..
  5. If this is your own/company IP why would you be worried about lawsuit?, seems like the worry should be about usage rights for your content. I mean, if it does happen then I would think that being the IP owner would be in your advantage. With that being said, I"m not a lawyer so that would be something that you would want to seek legal counsel on.
  6. I wouldn't think so..glMapBuffer maps the entire buffer into the address space of the process, while glMapBufferRange maps only a range. Now, lets consider you have a buffer thats several 100 MBs in size ( just an extreme though possible ), now when you map this buffer using glMapBuffer, whenever the buffer is unmapped, there is the potential that this entire region is now dirty and will have to be flushed back to the source. In reality its a little more involved than this as the mapped memory should be backed by paged memory so at least only dirty pages should be flush ( don't really know if this is how the driver does it ). However, if you have some knowledge of how the buffer is being used, then glMapBufferRange makes more sense as now you limit how much data that has to be synchronized with the server upon unmapping/invalidation. I have not personally measured and compared the performance of both, but the voice in my head keep telling me that glMapBufferRange should be more performant..lol. Hope that helps.
  7. DirectX Texture Tool

    I would recommend AMD Compressonator.
  8. My post wasn't mean to be a critique, nor a deterrent( was just pointing out a few salient issue ), nor can I tell you what to do I can only make suggestions. How can I be correct about you, when I don't even know who you are? I would suggest get comfortable with the toolchain first before even thinking about the next step.
  9. I guess my question are why are you so hell bent on programming a console ( portable or not ). Getting the toolchain working is part of the battle and not a simple one. If you are not familiar with cross-compilation and the required setup as other have mentioned then you are going down a path that will lead to you getting frustrated and giving up before you even start. Once the toolchain is configured correctly, then you have to now worry about the hardware and all its idiosyncrasies. I would suggest start of with smaller task before diving into the deep end of the pool. Have you ever worked with the GCC toolchain ? If not, get familiar with it first. Have you ever done any cross-compilation ? If not start cross-compiling a few simple application and then testing them on the target system.
  10. Importing .OBJ model to OpenGL

    So today you can read .obj, and if you have to support another format? Apart from being a lesson in how to do this on your own, why would you want this responsibility. If its education then by all means I recommend doing it, other than that find the right tool for the job. What exactly was the issue with Assimp? It could have simply being the tutorial you used and not Assimp itself. You should be able to just grab the Assimp documentation and use the library to do whatever you need which is just the basic loading. I've been using Assimp to load models for a few years now with no problem. Also be aware that Assimp does NOT load textures you will also need another library for that or roll your own. As for organization, offering suggestion without use case makes it hard to offer help. It would definitely help to abstract a mesh and all its contents. But again, use case would dictate organization.
  11. What Hodgman said. Plus there is the tendency to write GPU shader code as if its equivalent to CPU. Though programmable, GPU architecture and programming paradigm have subtle differences than CPU. If you think about this, crashing aside...why would you want to write code like what was posted, keeping in mind that this code will be execute per fragment...thus as the resolution of your render target increase, so does the cost of this shader.
  12. What am I not understanding about programming?

    The question you really need to ask yourself is do you really understand the fundamentals?...and by fundamentals I mean the very basics, variable type, function, function params vs arguments, loops among other things. If you really do, then simple text base programs that accept input and print something out to the console etc should be no worries. Then work your way up to more complex problems. If you can't make it past the first step of the simple programs, then you are working up for disappoint if you proceed to more complex problems. This should be an indication that you really have not grasp the basics. As other have mentioned before, you just don't get good at something by 1. giving up or 2. dreaming. you have to do it over and over until you've mastered it or at least at a level of comfort where you know it like the back of your hand.
  13. Normalizing normals in VS

    How could it not be correct considering that your VS output are interpolated so each fragment will received this interpolated value. If you are transforming your normals with matrices having non-uniform scales or any scales for that matter is asking for trouble..ex..why doesn't my lighting looks correct. Rotation should be the only thing affecting your normals.
  14. Another thing to keep in mind is do NOT expect the same level of performance for each OpenGL implementation, but it looks like you are on the right track as you did mention testing on different GPUs. Also drivers may have bugs here and there, but they are most likely tested more than your code. This leads back to what Matias mentioned above. There is the possibility that a fast path on Nvidia/Intel may not be the same on AMD. In fact from my experience I would use AMD as the base-line when developing when you can as there adhere more to the spec than Nvidia. Long story short, you should take a deep look at your code using some form of profiling tool before you can conclude/assume its a driver bug.
  15. Any hope for Indie developers?

    There is always hope... Given most of the post I see on this and other forum especially in the technical dept that usually goes.." I'm working on this game...but how do I do XYZ " where XYZ are sometimes fundamental concepts that should have been acquired before even going down that road, I'm going to go off on a limb and say there are plenty people out there that have in their head some "get rich quick" indie scheme. Not saying this is your approach as no knowledge of your intent, but if you enter the field with some "get rich quick" scheme in mind, then prepare to be disappointed. Lets say you make a game and its not doing so well sales wise, we all want to recoup our development cost, but at same time, you have to be realistic or set realistic goals. If you are going to dwell on sale figures vs making the games you love, then to answer your question, all hope is lost. Whenever becomes more about money rather than passion, then all hope is lost...my 2cents..