|
OK, my mistake it seems NULL points the parent at the main application window. Sorry!
Ant.
|
|
|
|
|
Hi,all:
A complex but not intersect concave polygon,use gluNewTess to create a GLUtesslator object.How to realize? thanks
|
|
|
|
|
You will likely have to split it up into triangles. I am guessing if you search around there are probably algorithms to do it, if you can't split it up some other way (e.g., you know what the polygon is going to be, so you can split it up in the code.)
Sometimes I feel like I'm a USB printer in a parallel universe.
|
|
|
|
|
In fact,I know there are some algorithms that can do.
In the RedBook of OpenGL,I find that the glu library has already gave us the routines such as GLUtesselator,gluNewTess and gluCallBack,but when I try to use these functions in my project(v C++ platform) I could not get it work probably.I don't know why!
the TedBook says as bellow
"The OpenGL library (GL) is designed for low-level operations, both streamlined and accessible to hardware acceleration. The OpenGL Utility Library (GLU) complements the OpenGL library, supporting higher-level operations. Some of the GLU operations are covered in other chapters. Mipmapping (gluBuild*DMipmaps()) and image scaling (gluScaleImage()) are discussed along with other facets of texture mapping in Chapter 9. Several matrix transformation GLU routines (gluOrtho2D(), gluPerspective(), gluLookAt(), gluProject(), and gluUnProject()) are described in Chapter 3. The use of gluPickMatrix() is explained in Chapter 13. The GLU NURBS facilities, which are built atop OpenGL evaluators, are covered in Chapter 12. Only two GLU topics remain: polygon tessellators and quadric surfaces, and those topics are discussed in this chapter.
To optimize performance, the basic OpenGL only renders convex polygons, but the GLU contains routines to tessellate concave polygons into convex ones, which the basic OpenGL can handle. Where the basic OpenGL operates upon simple primitives, such as points, lines, and filled polygons, the GLU can create higher-level objects, such as the surfaces of spheres, cylinders, and cones.
..."
You can find this article here:
http://www.dcc.unicamp.br/~lmarcos/courses/mc603/redbook/chapter11.html
So if you have used these routines,would you please send me a example.
Thanks!!
|
|
|
|
|
Im using a Java dialog to call a C++ app using JNI, All I want to do is pass an object into the cpp app, there is no writing to be done to the object, just passing strings and bool values. How do I change my main() in cpp to be able to accept this object and be able to compile it into a .dll
Any articles or help is appreciated.
Cheers
We have a mathematician, a different kind of mathematician, and a statistician!
|
|
|
|
|
|
HI,
I have an VC++ application (VC++ 7.0) working fine on win 2000, but on XP I get a "Dialog Failed" error while launching an ODBC Data Source administrator dialog (Selecting an user DSN)
I got a suggestion to check the MDAC version, I did it and found that the XP machine has the latest MDAC 2.8.
Can anyone let me know what could be wrong? Or am I missing out something else!
Thanks
|
|
|
|
|
Hi everybody,
I want to export bmp files as Eps file format.if anyone know these things ,reply me.
|
|
|
|
|
You could try with BTNexGenIPL in combination with Ghostscript. Both are open source libraries, with BTNextGenIPL you can read the bmp, and with ghostscript you can create EPS files... perhaps worth a look for you, not sure if there are libraries out there which can do both. (You might not even need BTNexGenIPL, not sure if you can use raw data for Ghostscript input, don't think you can though)
|
|
|
|
|
I am creating Images Like this ...It works for JPG,gif,png.But not for EPS.SO I need a Method to export Images as EPS.
Image image(L"Mosaic.bmp");
CLSID pngClsid;
GetEncoderClsid(L"image/eps", &pngClsid);
image.Save(L"Mosaic2.eps", &pngClsid, NULL);
But this is not working.
Mosaic.bmp is real bmp file. Now I think this is clear for u what I going to do.
|
|
|
|
|
I'm trying to convert a CString to UTF-8, anyone who knows haw this is to be done? I've read a lot of pages on the Internet about WideCharToMultiByte but I can't get it to work. If someone knows how to do I would be very greatful for your help.
Thanks
|
|
|
|
|
If your application is compiled with UNICODE (and _UNICODE ) defined, your CString s will contain WCHAR s. You should be able to use WideCharToMultiByte directly, passing the CP_UTF8 value.
If your application is not compiled with UNICODE , your CString s will contain char s, which may represent multi-byte character strings (depending on the locale). There are no routines for directly converting a char -oriented string from one character set to another; instead, you should convert to a WCHAR string using MultiByteToWideChar , then convert to UTF-8 as above.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hello,
<br />
CFileDialog dlg(TRUE, NULL, NULL, OFN_HIDEREADONLY|OFN_FILEMUSTEXIST, "SI Projekte (*.3dsi)|*.3dsi |Alle Dateien (*.*)|*.*||", this);<br />
i only like to show my .3dsi files, but this only shows folders?
Thanks, Mark
|
|
|
|
|
This way works.
CFileDialog dlg(TRUE, "3dsi", "*.3dsi",
OFN_HIDEREADONLY|OFN_FILEMUSTEXIST,
"SI Projekte (*.3dsi)|(*.3dsi) |Alle Dateien (*.*)|*.*||",
this);
Maxwell Chen
|
|
|
|
|
I call it like this
char BASED_CODE szFilter[] = "3D SI Files (*.3dsi)|*.3dsi|All Files (*.*)|*.*||";
CFileDialog dlg(TRUE,"3dsi",NULL,OFN_ENABLESIZING|OFN_OVERWRITEPROMPT|OFN_HIDEREADONLY,szFilter,this);
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
"*.3dsi" should be passed as argument to the third parameter to select the clone, otherwise nothing would show.
Maxwell Chen
|
|
|
|
|
The third parameter is "the initial filename that appears in the filename edit box. If NULL, no filename initially appears."
He never said he wants something by default
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Specifying "*.3dsi" does not select any specific file by default.
Originally I tested it with NULL as what you said, but no file appeared. So I looked at the example in MSDN, and found that something was required for the 3rd param.
Maxwell Chen
|
|
|
|
|
allright, it works!
Thanks, Mark
|
|
|
|
|
Hi Guys,
My requirement is little bit peculier. I would like to keep the Screen saver in Dialog Box like we keep controls on the Dialog BOx.
thanks in advance.
bbye
|
|
|
|
|
take a look at this article:
http://www.codeproject.com/bitmap/ballfusion.asp
go through the screen-saver api see if the fChildPreview can help you out...
|
|
|
|
|
Hi all
This is my first mail to this forum.
I am seeing this message while compiling my DLL(on WIN2K), which is using SDK.
"NOTE: WINVER has been defined as 0x0500 or greater which enables
Windows NT 5.0 and Windows 98 features. When these headers were released,
Windows NT 5.0 beta 1 and Windows 98 beta 2.1 were the current versions.
For this release when WINVER is defined as 0x0500 or greater, you can only
build beta or test applications. To build a retail application,
set WINVER to 0x0400 or visit http://www.microsoft.com/msdn/sdk
to see if retail Windows NT 5.0 or Windows 98 headers are available.
See the SDK release notes for more information."
Origionaly it didn't compiled a free build but when i define this in my header file,it does compile a free build.
#define _WIN32_WINNT 0x0500
#define WINVER 0x0500
Can someone please tell how to rectify it.
Where to get these retail headers.,i am using the SDK CD which came with Oct. 2002 MSDN subscription.
Thanks in advance
Regards
Hardeep
|
|
|
|
|
It sounds like your directories are out of order: you're still including the headers which came with Visual Studio 6.0.
You should see if the SDK install put options on the Start Menu to 'Register PSDK Directories With Visual Studio', which recent versions of the SDK do. If you want a more up-to-date SDK, you can download it from http://www.microsoft.com/msdownload/platformsdk/sdkupdate/default.htm[^].
Otherwise, ensure that the SDK directory appears before the VC98 directory in Tools > Options > Directories.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
I'm writing a TCP client and server program which uses sockets, ReadFile, overlapped I/O and completion ports. To test it I've written one client and one server program which use standard winsock functions for the sake of simplicity.
When testing the server part of the program ReadFile will sometimes fail giving ERROR_IO_PENDING as the reason.
What should I do to correct this error situation? If I "leave it alone" it never wakes up again. What I've done thus far is simply close the socket and discard the session attached to it. There has to be a more intelligent way than just discovering something went wrong and killing the session.
Thanks,
Olof
|
|
|
|
|
Surely 'ERROR_IO_PENDING' just means that you will get the data in an overlapped operation later? IOW it's not an error but an intrinisic part of overlapped IO.
Sorry if I've missed the point.
Paul
|
|
|
|