Don't know what the other code did, but here's my idea demonstrated:
Glow texture http://i30.tinypic.com/o8fcqr.jpg
Test application (with sphere actually rotating realtime) http://i25.tinypic.com/jaja6q.jpg
You can have it better depending on scaling and glow texture. This one is 256x256 only cause i wanted to see how it looks

[pascal]unit Unit1;

interface

uses
Windows, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, dglOpenGL, nxGL, Geometry2;

type
TForm1 = class(TForm)
Timer1: TTimer;
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure Timer1Timer(Sender: TObject);
private
sphere: pgluQuadric;
public
end;

var Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
var f: array[0..3] of single;
begin
nxCreateGlWindow(handle);
tex.AddTexture('glow','glow.jpg');
sphere:=gluNewQuadric;
gluQuadricNormals(sphere,GLU_SMOOTH);
DefaultLights;
f[0]:=7;
f[1]:=-2;
f[2]:=6;
f[3]:=0;
glLightfv(GL_LIGHT0,GL_POSITION,@f);
end;

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
nxKillGLWindow;
end;

procedure TForm1.Timer1Timer(Sender: TObject);
const A_rad = 1.33;
var mat: TMatrix;
begin
nxClear(true,true);

glLoadIdentity;
glTranslatef(0,0,-4);
glRotatef(GetTickCount*0.02,0,1,0);

// Planet
glEnable(GL_DEPTH_TEST);
tex.SetTex(-1);
glColor3f(0.2,0.2,0.2);
gluSphere(sphere,1,30,30);
glDisable(GL_DEPTH_TEST);

// Atmosphere effect
glDisable(GL_LIGHTING);
tex.SetTex(0);
AddBlend(true);
glColor3f(0.4,0.6,1);
glGetfloatv(GL_MODELVIEW_MATRIX,@mat);
MatrixInvert(mat);
mat[3,0]:=0;
mat[3,1]:=0;
mat[3,2]:=0;
glMultMatrixf(@mat);
RectT(A_rad,-A_rad,-A_rad,A_rad);
AddBlend(false);
glEnable(GL_LIGHTING);

nxFlip;
end;

end.[/pascal]