On Fri, Nov 25, 2011 at 7:00 PM, Jeppe Græsdal Johansen
<jjoha...@student.aau.dk> wrote:
> Are you sure width and height are powers of two here?
>
> And shouldn't you be calling glDrawArrays at line 158 instead of line 148?

I fixed the pixel format missmatch, made width=height=128 and changed
glDrawArrays like you proposed but still no change.

On Sat, Nov 26, 2011 at 3:06 PM, Reimar Grabowski <reimg...@web.de> wrote:
> It looks like you are using lit geometry, any reason for that?

What is lit geometry? Google didn't help me here.

I just want to draw a 2D image which fills the entire screen. I don't
want any 3D at all. Only 1 texture which covers the entire screen.

The worse part here is that with the power of two limitation it seams
that I will have a lot of problems, because with this limitation I
can't match correctly the screen format. Usually the screens are 2x3
in proporsions, but power of two allows only 1x2 from what I
understand.

> Why do you enable blending after drawing and at all?
> Why do you set up your matrices after drawing? (See Jeppes remark about 
> glDrawArrays)
> Why do you enable texturing after drawing? (You only loose the first frame as 
> for the next it will be enabled, but it is strange nonetheless)

No idea about any of this ... I copied the code from a tutorial,
probably the guy wasn't vey good in OpenGL.

> You said there is a pixel format mismatch. AFAIR your texture should be white 
> if something is wrong with it, but I am not 100% sure in case of a format 
> mismatch.

I already fixed the missmatch.

> Disable blending, texturing, lighting and face culling and just draw a 
> colored quad to check if your matrix setup in combination with placement of 
> the quad in the world is correct.
> Reenable face culling and check.
> Reenable texturing and check (fix your pixel format mismatch before that).
> Reenable lighting if needed.
> Reenable blending if needed.
> Be generous with glGetError calls see
> http://www.khronos.org/opengles/documentation/opengles1_0/html/glGetError.html.

ok, thanks, I'll try that (as soon as figure out how to do that)

-- 
Felipe Monteiro de Carvalho
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to