Go Back   nV News Forums > Software Forums > Software Development

Newegg Daily Deals

Reply
 
Thread Tools
Old 10-09-08, 08:24 AM   #1
12axing
Registered User
 
Join Date: Mar 2008
Posts: 18
Default GL_EXT_geometry_shader4 glsl -- not working?

I am writing a program using the opengl 2.1 api, and wanted to use the extension GL_EXT_geometry_shader4 to write a dummy geometry shader in glsl, which only copies the vertices from the input -- but the screen remains black, althought no errors occure during shader compilation, and both vertex and fragment shader work fine, if I don't use the geometry shader

dummy vertex shader:
Code:
void main()
{
    gl_Position = glModelViewProjectionMatrix * gl_Vertex;
}
dummy geometry shader (primitive type: triangles):
Code:
#extension GL_EXT_geometry_shader4 : enable

void main()
{
    int i=0;
    for(;i<gl_VerticesIn;++i)
    {
        gl_Position = gl_PositionIn[i];
        EmitVertex();
    }
    EndPrimitive();
}
dummy fragment shader:
Code:
void main()
{
    gl_FragColor = vec4(0,1,0,0);
}
What could be the reason, why the screen remains black, althought green triangles should appear on the screen? I am using the geforce 280 gtx graphic card with the latest drivers installed ...
12axing 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tony Hawk devs working on Call of Duty News Gaming Headlines 0 06-15-12 11:30 AM
RH7.3, 3123, was working, now it isn't phips NVIDIA Linux 2 10-03-02 03:08 PM
Nvidia 3123 not working on Mandrake 8.2 UP with Geforce 440 MMX tariqf NVIDIA Linux 1 09-17-02 09:22 AM
TV-out not working nomatter what driver.. Dr_Gigolo NVIDIA Windows Graphics Drivers 11 09-11-02 12:11 PM
How do I get Dual Head working? Heath NVIDIA Linux 1 08-22-02 01:44 PM

All times are GMT -5. The time now is 02:51 AM.


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