Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Texturemapping to gl_points



Same here - do quads.

----- Original Message ----- From: "Wesley Smith" <email@hidden>
To: "Kent Miller" <email@hidden>
Cc: "Mac OpenGL List" <email@hidden>
Sent: Friday, May 30, 2008 8:44 AM
Subject: Re: Texturemapping to gl_points



I would also use quads.  If you need screen-aligned billboards, you
can use the rows of the model-view matrix (assuming scale is 1) as the
basis for drawing the quad.  For example:

//screen-aligned axes
vec3 axis1 = vec3( gl_ModelViewMatrix[0][0],
gl_ModelViewMatrix[1][0],
gl_ModelViewMatrix[2][0]);

vec3 axis2 = vec3( gl_ModelViewMatrix[0][1],
gl_ModelViewMatrix[1][1],
gl_ModelViewMatrix[2][1]);

wes

On Fri, May 30, 2008 at 8:39 AM, Kent Miller <email@hidden> wrote:
Point sprites do this.

I would just look at using quads. I don't think there is much advantage to
point sprites unless you are doing something like a particle system with
thousands of points in which case point sprites can take your vertex data
rate down. GL Points have their own special set of quirks.


Kent

On May 30, 2008, at 8:30 AM, Mike wrote:

I am mapping texture to GL_POINT.
My point size varies but lets say it's 5x5 pixels. Currently the whole
point just samples single pixel from texture and point's texels are all that
same color.


How can I (or can I) map it so that it all texels in point are sampled
(1:1) from texture? i.e. if texture is 100 x 100px and point is 25x25px
(not smoothed) the point should represent 1/4 region of texture and with 4
points I could represent whole texture.


Thanks.

-Mike


_______________________________________________ Do not post admin requests to the list. They will be ignored. Mac-opengl mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Mac-opengl mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden

__________ Information from ESET NOD32 Antivirus, version of virus signature database 3147 (20080530) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



_______________________________________________ Do not post admin requests to the list. They will be ignored. Mac-opengl mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden
References: 
 >How to load imagefile for texture (Leopard) (From: "Mike mcFin" <email@hidden>)
 >Re: How to load imagefile for texture (Leopard) (From: Jean-Francois Roy <email@hidden>)
 >Texturemapping to gl_points (From: Mike <email@hidden>)
 >Re: Texturemapping to gl_points (From: Kent Miller <email@hidden>)
 >Re: Texturemapping to gl_points (From: "Wesley Smith" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.