PDA

View Full Version : Texture a point defined by GL_POINTS



FlemTeam
01-23-2002, 12:29 PM
Hello !

I am using GL_POINTS to create some dot everywhere on my screen, and now I would like to apply a texture on my points (I made them big with glSizePoint(64) http://www.opengl.org/discussion_boards/ubb/wink.gif

The problem is that I can't set the mapping coordinate to this point.. so I just have 1 color on my whole point...

Any idea ?

Leyder Dylan
01-23-2002, 12:45 PM
Oh my god, I don't think that you can texture a point.

FlemTeam
01-23-2002, 01:09 PM
... In D3D it's easy.. I can't beleive I can't in OpenGL ! :-(

zeraiam
01-23-2002, 01:12 PM
It seems that you will have to make billboarded (allways facing camera) quads to use texturing.

FlemTeam
01-23-2002, 01:22 PM
I see...

Is there any option to get a billboarded quad or should I always use a transformation to re-orient this quad ?

zeraiam
01-23-2002, 01:27 PM
You'll have to calculate the right transformation at each frame I'm afraid. But you can find many resources on the web about billboarding.

FlemTeam
01-23-2002, 01:29 PM
I found some documentation about the subject. so it is a library... But I prefer doing it by myself. Thank you for your help !

endo
01-23-2002, 03:10 PM
I thought you could texture map any primitive? Is this true?

tfpsly
01-23-2002, 08:41 PM
I think there is an NVidia extension for this