LOD sphere mesh uses NV extensions

Report bugs, bug fixes and workarounds here.
Topic author
Broken
Posts: 6
Joined: 25.03.2003
With us: 21 years 10 months

LOD sphere mesh uses NV extensions

Post #1by Broken » 27.03.2003, 13:39

1.3.0pre4 was crashing on my machine with a Radeon 9700 so I decided to have a look.
In LodSphereMesh::Render you've got:


glEnableClientState(GL_VERTEX_ATTRIB_ARRAY6_NV);
glx::glVertexAttribPointerNV(6, 3, GL_FLOAT, 0, tangents);

with a nice assume NV extensions comment :roll: which of course will crash on any pc with an ati card as glVertexAttribPointerNV will be a null pointer. I had a look for the equivalent ARB extensions but I didn't have a clue. There are some nasty looking function names in there.

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 23 years
Location: Seattle, Washington, USA

LOD sphere mesh uses NV extensions

Post #2by chris » 27.03.2003, 19:26

Broken wrote:1.3.0pre4 was crashing on my machine with a Radeon 9700 so I decided to have a look.
In LodSphereMesh::Render you've got:


glEnableClientState(GL_VERTEX_ATTRIB_ARRAY6_NV);
glx::glVertexAttribPointerNV(6, 3, GL_FLOAT, 0, tangents);

with a nice assume NV extensions comment :roll: which of course will crash on any pc with an ati card as glVertexAttribPointerNV will be a null pointer. I had a look for the equivalent ARB extensions but I didn't have a clue. There are some nasty looking function names in there.


Oops! When attempting to add a standard OpenGL 1.4 render path to Celestia, I neglected to convert that function to use glVertexAttribPointerARB when the NVIDIA extension isn't used. This is obviously what's been preventing bump-mapping and other effects from from working on ATI cards. I'll fix this ASAP and put out another prerelease. For now, you can uncomment this line:

IgnoreGLExtensions [ "GL_ARB_vertex_program" ]

in celestia.cfg. This will disable the advanced rendering effects, but it will at least prevent crashing.

--Chris

Topic author
Broken
Posts: 6
Joined: 25.03.2003
With us: 21 years 10 months

Post #3by Broken » 28.03.2003, 14:35

Good stuff. Thanks.

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 23 years
Location: Seattle, Washington, USA

Post #4by chris » 28.03.2003, 19:28

I believe that I've fixed the problem. Give 1.3.0pre5 a try:

http://www.shatters.net/celestia/files/celestia-win32-1.3.0pre5

--Chris

Topic author
Broken
Posts: 6
Joined: 25.03.2003
With us: 21 years 10 months

Post #5by Broken » 29.03.2003, 19:40

:D Fixed!
Yay for shiny bumpy planets!


Return to “Bugs”