Jump to content

  • Log In with Google      Sign In   
  • Create Account


sevenfold1

Member Since 20 Jun 2011
Offline Last Active Apr 24 2014 08:06 AM
-----

#4881618 Apples new patent (what a joke)

Posted by sevenfold1 on 07 November 2011 - 09:11 PM

<br /><a href='http://www.tomsguide.com/us/Slide-to-Unlock-Apple-Patent-Android-unlock-Patent-infringement,news-12998.html' class='bbc_url' title='External link' rel='nofollow external'>http://www.tomsguide...news-12998.html</a><br /><br />Im suprised graphics techniques have not been patented yet. I mean after this, then what other hope do we have. The progress of man kind is going to hell.<br />

<br /><br /><br />

Wow, just one more reason why the rich are getting richer and the poor are getting poorer in this country.
I'm sure one can blame a bloated patent system with killing the economy at some point.
The rich and powerful have nothing better to do except stifle and hinder advancements in technology

Someone file a patent, and lets it sit and collect dust in some file cabinet for 20 years. They have no intention of
improving their so-called invention. It's just leverage to make the strong stronger, and the weak weaker.

Whatever happened to the day when people filed patents, they did it so they could have the time needed to market a real invention?


#4831153 mipmap dx11

Posted by sevenfold1 on 04 July 2011 - 03:34 PM

<br />If you read the documentation for ID3D11Device::CreateTexture2D carefully, you'll notice that it says this for pInitialData:<br /><br />&quot;Pointer to an array of subresource descriptions; one for  each subresource&quot;<br /><br />So if you create a texture with N mip levels, you must pass an array of N D3D11_SUBRESOURCE_DATA's each containing the data for a mip level. The same goes for texture arrays. Note that you're not &quot;creating the memory&quot; for those mip levels, you're just passing in the data to initialize the mip levels with. <br /><br />Calculating the number of mip levels is really easy:<br />

<br />
UINT GetNumMipLevels(UINT width, UINT height)<br />
{<br />
&nbsp;&nbsp;&nbsp; UINT numLevels = 1;<br />
&nbsp;&nbsp;&nbsp; while(width &gt; 1 &amp;&amp; height &gt; 1)<br />
&nbsp;&nbsp;&nbsp; {<br />
    &nbsp;&nbsp;&nbsp; width = max(width / 2, 1);<br />
    &nbsp;&nbsp;&nbsp; height = max(height / 2, 1);<br />
    &nbsp;&nbsp;&nbsp; ++numLevels;<br />
&nbsp;&nbsp;&nbsp; }<br />
<br />
&nbsp;&nbsp;&nbsp; return numLevels;<br />
}<br />
<br />

<br /><br /><br />

I think DX creates mipmap levels down to 1x1. It doesn't stop until both dimensions are 1x1.

int GetNumMipLevels(int width, int height)
{
	int numLevels = 1;
	while((width > 1) || (height > 1))
	{
    	width = max(width / 2, 1);
    	height = max(height / 2, 1);
    	++numLevels;
	}

	return numLevels;
}



PARTNERS