Go over the points in your grid, calculate distance from center point of circle to that point. If it's less than the radius of the circle, then do point.z+=(1-distance_away/radius)*height_change to get a gradient
- Viewing Profile: Reputation: zacaj
Community Stats
- Group Members
- Active Posts 420
- Profile Views 2,813
- Member Title Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Male
-
Location
NY
User Tools
Latest Visitors
#5065142 Probably a stupid question...
Posted by zacaj
on 26 May 2013 - 10:17 PM
#5056192 Need advice for iOS game programming
Posted by zacaj
on 23 April 2013 - 03:39 PM
Check out Unity 3D
#5049794 How do I handle lots of textures
Posted by zacaj
on 03 April 2013 - 07:41 PM
256MB is a very conservative estimate. Any recent computer is going to have at least 1GB. Check out the Steam Hardware survey at http://store.steampowered.com/hwsurvey under VRAM. 99% of people have at least 256MB, 91% have 512MB. I'm not sure how high resolution textures you're using, but I doubt you'd even get close to the 256. 256MB gives you space for a 8192x8192 texture. If each tile is 16x16, that gives you enough space for 262144 tiles. If you've got more than 1000 different tiles loaded at once, you might want to reevaluate what you're doing.
When your video card runs out of space, the driver will just start using the regular system ram as "virtual memory", which I know causes major slowdowns, but I don't have any first hand experience there. Don't forget though, using it as virtual memory is going to be pretty much the same as you just uploading your textures from RAM each time they're used. I'd assume you can do a much better job of switching out the textures that are least likely to be used than the graphics card can, if by some strange turn of events that actually happens.
#5045693 Far Mesh Become Invisible
Posted by zacaj
on 22 March 2013 - 01:45 PM
#5045052 Check video ram usage
Posted by zacaj
on 20 March 2013 - 05:17 PM
If you're using GL2+, just do this:
int getFreeVideoMemory()
{
int availableKB[4];
#ifdef GL234
if(GLEW_NVX_gpu_memory_info)
glGetIntegerv(GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX,&availableKB[0]);
int temp=GLEW_ATI_meminfo;
if(GLEW_ATI_meminfo)
glGetIntegerv(GL_TEXTURE_FREE_MEMORY_ATI,availableKB);
return availableKB[0];
#endif
return 0;
}
#5038867 Is a mesh a 3d model?
Posted by zacaj
on 03 March 2013 - 04:50 PM
Often I've also seen models that contain multiple meshes
#5027742 Anyone here a self-taught graphics programmer?
Posted by zacaj
on 31 January 2013 - 10:43 PM
When I was fourteen I spent a year and a half writing my own software renderer from random tidbits of information I found around the internet, a lot of trial and error, and plenty of working out how different math worked on post it notes. Once you've written a software renderer regular graphics programming is a lot easier to understand.
#5023694 Killing AI
Posted by zacaj
on 20 January 2013 - 06:29 PM
Did you note the i--?
#5023637 Killing AI
Posted by zacaj
on 20 January 2013 - 03:43 PM
Try using
delete zombie[i];
zombie.clear( zombie.begin() + i-- );
#5020744 Can someone mentor me?
Posted by zacaj
on 12 January 2013 - 10:42 AM
If you're having problems understanding where stuff is actually used, your best bet is to actually try to program something real and see where they end up getting used. That said, I'm up for answering some questions. Feel free to PM/email/tweet/whatever me.
#5010734 Design a render queue
Posted by zacaj
on 14 December 2012 - 02:59 PM
#5009578 unique_ptr
Posted by zacaj
on 11 December 2012 - 05:03 PM
4. In this case shared_ptr would be a better bet. However, in general you should have some policy for each class regarding what 'rights' they have regarding the pointer you give them. If you're giving it to another class you should know whether that class is ever going to delete it or anything, and with any of your own classes that will be accessed by another person's code you should also make sure they know if you're going to be doing anything with their pointers. Generally I try to always have a policy regarding any place that a pointer is in my code about who 'owns' the pointer; whether it's the class that contains (say) the array the pointer is in, the function that created the pointer and added it to the array, etc.
#5009558 unique_ptr
Posted by zacaj
on 11 December 2012 - 04:06 PM
3. because then some other function can't get a copy of your pointer and then have an invalid pointer after your class is destructed
#4998307 Implementing objects with short life time but that have to be created frequently
Posted by zacaj
on 06 November 2012 - 08:21 PM
#4997349 What key is this ~ in XNA Keys
Posted by zacaj
on 04 November 2012 - 05:58 PM
- Home
- » Viewing Profile: Reputation: zacaj

Find content