Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6157461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:47:24+00:00 2026-05-23T20:47:24+00:00

I have a compass style needle, free to spin. I need it to glow

  • 0

I have a compass style needle, free to spin.

I need it to glow when it approaches a certain orientation, say 55 degrees.

I want to have NeedleView subclass UIView, so I can manipulate (NeedleView*)needleView as if it was a UIView, just have a couple of extra methods
– (void) feedAngle: (float) theta;
– (void) feedGlow: (float) glow_01;

doing a bit of research, I have found that the common technique is to take a greyscale copy of the needle’s image, blur it, save it as a GL texture, and then wrap it onto a quad that sits behind the actual needle’s quad.

then I am a bit woolly….

I guess I set the RGBA on the corner points to be (r,g,b) of my desired glow colour, a=glowFactorForThisFrame

and then I set glBlendmode to something appropriate

and then I draw the textured quad for the blur

what I want is something where Alpha is 1 everywhere on the original needle, but it bleeds gradually to complete transparency as we move further away

…

for a start, I would like to find some code that takes care of blurring a greyscale bitmap, I would rather do this from code than in photo shop. (I realize this would take a lot of time on an actual device, so maybe I can calculate it the first time the app is run, save it to file, and subsequently just load from file)

secondly, I’m very sketchy on the precise details of what I have to do.

could someone help me in on either of these points?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T20:47:24+00:00Added an answer on May 23, 2026 at 8:47 pm

    I experimented with a lot of approaches here.

    basically I neeed two images; one glowing and one not.

    then I can draw them as CALayers on top of one another, and hijack CADisplayLink, setting

    glowLayer.opacity = glowFac;
    dullLayer.opacity = (1 - glowFac);
    

    I also played with fiddling around in GL shaders, passing the glow factor as a uniform, but this is a ton of code to do basically the same thing.

    NB I needed to find a graphic artist to ‘glow’ the image

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem using compass-style remotley over ssh and my favorite text-editor textmate.
I have a compass application which is using orientation sensor and every time the
I have a Wifi iPad and this compass actually knows the direction of north.
have a problem. At first look at this HTML <div id=map style=background-image: url(map.png); width:
Have 2 tables in Access 2007, both lists of certain tasks to be accomplished.
Does HTC have a Compass API for devices like the HD2? I'm hoping to
I have a Desire Z and when moving to fast the compass hardware starts
Suppose we have 2 sprite folders inside the img folder of a standard Compass
I am using compass to produce my CSS stylesheets. In my style sheets, I
i am developing an application in which i have to record compass reading. which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.