EihiS

October 8, 2014

RPI : openGL ES 2.0 functions in C

Filed under: Uncategorized — Tags: , , , , , , , — admin @ 9:11 am

This post will be updated when i have enough time.
// list GL capabilities & Extensions

void show_GLcapabilities(void)
{
	//
      printf("GL_RENDERER   = %s\n", (char *) glGetString(GL_RENDERER));
      printf("GL_VERSION    = %s\n", (char *) glGetString(GL_VERSION));
      printf("GL_VENDOR     = %s\n", (char *) glGetString(GL_VENDOR));
      printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS));
	//
}
// list GLES parameters
void show_GLparameters(void)
{
	GLint myget[256];
	glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_FORMAT,&myget);printf("GL_IMPLEMENTATION_COLOR_READ_FORMAT=%04x %04x %04x %d \n",myget[0],myget[1],myget[2],myget[3]);
	glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_TYPE,&myget);printf("GL_IMPLEMENTATION_COLOR_READ_TYPE=%04x %04x %04x %d \n",myget[0],myget[1],myget[2],myget[3]);
	glGetIntegerv(GL_COLOR_WRITEMASK,&myget);printf("GL_COLOR_WRITE_MASK=%d %d %d %d \n",myget[0],myget[1],myget[2],myget[3]);
	glGetIntegerv(GL_BLEND,&myget);printf("GL_BLEND =%d\n",myget[0]);
	glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE,&myget);printf("GL_MAX_RENDER_BUFFER_SIZE =%d\n",myget[0]);
	glGetIntegerv(GL_MAX_VERTEX_UNIFORM_VECTORS,&myget);printf("GL_MAX_VERTEX_UNIFORM_VECTORS =%d\n",myget[0]);
	glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_VECTORS,&myget);printf("GL_MAX_FRAGMENT_UNIFORM_VECTORS =%d\n",myget[0]);
	glGetIntegerv(GL_MAX_VERTEX_ATTRIBS,&myget);printf("GL_MAX_VERTEX_ATTRIBS =%d\n",myget[0]);
	//
	glGetIntegerv(GL_MAX_VIEWPORT_DIMS,&myget);printf("GL_MAX_VIEWPORT_DIMS =%dx%d\n",myget[0],myget[1]);
	glGetIntegerv(GL_VIEWPORT,&myget);printf("GL_VIEWPORT =(%d,%d %d,%d)\n",myget[0],myget[1],myget[2],myget[3]);

}
//
// Videocore debugging
in /opt/vc/bin :
sudo vcdbg help
see : https://github.com/nezticle/RaspberryPi-BuildRoot/wiki/VideoCore-Tools

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

314159265358979323846264338327950288
419716939937510582097494459230781640
628620899862803482534211706798214808

cat{ } { post_660 } { } 2009-2015 EIhIS Powered by WordPress