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

C++ piglit_get_gl_enum_name函数代码示例

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

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



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

示例1: print_failing_case_full

/*
 * Prints the info of a failing case. If expected_value is smaller
 * that 0, it is not printed.
*/
void print_failing_case_full(const GLenum target, const GLenum internalformat,
                             const GLenum pname, GLint64 expected_value,
                             test_data *data)
{
        /* Knowing if it is supported is interesting in order to know
         * if the test is being too restrictive */
        bool supported = test_data_check_supported(data, target, internalformat);
        GLint64 current_value = test_data_value_at_index(data, 0);

        if (data->testing64) {
                fprintf(stderr,  "    64 bit failing case: ");
        } else {
                fprintf(stderr,  "    32 bit failing case: ");
        }

        fprintf(stderr, "pname = %s, "
                "target = %s, internalformat = %s, ",
                piglit_get_gl_enum_name(pname),
                piglit_get_gl_enum_name(target),
                piglit_get_gl_enum_name(internalformat));

        if (expected_value >= 0)
                fprintf(stderr, "expected value = (%" PRIi64 "), ",
                        expected_value);

        fprintf(stderr, "params[0] = (%" PRIi64 ",%s), "
                "supported=%i\n",
                current_value,
                piglit_get_gl_enum_name(current_value),
                supported);
}
开发者ID:matt-auld,项目名称:piglit,代码行数:35,代码来源:common.c


示例2: piglit_init

void
piglit_init(int argc, char **argv)
{
	bool pass = true;
	GLint64 data = -2;
	int i = 0;

	int stuff[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
	int size = sizeof(stuff);
	int offset = 1;
	int range = 5;

	GLuint buff = 0;
	glGenBuffers(1, &buff);

	for (i = 0; i < ARRAY_SIZE(buffers); i++) {
		glBindBuffer(buffers[i], buff);
		glBufferData(buffers[i], size, stuff, GL_STATIC_READ);
		glMapBufferRange(buffers[i], offset, range, GL_MAP_READ_BIT);

		glGetBufferParameteri64v(buffers[i], GL_BUFFER_SIZE, &data);
		if(data != size) {
			printf("GL_BUFFER_SIZE for %s expected %d, but %d "
				"was returned.\n",
				piglit_get_gl_enum_name(buffers[i]),
				size, (int)data);
			pass = false;
		}
		pass = piglit_check_gl_error(GL_NO_ERROR) && pass;

		glGetBufferParameteri64v(buffers[i], GL_BUFFER_MAP_OFFSET, &data);
		if(data != offset) {
			printf("GL_BUFFER_MAP_OFFSET for %s expected %d, but "
				"%d was returned.\n",
				piglit_get_gl_enum_name(buffers[i]),
				offset, (int)data);
			pass = false;
		}
		pass = piglit_check_gl_error(GL_NO_ERROR) && pass;

		glGetBufferParameteri64v(buffers[i], GL_BUFFER_MAP_LENGTH, &data);
		if(data != range) {
			printf("GL_BUFFER_MAP_LENGTH for %s expected %d, but "
				"%d was returned.\n",
				piglit_get_gl_enum_name(buffers[i]),
				range, (int)data);
			pass = false;
		}
		glUnmapBuffer(buffers[i]);
		pass = piglit_check_gl_error(GL_NO_ERROR) && pass;
	}

	pass = piglit_check_gl_error(GL_NO_ERROR) && pass;

	piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL);
}
开发者ID:BNieuwenhuizen,项目名称:piglit,代码行数:56,代码来源:get-buffer-parameter-i64v.c


示例3: CheckFramebufferStatus

bool
CheckFramebufferStatus(GLenum expected) {
	GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
	if(status != expected) {
		printf("Expected Framebuffer status '%s', got '%s'\n",
		       piglit_get_gl_enum_name(expected),
		       piglit_get_gl_enum_name(status));
		return false;
	}
	return true;
}
开发者ID:BNieuwenhuizen,项目名称:piglit,代码行数:11,代码来源:framebuffer-layer-complete.c


示例4: check_framebuffer_status

bool check_framebuffer_status(GLenum target, GLenum expected) {
	GLenum observed = glCheckFramebufferStatus(target);
	if(expected != observed) {
		printf("Unexpected framebuffer status!\n"
		       "  Observed: %s\n  Expected: %s\n",
		       piglit_get_gl_enum_name(observed),
		       piglit_get_gl_enum_name(expected));
		return false;
	}
	return true;
}
开发者ID:BNieuwenhuizen,项目名称:piglit,代码行数:11,代码来源:framebuffertexture.c


示例5: piglit_init

void
piglit_init(int argc, char **argv)
{
	GLsync sync;
	GLenum ret1, ret2;
	bool pass = true;


	piglit_require_extension("GL_ARB_sync");

	glClear(GL_COLOR_BUFFER_BIT);
	sync = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
	ret1 = glClientWaitSync(sync, GL_SYNC_FLUSH_COMMANDS_BIT, 0);
	glFinish();
	ret2 = glClientWaitSync(sync, 0, 0);

	glDeleteSync(sync);

	if (ret1 != GL_TIMEOUT_EXPIRED &&
	    ret1 != GL_ALREADY_SIGNALED) {
		fprintf(stderr,
			"On first wait:\n"
			"  Expected GL_ALREADY_SIGNALED or GL_TIMEOUT_EXPIRED\n"
			"  Got %s\n",
			piglit_get_gl_enum_name(ret1));
		pass = false;
	}

	if (ret2 != GL_ALREADY_SIGNALED) {
		fprintf(stderr,
			"On repeated wait:\n"
			"  Expected GL_ALREADY_SIGNALED\n"
			"  Got %s\n",
			piglit_get_gl_enum_name(ret2));
		pass = false;
	}

	glClear(GL_COLOR_BUFFER_BIT);
	sync = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
	glFinish();
	ret1 = glClientWaitSync(sync, GL_SYNC_FLUSH_COMMANDS_BIT, 0);

	if (ret1 != GL_ALREADY_SIGNALED) {
		fprintf(stderr,
			"On wait after a finish:\n"
			"  Expected GL_ALREADY_SIGNALED\n"
			"  Got %s\n",
			piglit_get_gl_enum_name(ret1));
		pass = false;
	}

	piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL);
}
开发者ID:blaztinn,项目名称:piglit,代码行数:53,代码来源:timeout-zero.c


示例6: piglit_init

void
piglit_init(int argc, char **argv)
{
	int i;
	bool pass = true;
	GLenum fbStatus;
	GLuint fbo, texture;
	GLint attachmentLayeredStatus;

	for(i = 0; i < ARRAY_SIZE(textureType); i++) {
		glGenFramebuffers(1, &fbo);
		glBindFramebuffer(GL_FRAMEBUFFER, fbo);

		texture = create_bind_texture(textureType[i]);
		glFramebufferTexture(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
				     texture, 0);

		if(!piglit_check_gl_error(GL_NO_ERROR)) {
			printf("Error creating texture and framebuffer setup\n"
			       "texture type: %s\n",
			       piglit_get_gl_enum_name(textureType[i]));
			glDeleteFramebuffers(1, &fbo);
			glDeleteTextures(1, &texture);
			piglit_report_result(PIGLIT_FAIL);
		}

		fbStatus = glCheckFramebufferStatus(GL_FRAMEBUFFER);
		if(fbStatus != GL_FRAMEBUFFER_COMPLETE) {
			printf("Framebuffer Status: %s\n",
				piglit_get_gl_enum_name(fbStatus));
			glDeleteFramebuffers(1, &fbo);
			glDeleteTextures(1, &texture);
			piglit_report_result(PIGLIT_FAIL);
		}

		/* Check if the attachment is layered */
		glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER,
						      GL_COLOR_ATTACHMENT0,
						      GL_FRAMEBUFFER_ATTACHMENT_LAYERED,
						      &attachmentLayeredStatus);

		pass = piglit_check_gl_error(GL_NO_ERROR) && pass;

		if(attachmentLayeredStatus != GL_TRUE) {
			pass = false;
		}

		glDeleteFramebuffers(1, &fbo);
		glDeleteTextures(1, &texture);
	}

	piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL);
}
开发者ID:BNieuwenhuizen,项目名称:piglit,代码行数:53,代码来源:framebuffer-layered-attachments.c


示例7: print_failing_details

/*
 * print_failing_case just prints out details of which case
 * failed. Here we are trying to add debug info about why the test
 * failed. It assumes that fails on getting the wrong value, not on
 * getting a opengl error
 */
static void
print_failing_details(GLenum target,
                      GLenum internalformat)
{
        if (target == GL_TEXTURE_BUFFER || is_multisample_target(target))
                fprintf(stderr, "\tTarget %s doesn't support multi-texel filtering\n",
                        piglit_get_gl_enum_name(target));

        if (is_integer_internalformat(internalformat))
                fprintf(stderr, "\tInteger internalformats like %s doesn't "
                        "support multi-texel filtering\n",
                        piglit_get_gl_enum_name(internalformat));

}
开发者ID:chemecse,项目名称:piglit,代码行数:20,代码来源:filter.c


示例8: test_combo

static GLboolean
test_combo(GLenum frontMode, GLenum backMode)
{
   GLenum frontPrim = get_prim_mode(frontMode);
   GLenum backPrim = get_prim_mode(backMode);
   GLboolean pass = GL_TRUE;
   GLenum expectedPrims[4];
   int i;

   /* Draw reference image */
   glClear(GL_COLOR_BUFFER_BIT);
   glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
   glDrawArrays(frontPrim, 0, 4);
   glDrawArrays(backPrim, 4, 4);
   glDrawArrays(frontPrim, 8, 4);
   glDrawArrays(backPrim, 12, 4);

   /* determine what kind of primitives were drawn */
   for (i = 0; i < 4; i++) {
      GLenum testMode = (i & 1) ? backMode : frontMode;

      expectedPrims[i] = identify_primitive(&Positions[4 * i], Colors[4 * i]);

      if (expectedPrims[i] != testMode) {
         /* we didn't get the expected reference primitive */
         fprintf(stderr,
                 "%s: reference drawing failed for frontPrim=%s, backPrim=%s\n",
                 TestName, piglit_get_gl_enum_name(frontMode),
		 piglit_get_gl_enum_name(backMode));
	 fprintf(stderr, "At position %d, found prim %s instead of %s\n",
		 i, piglit_get_gl_enum_name(expectedPrims[i]),
		 piglit_get_gl_enum_name(testMode));
         return GL_FALSE;
      }
   }

   /* Draw test image */
   glClear(GL_COLOR_BUFFER_BIT);
   glPolygonMode(GL_FRONT, frontMode);
   glPolygonMode(GL_BACK, backMode);
   glDrawArrays(GL_QUADS, 0, 16);

   /* check that these prims match the reference prims */
   for (i = 0; i < 4; i++) {
      GLenum prim = identify_primitive(&Positions[4 * i], Colors[4 * i]);
      if (prim != expectedPrims[i]) {
         fprintf(stderr, "%s: glPolygonMode(front=%s, back=%s) failed\n",
                 TestName, piglit_get_gl_enum_name(frontMode),
		 piglit_get_gl_enum_name(backMode));
	 fprintf(stderr, "At position %d, found prim %s instead of %s\n",
		 i, piglit_get_gl_enum_name(prim),
		 piglit_get_gl_enum_name(expectedPrims[i]));
         pass = GL_FALSE;
      }
   }

   piglit_present_results();

   return pass;
}
开发者ID:chemecse,项目名称:piglit,代码行数:60,代码来源:polygon-mode.c


示例9: test_format

PIGLIT_GL_TEST_CONFIG_END

static bool
test_format(const struct uniform_type *type)
{
	/* Using 140 to get unsigned ints. */
	const char *fs_template =
		"#version 140\n"
		"layout(std140) uniform ubo {\n"
		"	float align_test;\n"
		"	%s u;\n"
		"};\n"
		"\n"
		"void main() {\n"
		"	gl_FragColor = vec4(align_test + float(%s));\n"
		"}\n";
	char *fs_source;
	GLuint prog;
	const char *uniform_name = "u";
	GLuint uniform_index;
	GLint uniform_type;
	const char *deref;

	if (type->size == 4) {
		deref = "u";
	} else if (type->size <= 16) {
		deref = "u.x";
	} else {
		deref = "u[0].x";
	}

	asprintf(&fs_source, fs_template, type->type, deref);
	prog = piglit_build_simple_program(NULL, fs_source);
	free(fs_source);

	glGetUniformIndices(prog, 1, &uniform_name, &uniform_index);
	glGetActiveUniformsiv(prog, 1, &uniform_index,
			      GL_UNIFORM_TYPE, &uniform_type);

	glDeleteProgram(prog);

	printf("%-20s %20s %20s%s\n",
	       type->type,
	       piglit_get_gl_enum_name(uniform_type),
	       piglit_get_gl_enum_name(type->gl_type),
	       uniform_type == type->gl_type ? "" : " FAIL");

	return uniform_type == type->gl_type;
}
开发者ID:ThirteenFish,项目名称:piglit,代码行数:49,代码来源:getactiveuniformsiv-uniform-type.c


示例10: test_param

static bool
test_param(GLenum pname, GLenum expected_value, const char *const source)
{
	int v;

	glGetProgramiv(prog, pname, &v);
	if (v == expected_value)
		return true;

	fprintf(stderr, "%s is %s, expected %s for program \n%s\n",
		piglit_get_gl_enum_name(pname),
		piglit_get_gl_enum_name(v),
		piglit_get_gl_enum_name(expected_value), source);
	return false;
}
开发者ID:BNieuwenhuizen,项目名称:piglit,代码行数:15,代码来源:get-tes-params.c


示例11: check_format_array

/**
 * Iterate through array of texture formats and check if call to TextureView
 * causes the gl error  "err"
 */
static bool
check_format_array(const GLenum err, const unsigned int numFormats,
		   const GLenum *formatArray, const GLenum target,
		   const GLuint tex, const GLuint levels, const
		   GLuint layers)
{
	unsigned int i;
	bool pass = true;

	for (i = 0; i < numFormats; i++) {
		GLenum format;
		GLuint newTex;
		format = formatArray[i];
		if (format == 0)
			continue;
		glGenTextures(1, &newTex);
		glTextureView(newTex, target, tex, format, 0, levels, 0,
			      layers);
		glDeleteTextures(1, &newTex);
		if (!piglit_check_gl_error(err)) {
			printf("failing texView format=%s\n",
			       piglit_get_gl_enum_name(format));
			pass = false;
			break;
		}
	}
	return pass;
}
开发者ID:freedesktop-unofficial-mirror,项目名称:piglit-test,代码行数:32,代码来源:formats.c


示例12: piglit_init

void
piglit_init(int argc, char **argv)
{
	GLsync sync;
	GLenum ret1, ret2;

	piglit_require_extension("GL_ARB_sync");

	glClear(GL_COLOR_BUFFER_BIT);

	sync = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);

	ret1 = glClientWaitSync(sync, GL_SYNC_FLUSH_COMMANDS_BIT, ONE_SECOND);
	ret2 = glClientWaitSync(sync, 0, ONE_SECOND);

	if (ret1 == GL_TIMEOUT_EXPIRED) {
		printf("timeout expired on the first wait\n");
		piglit_report_result(PIGLIT_SKIP);
	}

	if (ret2 != GL_ALREADY_SIGNALED) {
		fprintf(stderr,
			"Expected GL_ALREADY_SIGNALED on second wait, got %s",
			piglit_get_gl_enum_name(ret2));
		piglit_report_result(PIGLIT_FAIL);
	}

	piglit_report_result(PIGLIT_PASS);
}
开发者ID:chemecse,项目名称:piglit,代码行数:29,代码来源:repeat-wait.c


示例13: is_floating_type

/**
 * Determine whether the given type contains floating-point values.
 */
static bool
is_floating_type(GLenum type)
{
	switch (type) {
	case GL_FLOAT:
	case GL_FLOAT_VEC2:
	case GL_FLOAT_VEC3:
	case GL_FLOAT_VEC4:
	case GL_FLOAT_MAT2:
	case GL_FLOAT_MAT2x3:
	case GL_FLOAT_MAT2x4:
	case GL_FLOAT_MAT3x2:
	case GL_FLOAT_MAT3:
	case GL_FLOAT_MAT3x4:
	case GL_FLOAT_MAT4x2:
	case GL_FLOAT_MAT4x3:
	case GL_FLOAT_MAT4:
		return true;
	case GL_INT:
	case GL_INT_VEC2:
	case GL_INT_VEC3:
	case GL_INT_VEC4:
	case GL_UNSIGNED_INT:
	case GL_UNSIGNED_INT_VEC2:
	case GL_UNSIGNED_INT_VEC3:
	case GL_UNSIGNED_INT_VEC4:
		return false;
	default:
		printf("Unexpected type: %u (%s)\n", type,
		       piglit_get_gl_enum_name(type));
		piglit_report_result(PIGLIT_FAIL);
		return false;
	}
}
开发者ID:chemecse,项目名称:piglit,代码行数:37,代码来源:structs.c


示例14: test_link_fail

static bool
test_link_fail(GLenum target, const char *source)
{
	GLuint shader, prog;
	GLint ok;

	shader = piglit_compile_shader_text(target, source);

	prog = glCreateProgram();
	glAttachShader(prog, shader);
	glLinkProgram(prog);
	glDeleteShader(shader);

	glGetProgramiv(prog, GL_LINK_STATUS, &ok);

	glDeleteProgram(prog);
	if (ok) {
		fprintf(stderr,
			"Linking with only a %s succeeded when it should have "
			"failed:\n",
			piglit_get_gl_enum_name(target));
		return false;
	}
	return true;
}
开发者ID:BNieuwenhuizen,项目名称:piglit,代码行数:25,代码来源:link-no-vsfs.c


示例15: check_fbo_status

	bool check_fbo_status(GLenum expect)
	{
		GLenum status = glCheckFramebufferStatus(GL_DRAW_FRAMEBUFFER);
		if (status != expect) {
			fprintf(stderr,
				"status was %s (0x%04x), "
				"expected %s (0x%04x).\n",
				piglit_get_gl_enum_name(status),
				status,
				piglit_get_gl_enum_name(expect),
				expect);
			return false;
		}

		return true;
	}
开发者ID:ThirteenFish,项目名称:piglit,代码行数:16,代码来源:fbo-incomplete.cpp


示例16: test_3d_tex_format

static bool
test_3d_tex_format(GLenum internalFormat)
{
	GLint width, height, depth;
	bool pass = true;
	unsigned mbytes;

	piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);

	/* use proxy texture to find actual max texture size */
	width = height = depth = 0;
	find_max_tex3d_size(internalFormat, MaxSize,
			    &width, &height, &depth);

	mbytes = tex_size(internalFormat, width, height, depth);
	printf("Actual max 3D texture size for %s: %d x %d x %d (%u MB)\n",
	       piglit_get_gl_enum_name(internalFormat),
	       width, height, depth, mbytes);

	/* first, try some smaller res 3D texture rendering */
	pass = test_render(internalFormat, width, height, depth/4);
	pass = test_render(internalFormat, width, height, depth/2) && pass;

	/* test largest 3D texture size */
	pass = test_render(internalFormat, width, height, depth) && pass;

	return pass;
}
开发者ID:chemecse,项目名称:piglit,代码行数:28,代码来源:tex3d-maxsize.c


示例17: pixelsInit

static void *
pixelsInit(GLenum format, GLenum type)
{
	switch(format) {
	case GL_RED:
	case GL_GREEN:
	case GL_BLUE:
	case GL_ALPHA:
	case GL_LUMINANCE:
	case GL_DEPTH_COMPONENT:
	case GL_STENCIL_INDEX:
		return (allocPixels(format, type, 1));
	case GL_LUMINANCE_ALPHA:
	case GL_RG:
		return (allocPixels(format, type, 2));
	case GL_RGB:
	case GL_BGR:
		return (allocPixels(format, type, 3));
	case GL_RGBA:
	case GL_BGRA:
		return (allocPixels(format, type, 4));
	default:
		printf("format = %s not allowed in glDrawPixels()\n",
		       piglit_get_gl_enum_name(format));
		piglit_report_result(PIGLIT_FAIL);
	}
	return NULL;
}
开发者ID:aphogat,项目名称:piglit,代码行数:28,代码来源:draw-pixels.c


示例18: piglit_test_uint64

static void
piglit_test_uint64(GLenum token, GLuint64 limit, bool max)
{
	const char *name = piglit_get_gl_enum_name(token);
	GLuint64 val = SENTINEL;
	bool pass;

	/* To obtain GLuint64 values, we must use glGetInteger64v.
	 * Justification is found in the GL_ARB_sync spec:
	 *
	 *   30) What is the type of the timeout interval?
	 *
	 *       RESOLVED: GLuint64. [...] Consequently the type of <timeout>
	 *       has been changed to 'GLuint64' and a corresponding
	 *       'GetInteger64v' query taking 'GLint64' added (by symmetry
	 *       with GetInteger, where unsigned quantities are queries with
	 *       a function taking a pointer to a signed integer - the pointer
	 *       conversion is harmless).
	 */

	glGetInteger64v(token, (GLint64*) &val);

	pass = piglit_check_gl_error(GL_NO_ERROR);

	piglit_report_uint64(name, limit, val,
			     pass &&
			     val != SENTINEL &&
			     ((max && val <= limit) ||
			      (!max && val >= limit)));
}
开发者ID:chemecse,项目名称:piglit,代码行数:30,代码来源:minmax-test.c


示例19: check_textures_type

static bool
check_textures_type(void)
{
        bool check_pass = true;
        test_data *data = test_data_new(0, 1);
        unsigned i;
        int testing64;

        for (i = 0; i < ARRAY_SIZE(pnames); i++) {
                bool pass = true;

                for (testing64 = 0; testing64 <= 1; testing64++) {
                        test_data_set_testing64(data, testing64);

                        pass = try_textures_type(texture_targets, ARRAY_SIZE(texture_targets),
                                                 valid_internalformats, ARRAY_SIZE(valid_internalformats),
                                                 pnames[i], equivalent_pnames[i],
                                                 data)
                                && pass;
                }
                piglit_report_subtest_result(pass ? PIGLIT_PASS : PIGLIT_FAIL,
                                             "%s", piglit_get_gl_enum_name(pnames[i]));

                check_pass = check_pass && pass;
        }

        test_data_clear(&data);

        return check_pass;
}
开发者ID:fabe3k,项目名称:piglit,代码行数:30,代码来源:internalformat-type-checks.c


示例20: size_of_type

/**
 * Compute the number of varying slots occupied by a given type.
 */
static unsigned
size_of_type(GLenum type)
{
	switch (type) {
	case GL_FLOAT:             return  1;
	case GL_FLOAT_VEC2:        return  2;
	case GL_FLOAT_VEC3:        return  3;
	case GL_FLOAT_VEC4:        return  4;
	case GL_FLOAT_MAT2:        return  4;
	case GL_FLOAT_MAT2x3:      return  6;
	case GL_FLOAT_MAT2x4:      return  8;
	case GL_FLOAT_MAT3x2:      return  6;
	case GL_FLOAT_MAT3:        return  9;
	case GL_FLOAT_MAT3x4:      return 12;
	case GL_FLOAT_MAT4x2:      return  8;
	case GL_FLOAT_MAT4x3:      return 12;
	case GL_FLOAT_MAT4:        return 16;
	case GL_INT:               return  1;
	case GL_INT_VEC2:          return  2;
	case GL_INT_VEC3:          return  3;
	case GL_INT_VEC4:          return  4;
	case GL_UNSIGNED_INT:      return  1;
	case GL_UNSIGNED_INT_VEC2: return  2;
	case GL_UNSIGNED_INT_VEC3: return  3;
	case GL_UNSIGNED_INT_VEC4: return  4;
	default:
		printf("Unexpected type: %u (%s)\n", type,
		       piglit_get_gl_enum_name(type));
		piglit_report_result(PIGLIT_FAIL);
		return 0;
	}
}
开发者ID:chemecse,项目名称:piglit,代码行数:35,代码来源:structs.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ piglit_get_gl_version函数代码示例发布时间:2022-05-30
下一篇:
C++ piglit_draw_rect_tex函数代码示例发布时间: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