Sign in to follow this  
harsh_sat

OpenGL Texture problem

Recommended Posts

Hi All, I am Currently work with SharpGL.I need to Apply texture to .COB (files) object ,which is imported object. i have problem with that so give me reply with solution immediately. and also i have another question . how can i import .X (DirectX) file in SharpGL / OpenGL ? Thank you.

Share this post


Link to post
Share on other sites
1) You need to be much more specific, people aren't going to just give you a fully working solution.

2) OpenGL doesn't handle loading files, you have to do that manually, and pass the vertex data to OpenGL

Share this post


Link to post
Share on other sites
hi harsh

i m also from india (delhi). which company r u working for? and which project r u on.

i don't know about sharpGL. But i lernt openGL for some time back. i think let me explain u one thing, that u can't load any file in openGL. if u r in dev C++ then you need to use C++ functions to load file and then convert that data to vertex buffer and pass to openGL.

for doing all this stuff, u first need to understand the x file format completely. or u may find some code on the net that will do the same. But my opinion is that u understand the x file format even using someone else's code.

happy coding

Share this post


Link to post
Share on other sites
I agree:

OpenGL doesn't help you with loading data from a file. You have to do it on your own and pass the data to OpenGL in a format it understands.

That might also be the answer to you first question:
If .COB files don't include texture coordinates you'd either have to calculate them on your own or use automatic texture coordinate generation.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this