Re: FBO problem
Rhadamés Carmona <[email protected]> Wed, 30 Jul 2008 18:15:27 -0800
| Newsgroups | gmane.games.devel.opengl |
|---|---|
| Organization | Fat City Network Services, San Diego, California |
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
------=_NextPart_000_001D_01C8F286.C6CE2FC0
Content-Type: text/plain; charset="iso-8859-15"
Content-Transfer-Encoding: quoted-printable
Hello Guys
Now works. The trick was to use GL=5FRGBA32F=5FARB instead of GL=5FRGBA32F=5FNV
Regards
Rhadam=E9s
----- Original Message -----
To: =22Multiple recipients of list OPENGL-GAMEDEV-L=22 <OPENGL-GAMEDEV-L@fatcit=
y.com>
Sent: Wednesday, July 30, 2008 5:50 AM
> Hej,
>
> have you actually used shaders=3F Float FBOs only work with shaders. Also
> note that your texture coordinates are different for GL=5FTEXTURE=5FRECTANGLE=
> in contrast to GL=5FTEXTURE=5F2D, but it seems you only use texture rectangle=
> anyways.
>
>> I am playing a little bit with FBO. By the way, I am rendering a little =
red
>> quad in the middle of the FBO. It works perfect while I use
>>
>> glTexImage2D(GL=5FTEXTURE=5FRECTANGLE=5FNV, 0, 4, w, h, 0, GL=5FRGBA,
>> GL=5FUNSIGNED=5FBYTE, NULL);
>>
>> yeah...a 8 bits FBO. I can change GL=5FUNSIGNED=5FBYTE by GL=5FFLOAT, and I al=
ways
>> get a 8 bits FBO... (well known behaviour).
>>
>> But, If I just change that command by
>>
>> glTexImage2D(GL=5FTEXTURE=5FRECTANGLE=5FNV, 0, GL=5FFLOAT=5FRGBA16=5FNV, w, h,
>> 0,GL=5FRGBA, GL=5FUNSIGNED=5FSHORT, NULL);
>>
>> or even by
>>
>> glTexImage2D(GL=5FTEXTURE=5FRECTANGLE=5FNV, 0, GL=5FFLOAT=5FRGBA32=5FNV, w, h,
>> 0,GL=5FRGBA, GL=5FFLOAT, NULL);
>>
>> then, I get a full screen red image (even if I comment the glBegin(QUADS=
) -
>> glEnd() block to render the quad). The entire FBO gets the color of my
>> glColor3ub(255,0,0).
>>
>> I have test every OpenGL code line with glGetError(), and there is not a=
ny
>> error. I also installed latest glew and drivers for my 8800 NVidia graph=
ics
>> board.
>>
>> I hope some of you could have a suggestion about what I am doing wrong.
>>
>> Thanks a lot!
>> Rhadam=E9s
>>
>>
>> #include =22glew.h=22
>> #include <gl/glut.h>
>> #include <stdio.h>
>> #include <stdlib.h>
>> #include <iostream>
>>
>> #define GL=5FTEXTURE=5FRECTANGLE GL=5FTEXTURE=5FRECTANGLE=5FNV
>>
>> int height=3D0, width=3D0;
>> GLuint g=5Ffb=3D0;
>> GLuint g=5Ftex=3D0;
>> GLuint g=5Fdepth=3D0;
>>
>> using namespace std;
>>
>>
>> void Abort(char *msg)
>> {
>> printf(msg);
>> exit(1);
>> }
>>
>>
>>
>> void CheckErrorsGL(const char* location=3DNULL, ostream& ostr=3D std::cerr )
>> {
>> GLuint errnum;
>> const char *errstr;
>> int counter =3D 0;
>> while (errnum =3D glGetError())
>> {
>> errstr =3D reinterpret=5Fcast<const char *>(gluErrorString(errnum));
>> if(errstr)
>> {
>> ostr << errstr;
>> }
>> else
>> {
>> ostr << =22Error =22 << errnum;
>> }
>>
>> if(location)
>> ostr << =22 at =22 << location;
>> ostr << endl;
>> counter++;
>> }
>> if (counter)
>> Abort(=22Application cannot continue!\n=22);
>>
>> return;
>> }
>>
>> void TestOpenGLError()
>> {
>> CheckErrorsGL(NULL);
>> }
>>
>>
>> void Draw()
>> {
>> // working with main object (the application)
>> if (!width || !height)
>> return;
>>
>> glClearColor(0,0,0,0);
>> glClear(GL=5FDEPTH=5FBUFFER=5FBIT | GL=5FCOLOR=5FBUFFER=5FBIT);
>>
>>
>> glBindFramebufferEXT(GL=5FFRAMEBUFFER=5FEXT, g=5Ffb); TestOpenGLError();
>> glDrawBuffer( GL=5FCOLOR=5FATTACHMENT0=5FEXT ); TestOpenGLError();
>> glViewport(0,0,width, height); TestOpenGLError();
>> glClearColor(0,0,0,0); TestOpenGLError();
>> glClear(GL=5FCOLOR=5FBUFFER=5FBIT); TestOpenGLError();
>>
>>
>> float size =3D 100.0f;
>>
>> glColor3f(1,0,0.5f);
>> glBegin(GL=5FQUADS);
>> glVertex2f(width*0.5f - size, height*0.5f - size);
>> glVertex2f(width*0.5f - size, height*0.5f + size);
>> glVertex2f(width*0.5f + size, height*0.5f + size);
>> glVertex2f(width*0.5f + size, height*0.5f - size);
>> glEnd();
>> //glColor3ub(0,0,0);
>>
>>
>>
>>
>> glBindFramebufferEXT(GL=5FFRAMEBUFFER=5FEXT, 0);
>> glDrawBuffer( GL=5FBACK );
>> glViewport(0,0,width, height); TestOpenGLError();
>> glFinish();
>> glEnable(GL=5FTEXTURE=5FRECTANGLE);
>> glBindTexture(GL=5FTEXTURE=5FRECTANGLE, g=5Ftex); TestOpenGLError();
>> glEnable(GL=5FTEXTURE=5FRECTANGLE); TestOpenGLError();
>>
>>
>> glBegin(GL=5FQUADS);
>> glTexCoord2f(0.0f, 0.0f);
>> glVertex2f(0.0f, 0.0f);
>> glTexCoord2f(0.0f, height);
>> glVertex2f(0.0f, height);
>> glTexCoord2f(width, height);
>> glVertex2f(width, height);
>> glTexCoord2f(width, 0.0f);
>> glVertex2f(width, 0.0f);
>> glEnd();
>>
>> glDisable(GL=5FTEXTURE=5FRECTANGLE); TestOpenGLError();
>> // back to 3D mode
>>
>>
>> glFinish();
>> glutSwapBuffers();
>> }
>>
>> void Init()
>> {
>> GLenum err =3D glewInit();
>> if (GLEW=5FOK !=3D err)
>> // Problem: glewInit failed, something is seriously wrong.
>> Abort(=22init error\n=22);
>>
>>
>> TestOpenGLError();
>> glGenFramebuffersEXT(1, &g=5Ffb); ; TestOpenGLError();
>> glBindTexture(GL=5FTEXTURE=5F2D, 0); TestOpenGLError();
>> glBindTexture(GL=5FTEXTURE=5FRECTANGLE, 0); TestOpenGLError();
>> glBindFramebufferEXT(GL=5FFRAMEBUFFER=5FEXT, g=5Ffb); TestOpenGLError();
>>
>> // create the texture for the color
>> glGenTextures(1, &g=5Ftex); &nbs p; TestOpenGLError();
>> glBindTexture(GL=5FTEXTURE=5FRECTANGLE, g=5Ftex); TestOpenGLError();
>>
>> glTexParameteri (GL=5FTEXTURE=5FRECTANGLE, GL=5FTEXTURE=5FWRAP=5FS, GL=5FCLAMP);
>> glTexParameteri (GL=5FTEXTURE=5FRECTANGLE, GL=5FTEXTURE=5FWRAP=5FT, GL=5FCLAMP);
>> glTexParameteri (GL=5FTEXTURE=5FRECTANGLE, GL=5FTEXTURE=5FMAG=5FFILTER, GL=5FNEAREST=
);
>> glTexParameteri (GL=5FTEXTURE=5FRECTANGLE, GL=5FTEXTURE=5FMIN=5FFILTER, GL=5FNEAREST=
); TestOpenGLError(); &nbs p;
>>
>> //glTexImage2D(GL=5FTEXTURE=5FRECTANGLE, 0, 4, width, height, 0, GL=5FRGBA, GL=
=5FUNSIGNED=5FBYTE, NULL); //works
>> //glTexImage2D(GL=5FTEXTURE=5FRECTANGLE, 0, GL=5FRGBA16, width, height, 0,GL=5FR=
GBA, GL=5FUNSIGNED=5FSHORT, NULL); //works
>> //glTexImage2D(GL=5FTEXTURE=5FRECTANGLE, 0, GL=5FFLOAT=5FRGBA32=5FNV, w, h, 0,GL=5FR=
GBA, GL=5FFLOAT, NULL); //does not work
>> glTexImage2D(GL=5FTEXTURE=5FRECTANGLE, 0, GL=5FFLOAT=5FRGBA16=5FNV, width, height,=
0,GL=5FRGBA, GL=5FUNSIGNED=5FSHORT, NULL);
>>
>> TestOpenGLError();
>> glFramebufferTexture2DEXT(GL=5FFRAMEBUFFER=5FEXT,GL=5FCOLOR=5FATTACHMENT0=5FEXT,GL=
=5FTEX TURE=5FRECTANGLE,g=5Ftex, 0);
>> if (glCheckFramebufferStatusEXT(GL=5FFRAMEBUFFER=5FEXT) !=3D GL=5FFRAMEBUFFER=5FCO=
MPLETE=5FEXT)
>> Abort(=22Error adding color to FBO\n=22);
>> TestOpenGLError();
>>
>> glMatrixMode(GL=5FPROJECTION);
>> glLoadIdentity();
>> glOrtho(0,width,0,height,-1,100.0f);
>> glMatrixMode(GL=5FTEXTURE);
>> glLoadIdentity();
>> glMatrixMode(GL=5FMODELVIEW);
>> glLoadIdentity();
>> glTranslatef(0,0,-5);
>> }
>>
>> void Reshape(int w, int h)
>> {
>> width =3D w;
>> height=3D h;
>> glViewport(0,0,width,height);
>> Init();
>> }
>>
>>
>> void main(int argc, char **argv)
>> {
>> glutInit(&argc, argv);
>> glutInitDisplayString(=22double blue>=3D8 red>=3D8 alpha>=3D8 green>=3D8 depth=3D32=22=
);// rgba>=3D8 depth>=3D24=22);
>> glutInitWindowSize(640,480);
>> glutInitWindowPosition(0,0);
>> glutCreateWindow(=22test=22);
>> glutSetWindowTitle(=22test=22);
>>
>>
>> glutIdleFunc(Draw);
>> glutDisplayFunc(Draw);
>> glutReshapeFunc(Reshape);
>>
>> glutShowWindow();
>> glutMainLoop();
>>
>> }
>> ----- FAQ and OpenGL Resources at: http://www.geocities.com/SiliconValle=
y/Hills/9956/OpenGL -- Author: [email protected]
>> INET: [email protected] Fat City Hosting, San Diego, California -- http:/=
/www.fatcity.com
>> --------------------------------------------------------------------- To=
REMOVE yourself from this mailing list, send an
>> E-Mail message to: [email protected] (note EXACT spelling of 'ListGur=
u') and in the message BODY, include a line
>> containing: UNSUB OPENGL-GAMEDEV-L (or the name of mailing list you want=
to be removed from). You may also send the HELP
>> command for other information (like subscribing).
>>
>
> Servus,
> Gernot
>
> GPU. 3D Vision. Europe. Future. Now.
> Drop by: www.mpi-sb.mpg.de/~gziegler - www.geofront.eu
>
--
Estoy usando la versi=F3n gratuita de SPAMfighter para usuarios privados.
Ha eliminado 29139 correos spam hasta la fecha.
Los usuarios de pago no tienen este mensaje en sus correos.
Obtenga SPAMfighter gratis aqu=ED: http://www.spamfighter.com/les
------=_NextPart_000_001D_01C8F286.C6CE2FC0
Content-Type: text/html; charset="iso-8859-15"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC =22-//W3C//DTD HTML 4.0 Transitional//EN=22>
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D=22text/html; charset=3Diso-8859-15=22>
<META content=3D=22MSHTML 6.00.6000.16674=22 name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Hello Guys</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Now works. The trick was to use GL=5FRGBA32F=5FARB=
instead of </FONT><FONT face=3DArial size=3D2>GL=5FRGBA32F=5FNV</FONT>
<P><FONT face=3DArial size=3D2></FONT> </P>
<P><FONT face=3DArial size=3D2>Regards</FONT></P>
<P><FONT face=3DArial size=3D2>Rhadam=E9s</FONT></P></DIV>
<DIV><FONT face=3DArial size=3D2>----- Original Message ----- </FONT>
<DIV><FONT face=3DArial size=3D2>From: =22Gernot Ziegler=22 <</FONT><A
href=3D=22mailto:[email protected]=22><FONT face=3DArial
size=3D2>[email protected]</FONT></A><FONT face=3DArial size=3D2>></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>To: =22Multiple recipients of list OPENGL-GAMEDE=
V-L=22
<</FONT><A href=3D=22mailto:[email protected]=22><FONT face=3DArial
size=3D2>[email protected]</FONT></A><FONT face=3DArial
size=3D2>></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Sent: Wednesday, July 30, 2008 5:50 AM</FONT><=
/DIV>
<DIV><FONT face=3DArial size=3D2>Subject: Re: FBO problem</FONT></DIV></DIV>
<DIV><FONT face=3DArial><BR><FONT size=3D2></FONT></FONT></DIV><FONT face=3DArial=
size=3D2>> Hej,<BR>> <BR>> have you actually used shaders=3F Float FBO=
s
only work with shaders. Also <BR>> note that your texture coordinates ar=
e
different for GL=5FTEXTURE=5FRECTANGLE <BR>> in contrast to GL=5FTEXTURE=5F2D, b=
ut it
seems you only use texture rectangle <BR>> anyways.<BR>> <BR>>>=
I am
playing a little bit with FBO. By the way, I am rendering a little
red<BR>>> quad in the middle of the FBO. It works perfect while I
use<BR>>> <BR>>> glTexImage2D(GL=5FTEXTURE=5FRECTANGLE=5FNV, 0, 4, w,=
h,
0, GL=5FRGBA,<BR>>> GL=5FUNSIGNED=5FBYTE, NULL);<BR>>> <BR>>>
yeah...a 8 bits FBO. I can change GL=5FUNSIGNED=5FBYTE by GL=5FFLOAT, and I
always<BR>>> get a 8 bits FBO... (well known behaviour).<BR>>>
<BR>>> But, If I just change that command by<BR>>> <BR>>>=
glTexImage2D(GL=5FTEXTURE=5FRECTANGLE=5FNV, 0, GL=5FFLOAT=5FRGBA16=5FNV, w, h,<BR>>&=
gt;
0,GL=5FRGBA, GL=5FUNSIGNED=5FSHORT, NULL);<BR>>> <BR>>> or even
by<BR>>> <BR>>> glTexImage2D(GL=5FTEXTURE=5FRECTANGLE=5FNV, 0,
GL=5FFLOAT=5FRGBA32=5FNV, w, h,<BR>>> 0,GL=5FRGBA, GL=5FFLOAT, NULL);<BR>>&g=
t;
<BR>>> then, I get a full screen red image (even if I comment the
glBegin(QUADS) -<BR>>> glEnd() block to render the quad). The entire =
FBO
gets the color of my<BR>>> glColor3ub(255,0,0).<BR>>> <BR>>&=
gt; I
have test every OpenGL code line with glGetError(), and there is not
any<BR>>> error. I also installed latest glew and drivers for my 8800=
NVidia graphics<BR>>> board.<BR>>> <BR>>> I hope some of =
you
could have a suggestion about what I am doing wrong.<BR>>> <BR>>&g=
t;
Thanks a lot!<BR>>> Rhadam=E9s<BR>>> <BR>>> <BR>>>
#include =22glew.h=22<BR>>> #include <gl/glut.h><BR>>> #inclu=
de
<stdio.h><BR>>> #include <stdlib.h><BR>>> #include
<iostream><BR>>> <BR>>> #define GL=5FTEXTURE=5FRECTANGLE
GL=5FTEXTURE=5FRECTANGLE=5FNV<BR>>> <BR>>> int height=3D0,
width=3D0;<BR>>> GLuint g=5Ffb=3D0;<BR>>> GLuint g=5Ftex=3D0;<BR>>>=
GLuint g=5Fdepth=3D0;<BR>>> <BR>>> using namespace std;<BR>>>=
<BR>>> <BR>>> void Abort(char *msg)<BR>>> {<BR>>>
printf(msg);<BR>>> exit(1);<BR>>> }<BR>>> <BR>>>
<BR>>> <BR>>> void CheckErrorsGL(const char* location=3DNULL,
ostream& ostr=3D std::cerr )<BR>>> {<BR>>> GLuint
errnum;<BR>>> const char *errstr;<BR>>> int counter =3D 0;<BR>>=
;>
while (errnum =3D glGetError())<BR>>> {<BR>>> errstr =3D
reinterpret=5Fcast<const char *>(gluErrorString(errnum));<BR>>>
if(errstr)<BR>>> {<BR>>> ostr << errstr;<BR>>>
}<BR>>> else<BR>>> {<BR>>> ostr << =22Error =22 <<=
;
errnum;<BR>>> }<BR>>> <BR>>> if(location)<BR>>> ost=
r
<< =22 at =22 << location; <BR>>> ostr << endl;<BR>>=
>
counter++;<BR>>> }<BR>>> if (counter)<BR>>> Abort(=22Applic=
ation
cannot continue!\n=22);<BR>>> <BR>>> return;<BR>>> }<BR>>=
;>
<BR>>> void TestOpenGLError()<BR>>> {<BR>>>
CheckErrorsGL(NULL);<BR>>> }<BR>>> <BR>>> <BR>>> vo=
id
Draw()<BR>>> {<BR>>> // working with main object (the
application)<BR>>> if (!width || !height)<BR>>> return;<BR>>=
>
<BR>>> glClearColor(0,0,0,0);<BR>>> glClear(GL=5FDEPTH=5FBUFFER=5FBIT=
|
GL=5FCOLOR=5FBUFFER=5FBIT);<BR>>> <BR>>> <BR>>>
glBindFramebufferEXT(GL=5FFRAMEBUFFER=5FEXT, g=5Ffb); TestOpenGLError();<BR>>&=
gt;
glDrawBuffer( GL=5FCOLOR=5FATTACHMENT0=5FEXT ); TestOpenGLError();<BR>>>
glViewport(0,0,width, height); TestOpenGLError();<BR>>>
glClearColor(0,0,0,0); TestOpenGLError();<BR>>>
glClear(GL=5FCOLOR=5FBUFFER=5FBIT); TestOpenGLError();<BR>>> <BR>>>
<BR>>> float size =3D 100.0f;<BR>>> <BR>>>
glColor3f(1,0,0.5f);<BR>>> glBegin(GL=5FQUADS);<BR>>>
glVertex2f(width*0.5f - size, height*0.5f - size);<BR>>>
glVertex2f(width*0.5f - size, height*0.5f + size);<BR>>>
glVertex2f(width*0.5f + size, height*0.5f + size);<BR>>>
glVertex2f(width*0.5f + size, height*0.5f - size);<BR>>>
glEnd();<BR>>> //glColor3ub(0,0,0);<BR>>> <BR>>> <BR>>=
>
<BR>>> <BR>>> glBindFramebufferEXT(GL=5FFRAMEBUFFER=5FEXT,
0);<BR>>> glDrawBuffer( GL=5FBACK );<BR>>> glViewport(0,0,width,
height); TestOpenGLError();<BR>>> glFinish();<BR>>>
glEnable(GL=5FTEXTURE=5FRECTANGLE);<BR>>> glBindTexture(GL=5FTEXTURE=5FRECTAN=
GLE,
g=5Ftex); TestOpenGLError();<BR>>> glEnable(GL=5FTEXTURE=5FRECTANGLE);
TestOpenGLError();<BR>>> <BR>>> <BR>>>
glBegin(GL=5FQUADS);<BR>>> glTexCoord2f(0.0f, 0.0f);<BR>>>
glVertex2f(0.0f, 0.0f);<BR>>> glTexCoord2f(0.0f, height);<BR>>>=
glVertex2f(0.0f, height);<BR>>> glTexCoord2f(width, height);<BR>>&=
gt;
glVertex2f(width, height);<BR>>> glTexCoord2f(width, 0.0f);<BR>>&g=
t;
glVertex2f(width, 0.0f);<BR>>> glEnd();<BR>>> <BR>>>
glDisable(GL=5FTEXTURE=5FRECTANGLE); TestOpenGLError();<BR>>> // back to =
3D
mode<BR>>> <BR>>> <BR>>> glFinish();<BR>>>
glutSwapBuffers();<BR>>> }<BR>>> <BR>>> void
Init()<BR>>> {<BR>>> GLenum err =3D glewInit();<BR>>> if
(GLEW=5FOK !=3D err)<BR>>> // Problem: glewInit failed, something is seri=
ously
wrong.<BR>>> Abort(=22init error\n=22);<BR>>> <BR>>> <BR>>=
>
TestOpenGLError();<BR>>> glGenFramebuffersEXT(1, &g=5Ffb); ;
TestOpenGLError();<BR>>> glBindTexture(GL=5FTEXTURE=5F2D, 0);
TestOpenGLError();<BR>>> glBindTexture(GL=5FTEXTURE=5FRECTANGLE, 0);
TestOpenGLError();<BR>>> glBindFramebufferEXT(GL=5FFRAMEBUFFER=5FEXT, g=5Ff=
b);
TestOpenGLError();<BR>>> <BR>>> // create the texture for the
color<BR>>> glGenTextures(1, &g=5Ftex); &nbs p;
TestOpenGLError();<BR>>> glBindTexture(GL=5FTEXTURE=5FRECTANGLE, g=5Ftex);
TestOpenGLError();<BR>>> <BR>>> glTexParameteri
(GL=5FTEXTURE=5FRECTANGLE, GL=5FTEXTURE=5FWRAP=5FS, GL=5FCLAMP);<BR>>> glTexParam=
eteri
(GL=5FTEXTURE=5FRECTANGLE, GL=5FTEXTURE=5FWRAP=5FT, GL=5FCLAMP);<BR>>> glTexParam=
eteri
(GL=5FTEXTURE=5FRECTANGLE, GL=5FTEXTURE=5FMAG=5FFILTER, GL=5FNEAREST);<BR>>>
glTexParameteri (GL=5FTEXTURE=5FRECTANGLE, GL=5FTEXTURE=5FMIN=5FFILTER, GL=5FNEAREST);
TestOpenGLError(); &nbs p;<BR>>> <BR>>>
//glTexImage2D(GL=5FTEXTURE=5FRECTANGLE, 0, 4, width, height, 0, GL=5FRGBA,
GL=5FUNSIGNED=5FBYTE, NULL); //works<BR>>>
//glTexImage2D(GL=5FTEXTURE=5FRECTANGLE, 0, GL=5FRGBA16, width, height, 0,GL=5FRGBA=
,
GL=5FUNSIGNED=5FSHORT, NULL); //works<BR>>>
//glTexImage2D(GL=5FTEXTURE=5FRECTANGLE, 0, GL=5FFLOAT=5FRGBA32=5FNV, w, h, 0,GL=5FRGBA=
,
GL=5FFLOAT, NULL); //does not work<BR>>> glTexImage2D(GL=5FTEXTURE=5FRECTAN=
GLE,
0, GL=5FFLOAT=5FRGBA16=5FNV, width, height, 0,GL=5FRGBA, GL=5FUNSIGNED=5FSHORT,
NULL);<BR>>> <BR>>> TestOpenGLError();<BR>>>
glFramebufferTexture2DEXT(GL=5FFRAMEBUFFER=5FEXT,GL=5FCOLOR=5FATTACHMENT0=5FEXT,GL=5FTE=
X
TURE=5FRECTANGLE,g=5Ftex, 0);<BR>>> if
(glCheckFramebufferStatusEXT(GL=5FFRAMEBUFFER=5FEXT) !=3D
GL=5FFRAMEBUFFER=5FCOMPLETE=5FEXT)<BR>>> Abort(=22Error adding color to
FBO\n=22);<BR>>> TestOpenGLError();<BR>>> <BR>>>
glMatrixMode(GL=5FPROJECTION);<BR>>> glLoadIdentity();<BR>>>
glOrtho(0,width,0,height,-1,100.0f);<BR>>>
glMatrixMode(GL=5FTEXTURE);<BR>>> glLoadIdentity();<BR>>>
glMatrixMode(GL=5FMODELVIEW);<BR>>> glLoadIdentity();<BR>>>
glTranslatef(0,0,-5);<BR>>> }<BR>>> <BR>>> void Reshape(i=
nt w,
int h)<BR>>> {<BR>>> width =3D w;<BR>>> height=3D h;<BR>>&=
gt;
glViewport(0,0,width,height);<BR>>> Init();<BR>>> }<BR>>>=
<BR>>> <BR>>> void main(int argc, char **argv)<BR>>>
{<BR>>> glutInit(&argc, argv);<BR>>>
glutInitDisplayString(=22double blue>=3D8 red>=3D8 alpha>=3D8 green>=3D8
depth=3D32=22);// rgba>=3D8 depth>=3D24=22);<BR>>>
glutInitWindowSize(640,480);<BR>>>
glutInitWindowPosition(0,0);<BR>>> glutCreateWindow(=22test=22);<BR>>&=
gt;
glutSetWindowTitle(=22test=22);<BR>>> <BR>>> <BR>>>
glutIdleFunc(Draw);<BR>>> glutDisplayFunc(Draw);<BR>>>
glutReshapeFunc(Reshape);<BR>>> <BR>>> glutShowWindow();<BR>>=
;>
glutMainLoop();<BR>>> <BR>>> }<BR>>> ----- FAQ and OpenGL=
Resources at: </FONT><A
href=3D=22http://www.geocities.com/SiliconValley/Hills/9956/OpenGL=22><FONT face=3D=
Arial
size=3D2>http://www.geocities.com/SiliconValley/Hills/9956/OpenGL</FONT></A><=
FONT
face=3DArial size=3D2> -- Author: </FONT><A href=3D=22mailto:[email protected]=22><FON=
T
face=3DArial size=3D2>[email protected]</FONT></A><BR><FONT face=3DArial
size=3D2>>> INET: </FONT><A href=3D=22mailto:[email protected]=22><FONT face=3DA=
rial
size=3D2>[email protected]</FONT></A><FONT face=3DArial size=3D2> Fat City Hosting=
, San
Diego, California -- </FONT><A href=3D=22http://www.fatcity.com=22><FONT face=3DAri=
al
size=3D2>http://www.fatcity.com</FONT></A><BR><FONT face=3DArial size=3D2>>>=
;
--------------------------------------------------------------------- To RE=
MOVE
yourself from this mailing list, send an<BR>>> E-Mail message to:
</FONT><A href=3D=22mailto:[email protected]=22><FONT face=3DArial
size=3D2>[email protected]</FONT></A><FONT face=3DArial size=3D2> (note EXACT
spelling of 'ListGuru') and in the message BODY, include a line<BR>>>=
containing: UNSUB OPENGL-GAMEDEV-L (or the name of mailing list you want to=
be
removed from). You may also send the HELP<BR>>> command for other
information (like subscribing).<BR>>><BR>> <BR>>
Servus,<BR>> Gernot<BR>> <BR>> GPU. 3D Vision. Europe.=
Future. Now.<BR>> Drop by: </FONT><A
href=3D=22http://www.mpi-sb.mpg.de/~gziegler=22><FONT face=3DArial
size=3D2>www.mpi-sb.mpg.de/~gziegler</FONT></A><FONT face=3DArial size=3D2> -
</FONT><A href=3D=22http://www.geofront.eu=22><FONT face=3DArial
size=3D2>www.geofront.eu</FONT></A><BR><FONT face=3DArial
size=3D2>></FONT><!-- SPAMfighter Signature --><br><hr>Estoy utilizando la=
versi=F3n gratuita de SPAMfighter para usuarios privados.<br />Ha eliminado =
29139 correos spam hasta la fecha.<br />Los abonados no tienen este mensaje=
en sus correos.<br />=A1Pruebe <a href=3D=22http://www.spamfighter.com/les=22>SPAM=
fighter</a> gratis ya!<br /></BODY></HTML>
------=_NextPart_000_001D_01C8F286.C6CE2FC0--
-----
FAQ and OpenGL Resources at:
http://www.geocities.com/SiliconValley/Hills/9956/OpenGL
--
Author: =?iso-8859-15?Q?Rhadam=E9s_Carmona?=
INET: [email protected]
Fat City Hosting, San Diego, California -- http://www.fatcity.com
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [email protected] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).