?
Solved

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

Posted on 2005-03-04
8
Medium Priority
?
8,636 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
8 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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

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…
As game developers, we quickly learn that Artificial Intelligence (AI) doesn’t need to be so tough.  To reference Space Ghost: “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer. (http://www.youtu…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses
Course of the Month13 days, 5 hours left to enroll

777 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