Jump to content

  • Log In with Google      Sign In   
  • Create Account

Ed Welch

Member Since 08 Jun 2009
Offline Last Active Jul 28 2016 03:42 PM

#5301512 "render To Texture" With Mipmaps On Opengl Es 2.0

Posted by Ed Welch on 20 July 2016 - 05:50 AM

I figured out my mistake. I was calling  glGenerateMipmap after creation of the texture and then once again after I render to the texture, but I didn't release that I had to unbind the frame buffer first and then call glBindTexture:

// after rendering to texture
glBindFramebuffer(GL_FRAMEBUFFER, m_origFrameBuffer);
	glBindTexture(GL_TEXTURE_2D, m_textureID);
	glGenerateMipmap(GL_TEXTURE_2D);

Thanks for the help anyways




#5256661 The wrong way to count lines of code

Posted by Ed Welch on 11 October 2015 - 06:26 AM

Off by a factor of 2 is within the ballpark for the usefulness of LOC.
1M LOC and 2M LOC are both "big".
1K and 2K are both "small".

 

Yes, but being off by a factor of 1.1 is better than being off by a factor of 2.




#5256566 The wrong way to count lines of code

Posted by Ed Welch on 10 October 2015 - 01:20 PM

 

If you count each semi-colon as a line of code then you get the same number no matter what your style code is


Macros, code generation, abuse of the comma operator, use of temporaries, etc. all affect the number of the semi-colons in code. In some cases, more semi-colons means _less_ complex code (as you're breaking up complex expressions into simpler ones). smile.png

 

The metric is used to get a ball park figure it doesn't need to be 100% accurate to be useful and those are just corner cases - they don't happen very often.

Also, is a relative comparison, take two big projects and the corner cases will work out to be roughly even. Even if it's 10% inaccurate it's good enough.




#5256560 The wrong way to count lines of code

Posted by Ed Welch on 10 October 2015 - 12:59 PM

 

Not really. It's a useful metric- at least it would be if they implemented it properly. Gives you a ball park figure of how complex a project is.


It really isn't. Brackets, for instance, are arbitrary. They make the code cleaner, but do not translate to machine code. There is quite a bit in all modern languages that exists for aesthetics and code organization that do not have any effect on the final machine code.

This:

if(...){}
is equal to this:

if(...)
{
}
Your code really isn't any more compact in the first case.

 

That's why I said if they implemented it properly.

If you count each semi-colon as a line of code then you get the same number no matter what your style code is




#5256549 The wrong way to count lines of code

Posted by Ed Welch on 10 October 2015 - 11:42 AM

Not really. It's a useful metric- at least it would be if they implemented it properly. Gives you a ball park figure of how complex a project is.




#5254382 Tool to measure memory fragmentation

Posted by Ed Welch on 28 September 2015 - 09:01 AM

Does anyone know of a tool to display the memory layout of a c++ program?

Memory fragmentation is a problem that can occur in some long lived apps that delete and assign memory a lot. The problem is the developer can never know that he even has a problem unless there is a tool that displays the heap layout. It would need a graphic display of the entire heap and the "holes" in the memory that aren't getting reallocated.




#5250416 temporarily exclude a rigidBody from ray testing

Posted by Ed Welch on 03 September 2015 - 08:53 AM

Just use non-default ray intersection callback and filter out your body manually.

That is, make derived class from btCollisionWorld::ClosestRayResultCallback and override virtual bool needsCollision(btBroadphaseProxy* proxy0) const.

http://bulletphysics.org/Bullet/BulletFull/btCollisionWorld_8h_source.html#l00231

Yeah, that seems to work. Thanks for the answer ;)

 

This is the code I used:

struct ExcludeRayResultCallback : public btCollisionWorld::ClosestRayResultCallback 
{
	ExcludeRayResultCallback(const btVector3& rayFromWorld,const btVector3&	rayToWorld)
		: btCollisionWorld::ClosestRayResultCallback(rayFromWorld, rayToWorld)
	{
		m_pExlude = NULL;
	}
		
	virtual bool needsCollision(btBroadphaseProxy* proxy0) const
	{
		btCollisionObject* pCollisionObject = (btCollisionObject*)proxy0->m_clientObject;
		assert(pCollisionObject->getInternalType() == btCollisionObject::CO_COLLISION_OBJECT ||
			pCollisionObject->getInternalType() == btCollisionObject::CO_RIGID_BODY);
		return pCollisionObject->getUserPointer() != m_pExlude;
	}
	void* m_pExlude;
};




#5232832 Vulkan is Next-Gen OpenGL

Posted by Ed Welch on 04 June 2015 - 02:53 PM

Imagination Tech have already implemented an alpha version of Vulkan, there is an interesting blog entry here:

http://blog.imgtec.com/powervr/trying-out-the-new-vulkan-graphics-api-on-powervr-gpus




#5228187 More variance with larger dice..

Posted by Ed Welch on 09 May 2015 - 06:56 PM

Actually, this video explains why there *is* something wrong with rand:

http://channel9.msdn.com/Events/GoingNative/2013/rand-Considered-Harmful

In a nutshell: use mt19937, uniform_int_distribution and uniform_real_distribution. They are available in boost if you don't use c++11.




#5218091 Has royalty share ever worked?

Posted by Ed Welch on 21 March 2015 - 11:54 AM

Thanks for the answers guys - the advice is quite useful.

I asked the question because I was toying with the idea of royalty share, but now I think I will approach the problem a different way.




#5217676 Has royalty share ever worked?

Posted by Ed Welch on 19 March 2015 - 11:55 AM

 

Wow, that's quite an amazing game for an Indie studio

There's a big difference between "indies" (independent games studios), and "indies" (groups of random people on the internet) biggrin.png

 

If there's an IGDA meetup in your area, go and see if you can meet these kinds of actual developers.

I'm lucky enough to share an office with something like 20 other indie companies, plus there's a hugely active IGDA group in my city (hundreds of people)... so in my immediate network I've met indies working on an MMO exploration game, a whole catalogue of choose your own adventure books, an arcade weapons racer, a car/tycoon simulator, a speed-run 3D platformer, a space trading MMO, amazingly successful mobile games, successful lone wolves, Syndicate-esque top-down tactics, a "minecraft-clone" shooter, co-developers of a dinosaur FPS, a quake-style arena FPS, and surely more I've forgotten to remember laugh.png

Many of them are fairly recent start-ups with fairly small teams, which means there's a high likelyhood that the core team members on many of these kinds of projects are receiving shares in the company rather than actual money to begin with.

 

Thanks for the advice, Hodgman!

Yeah, I get the feeling that most of the successful collaboration projects were ones where the people involved already knew each other.




#5217628 Has royalty share ever worked?

Posted by Ed Welch on 19 March 2015 - 07:23 AM

The groups that appear on forums with no experience at all, overly vague yet massive ideas, usually no talent, no idea of the legal/business side of things... that's a complete mess that I'd advise people to steer clear of.

As for successes, there's a studio in the same building as me, League of Geeks, who have built their game using a well defined profit-sharing system. The core of their team are actual development veterans coming from other studios, they've sat down ahead of time and worked out all the legals of doing a profit sharing system, and then they've planned out all the work involved and assigned 'points' to different tasks. IIRC, when they're finished, they'll add up all the points, and then everyone gets a slice of the profits depending on how many points they've earned.

They're only in early access now, but they're looking on track to actually finish their game. At that point, I think they're planning to release their "point system" for other devs to copy if they like.

Wow, that's quite an amazing game for an Indie studio




#5209699 Next-Gen OpenGL To Be Shown Off Next Month

Posted by Ed Welch on 09 February 2015 - 04:57 PM


The free upgrade to Win10 kinda solves this problem anyway.

Beware, Windows 10 is only free if you upgrade an existing PC from Win7/8. If you buy a new PC it's a subscription service.




#5158086 Metal API .... whait what

Posted by Ed Welch on 04 June 2014 - 07:29 AM

 

 

Metal's C++ based shader language is an interesting idea. Generics/templates might be fun.

I don't think the shader langauge is c++ based. I never seen a double square bracket in c++. Looks more like object c to me

 

Like these? http://en.wikipedia.org/wiki/C++11#Attributes

 

Ok, I stand corrected :P




#5158071 Metal API .... whait what

Posted by Ed Welch on 04 June 2014 - 05:42 AM

Metal's C++ based shader language is an interesting idea. Generics/templates might be fun.

I don't think the shader langauge is c++ based. I never seen a double square bracket in c++. Looks more like object c to me






PARTNERS