当前位置: 首页>>代码示例>>C++>>正文


C++ StrCRef类代码示例

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


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

示例1: CreateBufferFromFile

 /**
  *  @see CreateBufferHelloWorld
  *
  *  @alsymbols
  *  @alutfunref{CreateBufferFromFile}
  */
 Buffer CreateBufferFromFile(const StrCRef& file_path) const {
     assert(_initialized);
     ALuint name = OALPLUS_ALUTFUNC(CreateBufferFromFile)(
       file_path.is_nts() ? file_path.c_str() : file_path.str().c_str());
     OALPLUS_VERIFY_SIMPLE_ALUT(CreateBufferFromFile);
     return Buffer::FromRawName(BufferName(name));
 }
开发者ID:matus-chochlik,项目名称:oglplus,代码行数:13,代码来源:alut.hpp

示例2: Delete

	/// Deletes the value stored under @p name
	static void Delete(const StrCRef& name)
	{
		OGLPLUS_GLFUNC(DeleteNamedStringARB)(
			GLint(name.size()),
			name.c_str()
		);
		OGLPLUS_CHECK_SIMPLE(DeleteNamedStringARB);
	}
开发者ID:Extrunder,项目名称:oglplus,代码行数:9,代码来源:named_string.hpp

示例3: PushGroup

	/// Pushes a debug group
	static void PushGroup(
		DebugSource source,
		GLuint id,
		StrCRef message
	)
	{
		PushGroup(source, id, message.size(), message.c_str());
	}
开发者ID:AdamSimpson,项目名称:oglplus,代码行数:9,代码来源:KHR_debug.hpp

示例4: ObjectLabel

 static void ObjectLabel(const ObjectName<ObjTag>& object, StrCRef label) {
     OGLPLUS_GLFUNC(ObjectLabel)
     (GetGLName(object),
      ObjTypeOps<ObjTag>::ObjectType(),
      label.size(),
      label.c_str());
     OGLPLUS_VERIFY_SIMPLE(ObjectLabel);
 }
开发者ID:matus-chochlik,项目名称:oglplus,代码行数:8,代码来源:debug_output.hpp

示例5: IsA

	/// Checks if @p name is a stored string
	static bool IsA(const StrCRef& name)
	{
		GLboolean result = OGLPLUS_GLFUNC(IsNamedStringARB)(
			GLint(name.size()),
			name.c_str()
		);
		OGLPLUS_CHECK_SIMPLE(IsNamedStringARB);
		return result == GL_TRUE;
	}
开发者ID:Extrunder,项目名称:oglplus,代码行数:10,代码来源:named_string.hpp

示例6: MakeLayout

	Layout MakeLayout(const Font& font, StrCRef str)
	{
		CodePoints cps;
		UTF8ToCodePoints(str.begin(), str.size(), cps);

		Layout layout(MakeLayout(font, str.size()));
		layout.Set(cps.data(), cps.size());
		return std::move(layout);
	}
开发者ID:MaikKlein,项目名称:OglplusGen,代码行数:9,代码来源:pango_cairo.hpp

示例7: Type

	/// Gets the type of the named string stored under @p name
	static NamedStringType Type(const StrCRef& name)
	{
		GLint result = 0;
		OGLPLUS_GLFUNC(GetNamedStringivARB)(
			GLint(name.size()),
			name.c_str(),
			GL_NAMED_STRING_TYPE_ARB,
			&result
		);
		OGLPLUS_CHECK_SIMPLE(GetNamedStringivARB);
		return NamedStringType(GLenum(result));
	}
开发者ID:Extrunder,项目名称:oglplus,代码行数:13,代码来源:named_string.hpp

示例8: Group

		/**
		 *  @overload
		 *
		 *  @glsymbols
		 *  @glfunref{PushDebugGroup}
		 */
		Group(
			DebugOutputSource source,
			GLuint id,
			StrCRef message
		)
		{
			OGLPLUS_GLFUNC(PushDebugGroup)(
				GLenum(source),
				id,
				message.size(),
				message.begin()
			);
			OGLPLUS_VERIFY_SIMPLE(PushDebugGroup);
		}
开发者ID:r-lyeh-forks,项目名称:oglplus,代码行数:20,代码来源:debug_output.hpp

示例9: InsertMessage

 /// Inserts a new message into the debug output
 static void InsertMessage(
   DebugOutputARBSource source,
   DebugOutputARBType type,
   GLuint id,
   DebugOutputARBSeverity severity,
   StrCRef message) {
     OGLPLUS_GLFUNC(DebugMessageInsertARB)
     (GLenum(source),
      GLenum(type),
      id,
      GLenum(severity),
      GLsizei(message.size()),
      message.c_str());
     OGLPLUS_VERIFY_SIMPLE(DebugMessageInsertARB);
 }
开发者ID:matus-chochlik,项目名称:oglplus,代码行数:16,代码来源:ARB_debug_output.hpp

示例10: Set

	/// Store the @p value, of the specified @p type under @p name
	static void Set(
		NamedStringType type,
		const StrCRef& name,
		const StrCRef& value
	)
	{
		OGLPLUS_GLFUNC(NamedStringARB)(
			GLenum(type),
			GLint(name.size()),
			name.c_str(),
			GLint(value.size()),
			value.c_str()
		);
		OGLPLUS_CHECK_SIMPLE(NamedStringARB);
	}
开发者ID:Extrunder,项目名称:oglplus,代码行数:16,代码来源:named_string.hpp

示例11: GetLocation

	/** Finds the location / index of the fragment data specified
	 *  by @p identifier in a @p program. If active_only is true then
	 *  throws if no such fragment data output exists or if it is not active.
	 *
	 *  @glsymbols
	 *  @glfunref{GetFragDataLocation}
	 */
	static GLint GetLocation(
		ProgramName program,
		StrCRef identifier,
		bool active_only
	)
	{
		GLint result = OGLPLUS_GLFUNC(GetFragDataLocation)(
			GetGLName(program),
			identifier.c_str()
		);
		OGLPLUS_CHECK(
			GetFragDataLocation,
			ProgVarError,
			Program(program).
			Identifier(identifier)
		);
		OGLPLUS_HANDLE_ERROR_IF(
			active_only && (result < 0),
			GL_INVALID_OPERATION,
			MsgGettingInactive(),
			ProgVarError,
			Program(program).
			Identifier(identifier)
		);
		return result;
	}
开发者ID:AdamSimpson,项目名称:oglplus,代码行数:33,代码来源:frag_data.hpp

示例12: InsertMessage

	/// Inserts a new message into the debug output
	static void InsertMessage(
		DebugSource source,
		DebugType type,
		GLuint id,
		DebugSeverity severity,
		StrCRef message
	)
	{
		InsertMessage(
			source,
			type,
			id,
			severity,
			message.size(),
			message.c_str()
		);
	}
开发者ID:AdamSimpson,项目名称:oglplus,代码行数:18,代码来源:KHR_debug.hpp

示例13: BindLocation

 /**
  *  @see GetLocation
  *  @see QueryLocation
  *
  *  @glsymbols
  *  @glfunref{BindFragDataLocation}
  */
 static void BindLocation(
   ProgramName program, FragDataSlot location, StrCRef identifier) {
     OGLPLUS_GLFUNC(BindFragDataLocation)
     (GetGLName(program), GLuint(location), identifier.c_str());
     OGLPLUS_CHECK(
       BindFragDataLocation,
       ProgVarError,
       Program(program).Identifier(identifier).Index(GLuint(location)));
 }
开发者ID:matus-chochlik,项目名称:oglplus,代码行数:16,代码来源:frag_data.hpp

示例14: LoadMemoryFromFile

    /**
     *  @see LoadMemoryFromFileNormalized
     *  @see LoadMemoryHelloWorldNormalized
     *
     *  @alsymbols
     *  @alutfunref{LoadMemoryFromFile}
     */
    std::vector<ALubyte> LoadMemoryFromFile(
      const StrCRef& file_path,
      DataFormat* data_format,
      ALfloat* frequency) const {
        ::ALenum format = 0;
        ::ALsizei size = 0;
        ::ALvoid* ptr = OALPLUS_ALUTFUNC(LoadMemoryFromFile)(
          file_path.is_nts() ? file_path.c_str() : file_path.str().c_str(),
          &format,
          &size,
          frequency);
        OALPLUS_CHECK_SIMPLE_ALUT(LoadMemoryFromFile);

        _free_on_scope_exit cleaner = {ptr};
        OALPLUS_FAKE_USE(cleaner);

        if(data_format)
            *data_format = DataFormat(format);

        return _load_memory(ptr, size);
    }
开发者ID:matus-chochlik,项目名称:oglplus,代码行数:28,代码来源:alut.hpp

示例15: Get

	/// Gets the value stored under @p name
	static String Get(const StrCRef& name)
	{
		GLint len = 0;
		OGLPLUS_GLFUNC(GetNamedStringivARB)(
			GLint(name.size()),
			name.c_str(),
			GL_NAMED_STRING_LENGTH_ARB,
			&len
		);
		OGLPLUS_CHECK_SIMPLE(GetNamedStringivARB);

		String result(len, '\0');
		OGLPLUS_GLFUNC(GetNamedStringARB)(
			GLint(name.size()),
			name.c_str(),
			len,
			&len,
			&result.front()
		);
		OGLPLUS_CHECK_SIMPLE(GetNamedStringARB);
		return std::move(result);

	}
开发者ID:Extrunder,项目名称:oglplus,代码行数:24,代码来源:named_string.hpp


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