• Welcome to Vampyre Imaging Library Forum. Please login or sign up.
 
22 November 2024, 05:51:30

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Wodzu

1
News & Announcements / Re: Next update info: 0.80
1 September 2011, 19:16:50
Great mate!

Thank you very mich for your support :-)
2
Hi Galfar.

Do you continue development of your library? Or is it in a frozen state?:)
3
Thank you.

I've managed to compile OpenGLDemo under Lazaurs. Blending works nicely!
4
Thank you Galfar for such quick replay.

By file format I've meant the format of data A8R8G8B8 or something like that.
I am quite new to the OpenGL so I am sure it is my fault;)

Take a look at the screenshot. On the left we have PNG texture on the right we have BMP texture. Both are on the size 256x256.
BMP texture is displayed correctly PNG is not.



To be honest I am not sure that I've set up the blending properly. I've set up only only Alpha and not blending (cause I do not know how yet). So I have 1 bit transperency now.

  glAlphaFunc( GL_GREATER, 0 );
  glEnable( GL_ALPHA_TEST );
                  

I've also attached a compiled example program with source code.

Thank you for your time.
5
Hi guys.

I am problem with PNG files under OpenGL. The file is an PNG image (256x256) with many levels of transparency.

I am loading it like this:

var
  Textures: array[1..6] of GLuint;   

  Textures[4] := LoadGLTextureFromFile('Images\font_0.png');


And I am displaying it on the quad like this:

glBindTexture(GL_TEXTURE_2D, Textures[4]);
glBegin(GL_QUADS);
glTexCoord2f(0, 0);
glVertex3f(-2, 2, 1);

glTexCoord2f(1, 0);
glVertex3f(2, 2, 1);

glTexCoord2f(1, 1);
glVertex3f(2, -2, 1);

glTexCoord2f(0, 1);
glVertex3f(-2, -2, 1);
glEnd();   


However, the file is not displayed correctly. It looks disrupted. I suspect that I need to explictly state somewhere the file format to OpenGL?

Do I need to write my own texture loading routine in the case of PNG file?

Thanks for your time.
SMF spam blocked by CleanTalk