Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 01-11-07, 09:09 AM   #1
oc2k1
Registered User
 
Join Date: Aug 2006
Posts: 38
Default Geometrieshader Emulation

Hi yesterday I've add some code to lumina (my shader development envrionment) to support geometrieshaders. In
http://developer.download.nvidia.com...ease_notes.pdf I'read that I have to add Option "RegistryDwords" "8F773984=7" to my device section.

after restarting X "glewinfo | grep geo" prints
GL_EXT_geometry_shader4: OK [MISSING]
GL_NV_geometry_program4: OK [MISSING]

A line for checking the state in my program prints out that GL_EXT_geometry_shader4 is true.

I' add the code from my overloadet constructor. The most is identical to the old Vertex/Fragmet verion, so I add the lines for the geometric shader only...

Code:
glwrapper_shader( QObject * parent,  QString inVertex, QString inGeometric, QString inFragment): QObject( parent ){
		if (!GL_EXT_geometry_shader4){
			printf("Panic");
			}
		GLhandleARB  v,g,f;
		v = glCreateShaderObjectARB(GL_VERTEX_SHADER_ARB);
		f = glCreateShaderObjectARB(GL_FRAGMENT_SHADER_ARB);
		g = glCreateShaderObjectARB(GL_GEOMETRY_SHADER_EXT);

		QByteArray qv = inVertex.toLatin1();
		QByteArray qf = inFragment.toLatin1();
		QByteArray qg = inGeometric.toLatin1();

		const char * vv = qv.data ();
		const char * ff = qf.data ();
		const char * gg = qg.data ();


		glShaderSourceARB(f, 1, &ff,NULL);
		glShaderSourceARB(v, 1, &vv,NULL);
		glShaderSourceARB(g, 1, &gg,NULL);

		glCompileShaderARB(v);
		glCompileShaderARB(f);
		glCompileShaderARB(g);

		shader = glCreateProgramObjectARB();
		glAttachObjectARB(shader,v);
		glAttachObjectARB(shader,g);
		glAttachObjectARB(shader,f);
		glLinkProgramARB(shader);
		printInfoLog(shader);
		}
__________________
Will code GLSL for food.
oc2k1 is offline   Reply With Quote
Old 01-11-07, 09:39 AM   #2
oc2k1
Registered User
 
Join Date: Aug 2006
Posts: 38
Default Re: Geometrieshader Emulation

Edit: ooops I should descibe the problem: the goemetrie shader code will be ignored.
__________________
Will code GLSL for food.
oc2k1 is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:21 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.