Jump to content

Ed Welch

Member Since 08 Jun 2009
Offline Last Active May 02 2017 05:11 PM

Posts I've Made

In Topic: embedding vimeo in blog posts

23 February 2017 - 03:50 AM

Alright. I guess I'll just have to live with it then ;)


In Topic: reducing draw calls by batching

15 December 2016 - 08:02 AM

You don't have to regenerate your vertex data as the camera moves around; only the index data has to dynamically respond to the culling results.

That's a very clever idea. Thanks, Hodgman!


In Topic: reducing draw calls by batching

14 December 2016 - 01:12 PM

It's normal to use a zone manager for this, so only when a player enters the zone do you check the LODs and batches. Maybe look into Unity's batching and see how it works. There is a lot about Unity that I don't like but it does have one of the best batch managers that I have ever seen.

Yeah, what I have implemented seems to be the same as Unity's "dynamic batching". I'm not sure what Unity "static batching" is though.

Well, that's good to know anyway. Thanks for the answer.


In Topic: Best Way To Comment Code Without Cluttering

03 August 2016 - 06:35 PM

I do minimal commenting like youself. I found too much comments makes the code harder to read. I found also any workaround code for tricky bugs is *very* hard to understand later on after you've forgotten about the bug, so I make sure I document those bits very well.


In Topic: "render To Texture" With Mipmaps On Opengl Es 2.0

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