Article View: comp.graphics.algorithms
Article #61GL Rasterization & Homogenous coordinates
From: olivier.brunet
Date: Thu, 26 Mar 1998 00:00
Date: Thu, 26 Mar 1998 00:00
32 lines
1637 bytes
1637 bytes
I would like to use in rasterization only mode, ie I do all the transformation/projection maths, and then I use GL to rasterize. I want to keep the perspective correctness of mapping too. To achieve this I have the following data: - GL_MODELVIEW is identity - GL_PROJECTION is identity - for each vertex I have X in screen space, Y in screen space, and 1/Z (where Z is the world coordinates Z) So to setup mapping coordinates I do something like this: glTexCoord4f(u * (1/z), v * (1/z), 0, 1/z) But I got a probelm to specify vertexes in order to appear where they should (and have the depth buffer work correctly too) I don't manage to get the correct formula for the glVertex call ... glVertex3f(x,y,1/(1/z)) or glVertex(x,y,?,(1/z)) If you have ideas ... Thanks, Olivier -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading
Technical Details
Message-ID:
<6fe5sr$tr9$1@nnrp1.dejanews.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fdc2a,a3a9fc4118ec9349,start X-Google-Attributes: gidfdc2a,public X-Google-Thread: f65bb,a3a9fc4118ec9349,start X-Google-Attributes: gidf65bb,public X-Google-Thread: 100291,a3a9fc4118ec9349,start X-Google-Attributes: gid100291,public From: olivier.brunet@capway.com Subject: GL Rasterization & Homogenous coordinates Date: 1998/03/26 Message-ID: <6fe5sr$tr9$1@nnrp1.dejanews.com> X-Deja-AN: 337954720 X-Http-User-Agent: Mozilla/4.03 [fr] (Win95; I) Organization: Panard Soft X-Article-Creation-Date: Thu Mar 26 18:14:30 1998 GMT Newsgroups: comp.graphics.algorithms,comp.graphics.api.opengl,3dfx.opengl