Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » OpenGL example
OpenGL example [message #159] Mon, 28 November 2005 13:41 Go to next message
jobs is currently offline  jobs
Messages: 6
Registered: November 2005
Promising Member
First, you done great job with Ultimate, congratulations!

I think it should be casting to (Point) in next line of
/geom/Draw/plotter.cpp

Quote:

ImageMarker::ImageMarker(const AlphaArray& srcimg, ...)
{
hotspot = (ignore_hotspot ? (Point) srcimg.GetSize() >> 1 : srcimg.GetHotSpot());


Otherwise it wouldn't compile.

But then I have linking errors:

Quote:

20 undefined symbol(s):
_glBegin@4 (referenced from c:\devel\ultimate\out\opengl\mingw.blitz.gui.main\$blitz.o:4 4; CameraCtrl::GLPaint(v
oid); CameraCtrl::GLPaint(); .text$_ZN10CameraCtrl7GLPaintEv)....


I compile and link with MingW.
Any suggestions what's going wrong?

Thanks!
Re: OpenGL example [message #170 is a reply to message #159] Tue, 29 November 2005 00:34 Go to previous messageGo to next message
gprentice is currently offline  gprentice
Messages: 260
Registered: November 2005
Location: New Zealand
Experienced Member
jobs wrote on Mon, 28 November 2005 07:41

First, you done great job with Ultimate, congratulations!

I think it should be casting to (Point) in next line of
/geom/Draw/plotter.cpp

Quote:

ImageMarker::ImageMarker(const AlphaArray& srcimg, ...)
{
hotspot = (ignore_hotspot ? (Point) srcimg.GetSize() >> 1 : srcimg.GetHotSpot());


Otherwise it wouldn't compile.

But then I have linking errors:

Quote:

20 undefined symbol(s):
_glBegin@4 (referenced from c:\devel\ultimate\out\opengl\mingw.blitz.gui.main\$blitz.o:4 4; CameraCtrl::GLPaint(v
oid); CameraCtrl::GLPaint(); .text$_ZN10CameraCtrl7GLPaintEv)....


I compile and link with MingW.
Any suggestions what's going wrong?

Thanks!



I believe the error GCC gives at line 1719 in plotter.cpp is a GCC bug as both Point and Size have non explicit constructor that allows implicit conversion between each other and the compiler is required to apply implicit conversions to rvalues of class type in ?: operator. You should probably write
hotspot = (ignore_hotspot ? Point(srcimg.GetSize() >> 1) : srcimg.GetHotSpot());

to keep GCC happy.

I don't get the linker errors you mention but I do get an error at line 9 of OpenGL.H in the examples/OpenGL folder
#include <GL/glaux.h>
- the error is "no such file or folder"

I'm puzzled, because there is no glaux.h file nor is there a GL directory/package - yet it builds and runs fine with VC7.1 ???

Graeme

[Updated on: Tue, 29 November 2005 00:35]

Report message to a moderator

Re: OpenGL example [message #171 is a reply to message #159] Tue, 29 November 2005 00:55 Go to previous messageGo to next message
gprentice is currently offline  gprentice
Messages: 260
Registered: November 2005
Location: New Zealand
Experienced Member

Quote:


I don't get the linker errors you mention but I do get an error at line 9 of OpenGL.H in the examples/OpenGL folder
#include <GL/glaux.h>
- the error is "no such file or folder"

I'm puzzled, because there is no glaux.h file nor is there a GL directory/package - yet it builds and runs fine with VC7.1 ???



ok, forget that. It's in the platform SDK. I didn't have paths setup correctly for GCC/ MingW as I haven't used it in U++ before.

Now I get a bunch of linker errors too.
e.g. undefined reference to glLoadIdentity - which is psdk function, - probably the other errors I have are too, so probably I have some path still not setup right or something. I'll try and investigate further, later.

Graeme
Re: OpenGL example [message #173 is a reply to message #171] Tue, 29 November 2005 08:13 Go to previous messageGo to next message
jobs is currently offline  jobs
Messages: 6
Registered: November 2005
Promising Member
thanks Graeme for answering!

I forgot to include OpenGL libraries in this example,
(that's missing in OpenGL example also)

So, there is no linking errors now.

Of course, casting to Point should be done as I wrote before.
Re: OpenGL example [message #174 is a reply to message #173] Tue, 29 November 2005 08:44 Go to previous messageGo to next message
jobs is currently offline  jobs
Messages: 6
Registered: November 2005
Promising Member
and you don't need glaux.h (I put comment there in OpenGL.h) and libglaux.a in this example Smile
Re: OpenGL example [message #175 is a reply to message #173] Tue, 29 November 2005 08:47 Go to previous messageGo to next message
gprentice is currently offline  gprentice
Messages: 260
Registered: November 2005
Location: New Zealand
Experienced Member
jobs wrote on Tue, 29 November 2005 02:13

thanks Graeme for answering!

I forgot to include OpenGL libraries in this example,
(that's missing in OpenGL example also)

So, there is no linking errors now.

Of course, casting to Point should be done as I wrote before.



It sounds like you know more than I do. I tried adding the opengl libraries into the package setup for the opengl example but couldn't figure out what to put in the "when" column (I tried MingW) - until I stole from the GlCtrl package

library(WIN32 GCC) "glaux glu32 opengl32";

I'm curious to know how you figured out how to do this? Are you an experienced U++ user ??

Graeme

Re: OpenGL example [message #176 is a reply to message #175] Tue, 29 November 2005 09:17 Go to previous messageGo to next message
jobs is currently offline  jobs
Messages: 6
Registered: November 2005
Promising Member
Quote:

I'm curious to know how you figured out how to do this? Are you an experienced U++ user ??


same way as you find out, by example
unfortunately, I'm not experienced user in U++, but I will try hard to become that Smile
Re: OpenGL example [message #178 is a reply to message #159] Tue, 29 November 2005 18:31 Go to previous message
rylek is currently offline  rylek
Messages: 79
Registered: November 2005
Member
Sorry for the missing (Point) cast; MSC is much more permissive in these situations and I'm normally releasing most of my applications for Windows, so I just didn't notice. I've already fixed that, you should see it in your next UVS sync or weekly snapshot.

Regards

Tomas
Next Topic: using the library from uvs
Goto Forum:
  


Current Time: Fri Apr 19 17:34:01 CEST 2024

Total time taken to generate the page: 0.03746 seconds