• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ BX_UNUSED函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中BX_UNUSED函数的典型用法代码示例。如果您正苦于以下问题:C++ BX_UNUSED函数的具体用法?C++ BX_UNUSED怎么用?C++ BX_UNUSED使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了BX_UNUSED函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: setMouseLock

	void setMouseLock(WindowHandle _handle, bool _lock)
	{
		BX_UNUSED(_handle, _lock);
	}
开发者ID:Ashura-X,项目名称:mame,代码行数:4,代码来源:entry_noop.cpp


示例2: fscanf

extern "C" int fscanf(FILE* _stream, const char* _format, ...)
{
	BX_UNUSED(_stream, _format);
	return -1;
}
开发者ID:ImJezze,项目名称:mame,代码行数:5,代码来源:crtnone.cpp


示例3: fclose

extern "C" int fclose(FILE* _stream)
{
	BX_UNUSED(_stream);
	return -1;
}
开发者ID:ImJezze,项目名称:mame,代码行数:5,代码来源:crtnone.cpp


示例4: closedir

extern "C" int closedir (struct DIR* dirp)
{
	BX_UNUSED(dirp);
	return 0;
}
开发者ID:ImJezze,项目名称:mame,代码行数:5,代码来源:crtnone.cpp


示例5: vfprintf

extern "C" int vfprintf(FILE* _stream, const char* _format, va_list _argList)
{
	BX_UNUSED(_stream, _format, _argList);
	return -1;
}
开发者ID:ImJezze,项目名称:mame,代码行数:5,代码来源:crtnone.cpp


示例6: acosf

extern "C" float acosf(float _x)
{
	BX_UNUSED(_x);
	return 0.0f;
}
开发者ID:ImJezze,项目名称:mame,代码行数:5,代码来源:crtnone.cpp


示例7: opendir

extern "C" struct DIR* opendir(const char* dirname)
{
	BX_UNUSED(dirname);
	return NULL;
}
开发者ID:ImJezze,项目名称:mame,代码行数:5,代码来源:crtnone.cpp


示例8: ldexp

extern "C" double ldexp(double _x, int _exp)
{
	BX_UNUSED(_x, _exp);
	return 0.0;
}
开发者ID:ImJezze,项目名称:mame,代码行数:5,代码来源:crtnone.cpp


示例9: log10f

extern "C" float log10f(float _x)
{
	BX_UNUSED(_x);
	return 0.0f;
}
开发者ID:ImJezze,项目名称:mame,代码行数:5,代码来源:crtnone.cpp


示例10: strdup

extern "C" char* strdup(const char* _src)
{
	BX_UNUSED(_src);
	return NULL;
}
开发者ID:ImJezze,项目名称:mame,代码行数:5,代码来源:crtnone.cpp


示例11: strtol

extern "C" long int strtol(const char* _str, char** _end, int _base)
{
	BX_UNUSED(_str, _end, _base);
	return -1;
}
开发者ID:ImJezze,项目名称:mame,代码行数:5,代码来源:crtnone.cpp


示例12: mbstowcs

extern "C" size_t mbstowcs(wchar_t* _dst, const char* _src, size_t _max)
{
	BX_UNUSED(_dst, _src, _max);
	return 0;
}
开发者ID:ImJezze,项目名称:mame,代码行数:5,代码来源:crtnone.cpp


示例13: objToBin

uint32_t objToBin(const uint8_t* _objData
                  , bx::WriterSeekerI* _writer
                  , uint32_t _packUv
                  , uint32_t _packNormal
                  , bool _ccw
                  , bool _flipV
                  , bool _hasTangent
                  , float _scale
                 )
{
    int64_t parseElapsed = -bx::getHPCounter();
    int64_t triReorderElapsed = 0;

    const int64_t begin = _writer->seek();

    Vector3Array positions;
    Vector3Array normals;
    Vector3Array texcoords;
    Index3Map indexMap;
    TriangleArray triangles;
    BgfxGroupArray groups;

    uint32_t num = 0;

    MeshGroup group;
    group.m_startTriangle = 0;
    group.m_numTriangles = 0;
    group.m_name = "";
    group.m_material = "";

    char commandLine[2048];
    uint32_t len = sizeof(commandLine);
    int argc;
    char* argv[64];
    const char* next = (const char*)_objData;
    do
    {
        next = bx::tokenizeCommandLine(next, commandLine, len, argc, argv, BX_COUNTOF(argv), '\n');
        if (0 < argc)
        {
            if (0 == strcmp(argv[0], "#") )
            {
                if (2 < argc
                        &&  0 == strcmp(argv[2], "polygons") )
                {
                }
            }
            else if (0 == strcmp(argv[0], "f") )
            {
                Triangle triangle;
                memset(&triangle, 0, sizeof(Triangle) );

                const int numNormals   = (int)normals.size();
                const int numTexcoords = (int)texcoords.size();
                const int numPositions = (int)positions.size();
                for (uint32_t edge = 0, numEdges = argc-1; edge < numEdges; ++edge)
                {
                    Index3 index;
                    index.m_texcoord = 0;
                    index.m_normal = 0;
                    index.m_vertexIndex = -1;

                    char* vertex = argv[edge+1];
                    char* texcoord = strchr(vertex, '/');
                    if (NULL != texcoord)
                    {
                        *texcoord++ = '\0';

                        char* normal = strchr(texcoord, '/');
                        if (NULL != normal)
                        {
                            *normal++ = '\0';
                            const int nn = atoi(normal);
                            index.m_normal = (nn < 0) ? nn+numNormals : nn-1;
                        }

                        const int tex = atoi(texcoord);
                        index.m_texcoord = (tex < 0) ? tex+numTexcoords : tex-1;
                    }

                    const int pos = atoi(vertex);
                    index.m_position = (pos < 0) ? pos+numPositions : pos-1;

                    uint64_t hash0 = index.m_position;
                    uint64_t hash1 = uint64_t(index.m_texcoord)<<20;
                    uint64_t hash2 = uint64_t(index.m_normal)<<40;
                    uint64_t hash = hash0^hash1^hash2;

                    CS_STL::pair<Index3Map::iterator, bool> result = indexMap.insert(CS_STL::make_pair(hash, index) );
                    if (!result.second)
                    {
                        Index3& oldIndex = result.first->second;
                        BX_UNUSED(oldIndex);
                        BX_CHECK(oldIndex.m_position == index.m_position
                                 && oldIndex.m_texcoord == index.m_texcoord
                                 && oldIndex.m_normal == index.m_normal
                                 , "Hash collision!"
                                );
                    }

//.........这里部分代码省略.........
开发者ID:zhangf911,项目名称:cmftStudio,代码行数:101,代码来源:objtobin.cpp


示例14: BGFX_FATAL


//.........这里部分代码省略.........
				);

			HDC hdc = GetDC(hwnd);
			BGFX_FATAL(NULL != hdc, Fatal::UnableToInitialize, "GetDC failed!");

			HGLRC context = createContext(hdc);

			wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)wglGetProcAddress("wglGetExtensionsStringARB");
			wglChoosePixelFormatARB = (PFNWGLCHOOSEPIXELFORMATARBPROC)wglGetProcAddress("wglChoosePixelFormatARB");
			wglCreateContextAttribsARB = (PFNWGLCREATECONTEXTATTRIBSARBPROC)wglGetProcAddress("wglCreateContextAttribsARB");
			wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)wglGetProcAddress("wglSwapIntervalEXT");

			if (NULL != wglGetExtensionsStringARB)
			{
				const char* extensions = (const char*)wglGetExtensionsStringARB(hdc);
				BX_TRACE("WGL extensions:");
				dumpExtensions(extensions);
			}

			if (NULL != wglChoosePixelFormatARB
			&&  NULL != wglCreateContextAttribsARB)
			{
				int32_t attrs[] =
				{
					WGL_SAMPLE_BUFFERS_ARB, 0,
					WGL_SAMPLES_ARB, 0,
					WGL_SUPPORT_OPENGL_ARB, true,
					WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_ARB,
					WGL_DRAW_TO_WINDOW_ARB, true,
					WGL_DOUBLE_BUFFER_ARB, true,
					WGL_COLOR_BITS_ARB, 32,
					WGL_DEPTH_BITS_ARB, 24,
					WGL_STENCIL_BITS_ARB, 8,
					0
				};

				int result;
				int pixelFormat;
				uint32_t numFormats = 0;
				do 
				{
					result = wglChoosePixelFormatARB(m_hdc, attrs, NULL, 1, &pixelFormat, &numFormats);
					if (0 == result
						||  0 == numFormats)
					{
						attrs[3] >>= 1;
						attrs[1] = attrs[3] == 0 ? 0 : 1;
					}

				} while (0 == numFormats);

				PIXELFORMATDESCRIPTOR pfd;
				DescribePixelFormat(m_hdc, pixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);

				BX_TRACE("Pixel format:\n"
					"\tiPixelType %d\n"
					"\tcColorBits %d\n"
					"\tcAlphaBits %d\n"
					"\tcDepthBits %d\n"
					"\tcStencilBits %d\n"
					, pfd.iPixelType
					, pfd.cColorBits
					, pfd.cAlphaBits
					, pfd.cDepthBits
					, pfd.cStencilBits
					);

				result = SetPixelFormat(m_hdc, pixelFormat, &pfd);
				// When window is created by SDL and SDL_WINDOW_OPENGL is set SetPixelFormat
				// will fail. Just warn and continue. In case it failed for some other reason
				// create context will fail and it will error out there.
				BX_WARN(result, "SetPixelFormat failed (last err: 0x%08x)!", GetLastError() );

				uint32_t flags = BGFX_CONFIG_DEBUG ? WGL_CONTEXT_DEBUG_BIT_ARB : 0;
				BX_UNUSED(flags);
				int32_t contextAttrs[9] =
				{
#if BGFX_CONFIG_RENDERER_OPENGL >= 31
					WGL_CONTEXT_MAJOR_VERSION_ARB, 3,
					WGL_CONTEXT_MINOR_VERSION_ARB, 1,
					WGL_CONTEXT_FLAGS_ARB, flags,
					WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
#else
					WGL_CONTEXT_MAJOR_VERSION_ARB, 2,
					WGL_CONTEXT_MINOR_VERSION_ARB, 1,
					0, 0,
					0, 0,
#endif // BGFX_CONFIG_RENDERER_OPENGL >= 31
					0
				};

				m_context = wglCreateContextAttribsARB(m_hdc, 0, contextAttrs);
				if (NULL == m_context)
				{
					// nVidia doesn't like context profile mask for contexts below 3.2?
					contextAttrs[6] = WGL_CONTEXT_PROFILE_MASK_ARB == contextAttrs[6] ? 0 : contextAttrs[6];
					m_context = wglCreateContextAttribsARB(m_hdc, 0, contextAttrs);
				}
				BGFX_FATAL(NULL != m_context, Fatal::UnableToInitialize, "Failed to create context 0x%08x.", GetLastError() );
			}
开发者ID:Darksecond,项目名称:bgfx,代码行数:101,代码来源:glcontext_wgl.cpp


示例15: floorf

extern "C" float floorf(float _x)
{
	BX_UNUSED(_x);
	return 0.0f;
}
开发者ID:ImJezze,项目名称:mame,代码行数:5,代码来源:crtnone.cpp


示例16: pow

extern "C" double pow(double _x)
{
	BX_UNUSED(_x);
	return 0.0;
}
开发者ID:ImJezze,项目名称:mame,代码行数:5,代码来源:crtnone.cpp


示例17: floor

extern "C" double floor(double _x)
{
	BX_UNUSED(_x);
	return 0.0;
}
开发者ID:ImJezze,项目名称:mame,代码行数:5,代码来源:crtnone.cpp


示例18: tanf

extern "C" float tanf(float _x)
{
	BX_UNUSED(_x);
	return 0.0f;
}
开发者ID:ImJezze,项目名称:mame,代码行数:5,代码来源:crtnone.cpp


示例19: fmodf

extern "C" float fmodf(float _numer, float _denom)
{
	BX_UNUSED(_numer, _denom);
	return 0.0f;
}
开发者ID:ImJezze,项目名称:mame,代码行数:5,代码来源:crtnone.cpp


示例20: atan2f

extern "C" float atan2f(float _y, float _x)
{
	BX_UNUSED(_y, _x);
	return 0.0f;
}
开发者ID:ImJezze,项目名称:mame,代码行数:5,代码来源:crtnone.cpp



注:本文中的BX_UNUSED函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ BYTE0函数代码示例发布时间:2022-05-30
下一篇:
C++ BX_ERROR函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap