| | |
Applying texture to sphere turns it blue
Thread Solved |
•
•
Join Date: Jan 2008
Posts: 79
Reputation:
Solved Threads: 0
Hello. I've been messing around with applying textures and i managed to apply one with no hiccups. By subsequent attempts , however, keeps turning my spheres blue! I don't know what to do.
I'm attaching what i've done so far because it's kind of long. If anyone can help me i would really appreciate it.
I'm attaching what i've done so far because it's kind of long. If anyone can help me i would really appreciate it.
You may want to mention it is OpenGL.
I cut in my own textures and Kind of cool, but I only see one blue planet.
Adding your textures would be cool. If you're worried about copy cats, Put a big X or something on your textures so that they still look about right, though contaminated with debris!
In my code I typically have the following Render...
I cut in my own textures and Kind of cool, but I only see one blue planet.
Adding your textures would be cool. If you're worried about copy cats, Put a big X or something on your textures so that they still look about right, though contaminated with debris!
In my code I typically have the following Render...
C Syntax (Toggle Plain Text)
cgGLSetTextureParameter( cg_BlinnTexture, iTex ); cgGLEnableTextureParameter( cg_BlinnTexture ); glEnable( GL_TEXTURE_2D ); glBindTexture(GL_TEXTURE_2D, iTex); glEnableClientState( GL_TEXTURE_COORD_ARRAY ); glTexCoordPointer( 2, GL_FLOAT, 0, pUVAry ); // other vertex information then draw glDisableClientState( GL_TEXTURE_COORD_ARRAY ); glBindTexture(GL_TEXTURE_2D, 0); // not necessary but I include it anyway! gllDisable( GL_TEXTURE_2D ); cgGLDisableTextureParameter( cg_BlinnTexture );
Last edited by wildgoose; Jul 6th, 2009 at 3:13 am. Reason: addendum
•
•
Join Date: Jan 2008
Posts: 79
Reputation:
Solved Threads: 0
Hey wildgoose! Thanks for replying. I did forget to say it was in opengl but you were smart enough to realize that it was =). I can upload the textures..its no big deal. They aren't personally made so i don't care. The only planet that should be remotely blue is the last one in the outer ring. The ones with the textures are orginallt colored white but when i apply the textures, they turn blue for some weird reason. Your render code looks similiar to mines minus a few different function calls.
Last edited by orangejuice2005; Jul 6th, 2009 at 3:54 am.
•
•
Join Date: Jan 2008
Posts: 79
Reputation:
Solved Threads: 0
Yes your right! Theres something definately wrong with the pictures here. I tried mapping the earth texture to another planet and it turned out ok. I' just tried changing the aspect ratio to what you recommended but that doesn't seem to be fixing the problem. I'll need to tinker with this in the morning or maybe get a different picture or resize it using a different program.
•
•
Join Date: Jan 2008
Posts: 79
Reputation:
Solved Threads: 0
I'm using images that adhere to that 2^N rule but am still getting the same problem. I do not believe this to be a power-of-2 issue or problem loading a texture that is beyond what my opengl implementation can do. I've also tried converting the images to .raw format to see if that changed anything but i just ended up with image distortions and you literally can't make anything out.
•
•
Join Date: Jan 2008
Posts: 79
Reputation:
Solved Threads: 0
•
•
•
•
I can't examine your code right now, but have you tried increasing your radius to 4.0 or so, stopped the orbits, and rotated in place to see your planets better?
•
•
•
•
Originally Posted by wildgoose
I normally don't use the glQuad stuff. I use my own meshes, even for sphere's.
![]() |
Similar Threads
- Texture mapping for sphere! (Game Development)
- Blue screen of death when windows lis trying to load... (Troubleshooting Dead Machines)
- Convert mouse position to Texture position on ball (Game Development)
- New layout comments (DaniWeb Community Feedback)
- i think my computer is infected (Viruses, Spyware and other Nasties)
- Converting Images Please Help (C#)
- Crazy hyperlinks not behaving as expected!!! (Web Browsers)
- Cpu Performance low (Motherboards, CPUs and RAM)
- Cannot boot Windows XP (Windows NT / 2000 / XP)
Other Threads in the Game Development Forum
- Previous Thread: C++ Help Needed Please!
- Next Thread: Episode 3 - Development of FPX Game engine
| Thread Tools | Search this Thread |
3d advertising ai algorithm ban c++ cambridge camera censorship china competition console development engine fov fpx game gamer games gaming gauntanamo government idaho in-gameadvertisement intellectualproperty laracroft live manhunt math mathematics matrix mercenaries microsoft mmorpg modded msn naked news nintendo obama palin physics pirate playstation politics projection ps3 rpg search software sony stephenhawking stocks studio technology terrorism tombraider uk videogame web wii world-of-warcraft xbox xbox-live xbox360





