[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nel] Troubles withs drawQuad
From: |
Andi [ Debug ] |
Subject: |
Re: [Nel] Troubles withs drawQuad |
Date: |
Fri, 26 Nov 2004 08:02:38 -0600 |
void CDriverUser::drawQuad (float x0, float y0, float x1, float y1, CRGBA
col)
{
NL3D_MEM_DRIVER
NL3D_HAUTO_DRAW_DRIVER;
_MatFlat.setColor(col);
_MatFlat.setBlend(true);
CQuad quad;
quad.V0.set(x0,y0,0);
quad.V1.set(x1,y0,0);
quad.V2.set(x1,y1,0);
quad.V3.set(x0,y1,0);
drawQuad(quad, _MatFlat);
}
after poking about this ( the function you use to draw a quad )
just uses the 2d/3d quad functions with some basic configuration
of material.
this is almost exactly what drawbitmap does ( uses a quad with
material ) so code wise i cannot see anything obvious to prevent
it drawing.
try emptying the depth buffer before you render it may help it
may not without seeing more of your code and the order of things
i can only guess.
PS:
_Driver->clearZBuffer();
which will empty the RGBA back buffer only
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
D E B U G
N E V E R B O R N E N T E R T AI N M E N T
D e s i g n L e a d & P l u g i n C o d e r
w w w . n e v e r b o r n . n e t
----- Original Message -----
From: "Stéphane CHAPLAIN" <address@hidden>
To: "Developer's list for the NeL platform" <address@hidden>
Sent: Friday, November 26, 2004 7:34 AM
Subject: RE : [Nel] Troubles withs drawQuad
I'm sure it is before swapbuffers because if I add these two lines in my
function :
NL3D::UTextureFile *tex = mDriver->createTextureFile("tmp.tga");
mDriver->drawBitmap(0,0,getPosWidth(),getPosHeight(),*tex, true,
NLMISC::CRGBA(255,255,255,255));
I can see the tmp.tga drawn on the screen.
I have made other tests on empty backbuffer with the same code:
Try do draw a Quad with nothing in the buffer => Nothing on screen
Try to draw a quad then a line in the buffer => nothing on screen.
Draw a texture, then the quad, then the line => I can see all
Could it be a Z issue??
-----Message d'origine-----
De : address@hidden
[mailto:address@hidden De la part de
Andi [ Debug ]
Envoyé : vendredi 26 novembre 2004 14:00
À : Developer's list for the NeL platform
Objet : Re: [Nel] Troubles withs drawQuad
since personally i use the draw quad functions that take a prebuilt quad
class as parameter i have no expereience with the 2d only versions.
i would focus your search for issues on render timing ake sure its before
you swap buffers and so forth
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
D E B U G
N E V E R B O R N E N T E R T AI N M E N T
D e s i g n L e a d & P l u g i n C o d e r
w w w . n e v e r b o r n . n e t
----- Original Message -----
From: "Stéphane CHAPLAIN" <address@hidden>
To: <address@hidden>
Sent: Friday, November 26, 2004 2:25 AM
Subject: [Nel] Troubles withs drawQuad
Hi,
I have a problem with the drawQuad func. Here is my sample code :
mDriver->setMatrixMode2D(CFrustum (0.0f,getWindowWidth(),
0.0f,getWindowHeight(), 0.0f, 1.0f,false));
NLMISC::CRGBA col = NLMISC::CRGBA(color.R,color.G,color.B,color.A);
mDriver->drawQuad(rect.left,rect.bottom,rect.right,rect.top,col);
This occurs after doing a render (the backbuffer is full ! ) and I want to
draw somtehing in it . Pb : This has no effect !
It has worked with older version of NeL. Has something necessary been added.
Stephane
_______________________________________________
Nel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/nel-all
_______________________________________________
Nel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/nel-all
_______________________________________________
Nel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/nel-all