Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

3DS Max models needed to import into OpenGL using Dev C++ GUI compiler

Posted on 2005-03-04
8
Medium Priority
?
8,646 Views
Last Modified: 2013-12-06
I am currently devloping a game which requires various 3ds max models to be imported into the game where they can then be manipulated by the program.

After a good search on the internet I found 3D Exploration. Using this I was able to convert the .3ds files into CPP code.

Having told 3D Exploration to covert as a Application, I then compiled the code. I got the following errors:

HopeOpenGL/grass.cpp:15256:63: warning: multi-character character constant
HopeOpenGL/grass.cpp: In function `BOOL ScaleImage(DIB2D&, GLTXTLOAD&)':
HopeOpenGL/grass.cpp:15322: error: `GL_BGR_EXT' undeclared (first use this function)
HopeOpenGL/grass.cpp:15322: error: (Each undeclared identifier is reported only once for each function it appears in.)

HopeOpenGL/grass.cpp:15328: error: `GL_BGRA_EXT' undeclared (first use this function)

HopeOpenGL/grass.cpp: In function `void SetDCPixelFormat(HWND__*, HDC__*)':
HopeOpenGL/grass.cpp:15635: error: non-lvalue in assignment

Any help at resolving these errors and explaining to me how I might prevent them with the future meshes would be appreciated
0
Comment
Question by:richardwhiuk
  • 2
  • 2
5 Comments
 

Author Comment

by:richardwhiuk
ID: 13461719
I managed to fix some of the errors. It appears on a W32 environment I needed to add glext.h to be includes. The errors and warnings now are:

HopeOpenGL/grass.cpp:15257:63: warning: multi-character character constant
HopeOpenGL/grass.cpp: In function `void SetDCPixelFormat(HWND__*, HDC__*)':
HopeOpenGL/grass.cpp:15636: error: non-lvalue in assignment

15255 - 15257 code lines read:

       BITMAPFILEHEADER bmfh;
       ReadFile(hfile,&bmfh,sizeof(BITMAPFILEHEADER),&readed,0);
       if((readed==sizeof(BITMAPFILEHEADER)) && (bmfh.bfType=='BM'))

15635 - 15636 code lines read:

        (LPLOGPALETTE) lpPalette = (LPLOGPALETTE)HeapAlloc (hHeap, 0,
            sizeof (LOGPALETTE) + (nColors * sizeof (PALETTEENTRY)));

0
 
LVL 2

Expert Comment

by:shirsoft
ID: 13542220
a dumb guess but u may try removing the first LPLOGPALETTE type cast ... i haven't seen something like that

The warning as u might be knowing is coz of the bitmap header where it tries to compare it with 'B'<<8+'M', i think if use it in this fashion the warning will go
0
 

Expert Comment

by:sunilsi
ID: 13598346
i haven't try this but there are many tutorial and source code aviliable on net to open the 3ds file in openGL then y u r not trying that. that will be very useful.
0
 

Author Comment

by:richardwhiuk
ID: 13604375
Can you name any specific websites?
0
 

Accepted Solution

by:
sunilsi earned 1000 total points
ID: 13608702
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Artificial Intelligence comes in many forms, and for game developers, Path-Finding is an important ability for making an NPC (Non-Playable Character) maneuver through terrain.  A* is a particularly easy way to approach it.  I’ll start with the algor…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question