Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


basic question about lesson 1


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 GLnoobie   Members   -  Reputation: 122

Like
0Likes
Like

Posted 08 February 2009 - 07:36 PM

Forgive me if I'm overlooking something very basic, but I'm using Visual C++ 2008 express, and I believe it does not support the glaux library. Anyways I downloaded the replacement code as lesson 1 suggested but now I have no idea what to do with it or how to use it? Any help would be much appreciated.

Sponsor:

#2 lc_overlord   Members   -  Reputation: 436

Like
0Likes
Like

Posted 09 February 2009 - 01:29 AM

you don't need glAux, the only thing glaux is used for is bmp loading, and for that check the link in my signature.
But that's not until lesson 6.

#3 thecupus   Members   -  Reputation: 100

Like
0Likes
Like

Posted 08 April 2011 - 04:57 AM

hey, i've got a problem with lesson1 too. i use microsoft visual studio 2008 express edition. i've added the required .lib at project>>project properties>>linker>>input>>additional dependencies

but when i 'm trying to compile my code (it is just a copy-paste from the downloaded file to my own project), this error warning show up.


this is for every MessageBox () line,
error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [29]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

and this for another error warning,


error C2664: 'UnregisterClassW' : cannot convert parameter 1 from 'const char [7]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast


but when i'm trying to compile the downloaded file, it works fine!!
am i missing something? i'm still new playing with OpenGL.

i would greatly appreciate any help.

#4 SimonForsman   Crossbones+   -  Reputation: 6317

Like
0Likes
Like

Posted 08 April 2011 - 06:37 AM

hey, i've got a problem with lesson1 too. i use microsoft visual studio 2008 express edition. i've added the required .lib at project>>project properties>>linker>>input>>additional dependencies

but when i 'm trying to compile my code (it is just a copy-paste from the downloaded file to my own project), this error warning show up.


this is for every MessageBox () line,
error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [29]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

and this for another error warning,


error C2664: 'UnregisterClassW' : cannot convert parameter 1 from 'const char [7]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast


but when i'm trying to compile the downloaded file, it works fine!!
am i missing something? i'm still new playing with OpenGL.

i would greatly appreciate any help.


the conversion errors are due to the project using unicode which means the Windows message boxes will expect unicode strings, use wchar_t instead of char and L"some text" instead of "some text" for static strings. (http://unicode.org/standard/WhatIsUnicode.html)

you can also use std::wstring instead of std::string.

The Windows headers should also declare a TEXT macro, so rather than using L"some text" you can use TEXT("some text") and the code will keep working properly regardless of unicode support, for character variables the appropriate macro is TCHAR.

You could also add similar functionality for c++ strings using:
namespace std
{
typedef basic_string<TCHAR> tstring;
}

and so on for other streams if needed.

(If you only intend to support modern desktop systems then you can just ignore the conversion macros and just use unicode directly)
I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS