Forráskód Böngészése

Merge branch 'master' of github.com:bkaradzic/bgfx

bkaradzic 12 éve
szülő
commit
e50f0b11dc
4 módosított fájl, 19 hozzáadás és 19 törlés
  1. 5 5
      include/bgfx.h
  2. 3 3
      src/bgfx.cpp
  3. 8 8
      src/renderer_gl.cpp
  4. 3 3
      src/renderer_gl.h

+ 5 - 5
include/bgfx.h

@@ -490,17 +490,17 @@ namespace bgfx
 		/// Renderer backend type.
 		RendererType::Enum rendererType;
 
-		/// Supported functionality, it includes emulated functionality. 
-		/// Checking supported and not emulated will give functionality 
+		/// Supported functionality, it includes emulated functionality.
+		/// Checking supported and not emulated will give functionality
 		/// natively supported by renderer.
 		uint64_t supported;
 
-		/// Emulated functionality. For example some texture compression 
+		/// Emulated functionality. For example some texture compression
 		/// modes are not natively supported by all renderers. The library
 		/// internally decompresses texture into supported format.
 		uint64_t emulated;
 
-		uint16_t maxTextureSize; ///< Maximum texture size.		
+		uint16_t maxTextureSize; ///< Maximum texture size.
 		uint16_t maxDrawCalls;   ///< Maximum draw calls.
 	};
 
@@ -669,7 +669,7 @@ namespace bgfx
 	/// singlethreaded renderer this call does frame rendering.
 	///
 	/// @returns Current frame number. This might be used in conjunction with
-	///   double/multi buffering data outside the library and passing it to 
+	///   double/multi buffering data outside the library and passing it to
 	///   library via makeRef calls.
 	///
 	uint32_t frame();

+ 3 - 3
src/bgfx.cpp

@@ -34,7 +34,7 @@ namespace bgfx
 
 #elif BX_PLATFORM_OSX
 	void* g_bgfxNSWindow = NULL;
-	
+
 	void osxSetNSWindow(void* _window)
 	{
 		g_bgfxNSWindow = _window;
@@ -421,7 +421,7 @@ namespace bgfx
 						uint32_t fg = palette[attr&0xf];
 						uint32_t bg = palette[(attr>>4)&0xf];
 
-						Vertex vert[4] = 
+						Vertex vert[4] =
 						{
 							{ (xx  )*8.0f, (yy  )*fontHeight, 0.0f, fg, bg, (ch  )*8.0f*texelWidth - texelWidthHalf, utop },
 							{ (xx+1)*8.0f, (yy  )*fontHeight, 0.0f, fg, bg, (ch+1)*8.0f*texelWidth - texelWidthHalf, utop },
@@ -616,7 +616,7 @@ namespace bgfx
 				m_sortValues[m_num] = m_numRenderStates;
 				++m_num;
 			}
-			
+
 			m_state.m_constEnd = m_constantBuffer->getPos();
 			m_state.m_flags |= m_flags;
 			m_renderState[m_numRenderStates] = m_state;

+ 8 - 8
src/renderer_gl.cpp

@@ -764,7 +764,7 @@ namespace bgfx
 					GLenum minFilter = s_textureFilterMin[min][1 < _numMips ? mip+1 : 0];
 					GL_CHECK(glSamplerParameteri(sampler, GL_TEXTURE_MAG_FILTER, s_textureFilterMag[mag]) );
 					GL_CHECK(glSamplerParameteri(sampler, GL_TEXTURE_MIN_FILTER, minFilter) );
-					if (0 != (_flags & (BGFX_TEXTURE_MIN_ANISOTROPIC|BGFX_TEXTURE_MAG_ANISOTROPIC) ) 
+					if (0 != (_flags & (BGFX_TEXTURE_MIN_ANISOTROPIC|BGFX_TEXTURE_MAG_ANISOTROPIC) )
 					&&  0.0f < m_maxAnisotropy)
 					{
 						GL_CHECK(glSamplerParameterf(sampler, GL_TEXTURE_MAX_ANISOTROPY_EXT, m_maxAnisotropy) );
@@ -1783,7 +1783,7 @@ namespace bgfx
 			GLenum minFilter = s_textureFilterMin[min][1 < numMips ? mip+1 : 0];
 			GL_CHECK(glTexParameteri(target, GL_TEXTURE_MAG_FILTER, s_textureFilterMag[mag]) );
 			GL_CHECK(glTexParameteri(target, GL_TEXTURE_MIN_FILTER, minFilter) );
-			if (0 != (flags & (BGFX_TEXTURE_MIN_ANISOTROPIC|BGFX_TEXTURE_MAG_ANISOTROPIC) ) 
+			if (0 != (flags & (BGFX_TEXTURE_MIN_ANISOTROPIC|BGFX_TEXTURE_MAG_ANISOTROPIC) )
 			&&  0.0f < s_renderCtx->m_maxAnisotropy)
 			{
 				GL_CHECK(glTexParameterf(target, GL_TEXTURE_MAX_ANISOTROPY_EXT, s_renderCtx->m_maxAnisotropy) );
@@ -2054,7 +2054,7 @@ namespace bgfx
 				, GL_RENDERBUFFER
 				, m_colorRbo
 				) );
- 
+
 			GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, m_fbo[1]) );
 		}
 		else
@@ -2231,7 +2231,7 @@ namespace bgfx
 				GL_CHECK(glUniform##_glsuffix(loc, num, value) ); \
 			} \
 			break;
-			
+
 #define CASE_IMPLEMENT_UNIFORM_T(_uniform, _glsuffix, _dxsuffix, _type) \
 		case UniformType::_uniform: \
 			{ \
@@ -2595,7 +2595,7 @@ namespace bgfx
 				{
 					len = bx::uint32_min(sizeof(name), (uint32_t)strlen(pos) );
 				}
-				
+
 				strncpy(name, pos, len);
 				name[len] = '\0';
 
@@ -2799,7 +2799,7 @@ namespace bgfx
 			s_textureFormat[TextureFormat::BGRA8].m_fmt = GL_BGRA_EXT;
 
 			// Mixing GLES and GL extensions here. OpenGL EXT_bgra wants
-			// format to be BGRA but internal format to stay RGBA, but 
+			// format to be BGRA but internal format to stay RGBA, but
 			// EXT_texture_format_BGRA8888 wants both format and internal
 			// format to be BGRA.
 			//
@@ -3369,8 +3369,8 @@ namespace bgfx
 					programIdx = key.m_program;
 					GLuint id = invalidHandle == programIdx ? 0 : s_renderCtx->m_program[programIdx].m_id;
 					GL_CHECK(glUseProgram(id) );
-					programChanged = 
-						constantsChanged = 
+					programChanged =
+						constantsChanged =
 						bindAttribs = true;
 				}
 

+ 3 - 3
src/renderer_gl.h

@@ -356,7 +356,7 @@ namespace bgfx
 	void dumpExtensions(const char* _extensions);
 
 	class ConstantBuffer;
-	
+
 	class VaoStateCache
 	{
 	public:
@@ -525,7 +525,7 @@ namespace bgfx
 		uint32_t m_size;
 		VaoCacheRef m_vcref;
 	};
-	
+
 	struct VertexBuffer
 	{
 		void create(uint32_t _size, void* _data, VertexDeclHandle _declHandle)
@@ -660,7 +660,7 @@ namespace bgfx
 		{
 			m_constantBuffer->commit();
 		}
- 
+
 		void add(uint32_t _hash)
 		{
 			m_vcref.add(_hash);