|
|
| OpenLayer 1.9 Released! |
|
Zaphos
Member #1,468
August 2001
|
(As I said in the other thread) the new version you attached fixed the lines problem for me. Hooray
|
|
Fladimir da Gorf
Member #1,565
October 2001
|
Quote: (As I said in the other thread) the new version you attached fixed the lines problem for me. Hooray Finally! Time for the 1.91 release. Download 1.91, Update 1.9 to 1.91 (No precompiled demo), the Demo .exe only and the source only distribution
OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori) |
|
Steve Terry
Member #1,989
March 2002
|
Seems to have cleared up the line issue for me ___________________________________ |
|
fuzinavl
Member #4,105
December 2003
|
void Print( const std::string &text, int x, int baselineY, const RenderMode &mode); //RenderMode would need rotate() and stretch())
Quote: I'm most afraid of that the newcomers may not get the idea immediately, thus thinking that there's no way to rotate or stretch the Bitmaps. Fix that with demo programs and screenshots? or... maybe BlitRotated would call Blit(,, + Rotate(angle))? But having 2 ways of doing the same thing is just asking for work and confusion. Are all OL angles CCW positive(including transforms)? GfxRend: Ok, I'm converted. __________________________ |
|
Hrvoje Ban
Member #4,537
April 2004
|
I said: You forgot to remove Allegro/AllegroGL headers from Source only distribution. And again and again... EDIT: Ever thought about making DLL version on OpenLayer? |
|
Fladimir da Gorf
Member #1,565
October 2001
|
Quote: And again and again...
I'm hopeless I know Quote: Ever thought about making DLL version on OpenLayer? Well, I haven't thought that's necessary. Quote: void Print( const std::string &text, int x, int baselineY, const RenderMode &mode); Well, that's possible with the new system in fact. It requires some extra work in the TextRenderer's side, but still. Quote: maybe BlitRotated would call Blit(,, + Rotate(angle))? But having 2 ways of doing the same thing is just asking for work and confusion. That's what I thought as well. Quote: Might want to mention that arc and ellipse angles can be positive or negative. Yeah, I should indeed. OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori) |
|
Ron Ofir
Member #2,357
May 2002
|
Cool stuff! I have to check this out! I'm not done with "terrain renderer" yet though so I can't fiddle around with anyhing else. Quote: Ever thought about making DLL version on OpenLayer?
Wouldn't that be a little hard with the current rate of updates? Oh, and don't you think OL 2.0 should actually become OL 1.0? I mean, 1.0 wasn't a real finished one... |
|
Norebo
Member #5,930
June 2005
|
Hi, i have created a Bitmap-object from an Allegro BITMAP, but when i try to blit it to the screen nothing appears! I think that i have detected the reason in line 868 of file "Bitmap.cpp": bool Bitmap:: Load( BITMAP *bmp, bool hasAlphaChannel, bool convertMagicPink ) { Destroy(); this->bmp = bmp; this->isSolid = !hasAlphaChannel; width = width; height = bmp->h;
Instead of 'width = width' it should be 'width = bmp->w'. |
|
Fladimir da Gorf
Member #1,565
October 2001
|
Ouch, that's because of the search and replace I had to do because I didn't store the bitmap in the memory anymore... It also seems that this wasn't the only problem in the loading functions. Thanks Norebo, I'll post the version 1.92 immediately. OpenLayer 1.92 Released Download 1.92, Update 1.91 to 1.92, the source only distribution
Quote: Cool stuff! I have to check this out! I'm not done with "terrain renderer" yet though so I can't fiddle around with anyhing else. Even if you want 3D graphics you can still use OpenLayer to render text, load textures and render the GUI. Remember that you can use pure OpenGL along with OpenLayer. OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori) |
|
Ron Ofir
Member #2,357
May 2002
|
Quote: Even if you want 3D graphics you can still use OpenLayer to render text, load textures and render the GUI. Remember that you can use pure OpenGL along with OpenLayer. Yes, GUI was what I had in mind. |
|
Fladimir da Gorf
Member #1,565
October 2001
|
Note that loading the textures with the correct format is very easy when using OpenLayer. Simply: Bitmap myTexture( "Gfx/Texture.png" ); // Get ready to render with the texture // myTexture.Select(); The Select -method is equal to OpenGL's glBindTexture. OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori) |
|
Tobi Vollebregt
Member #1,031
March 2001
|
Hmm, sorry to say: it seems you broke the demo in 1.92. Fix below:
EDIT: forgot to say, I used to 1.91->1.92 upgrade zip ________________________________________ |
|
Fladimir da Gorf
Member #1,565
October 2001
|
OK, thanks, I just had included a wrong version of the demo in the package. I also changed the extraLifes >? 0 to max( extraLifes, 0 ). OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori) |
|
CGamesPlay
Member #2,559
July 2002
|
Demo crashes for me. Last line in the log is loading the background. Also, does it compile for MSVC? Have you considered not using uppercase in your filenames? [edit] -- Ryan Patterson - <http://cgamesplay.com/> |
|
Fladimir da Gorf
Member #1,565
October 2001
|
You're using 1.92, right? Could you check if the bitmap exists where the log says it should? But if the log doesn't say that the bitmap isn't found or is in a wrong format then I'm clueless without some extra information because at least everything works for me. I've attached a .bat file to compile the debug version of the library, so could you use it instead and tell me where it crashes? About the uppercase letters in the file names, is it bad? I don't know yet if it compiles for MSVC as I can't try that myself. OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori) |
|
Hrvoje Ban
Member #4,537
April 2004
|
Fladimir da Gorf said: Well, I haven't thought that's necessary. I could make life easier to newcomers ( 1 .a + 1 .dll 8 .a + 3 .dll ). Speaking of DLLs, they must be in same folder as exe in order to be found, ie putting them in "DLLs" won't work. |
|
CGamesPlay
Member #2,559
July 2002
|
It's not "bad", so much as "annoying". Because Linux users have case-sensitive filesystems. I think, maybe, today I will write some scripts that "fix up" your library, primarily making everything into lowercase (with reference checking and all), then try compiling under Cygwin, which has case-sensitivity also, then try to make it work under MSVC. Your ">?" stuff might not work though, it seems, so I'm worried about that. Hrvoje: Or they can be in the PATH. -- Ryan Patterson - <http://cgamesplay.com/> |
|
Fladimir da Gorf
Member #1,565
October 2001
|
Quote: Speaking of DLLs, they must be in same folder as exe in order to be found, ie putting them in "DLLs" won't work. Yeah, I originally had them in the base folder of OpenLayer but then I thought everything would be better organized if the were in a Dlls -folder instead. Of course this may cause many "Why doesn't this demo run?" problems if I introduce OpenLayer in Gamedev where few have Allegro (or GZip) installed and not everyone would think that if a dll is not found it can be found in the dlls folder. So maybe I'll move them to the same folder as the demo. Quote:
I could make life easier to newcomers (1 .a + 1 .dll Maybe, maybe. I hadn't thougth that I could include the other dlls inside OpenLayer's dll file. Quote: Your ">?" stuff might not work though, it seems, so I'm worried about that. I've got rid of those in 1.92. Quote: It's not "bad", so much as "annoying". Because Linux users have case-sensitive filesystems. I always use Windows as if the file system would be case-sensitive and I don't find that so annoying. But maybe that's just me, I like starting all the names with an uppercase letter. OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori) |
|
CGamesPlay
Member #2,559
July 2002
|
Well, as long as you're certain that you've followed case-sesitivity, I suppose I can let it be. It'll still be an annoyance for me and probably other Linux users, though And if you've gotten rid of it, then good. I'll try making up a project file for it in a while. Would you like to include it in the distribution? It'll be a VC7 project, unfortunately, but still. -- Ryan Patterson - <http://cgamesplay.com/> |
|
fuzinavl
Member #4,105
December 2003
|
Allegro's angles are CCW negative. Traditional Angles are CCW positive. I don't care which standard OL uses as long as it's consistent throughout the api; I'm making myself float d2r(float); //degrees to radians anyway. Is OL z-negative into the screen? If it is, great. Without changing the projection, I could render 3d stuff in a layered 2d overhead world. UP = z_positive. No worries about render order. Quote: fuzinavl says:I notice that individual things (bitmaps, ellipses, whatnot) all have similar transforms before the global transforms are applied. Strangely, they all have different interfaces. No, no! I'm wrong! "Regular" gfx_rend functions provide instant syntax checking for coders, which prevents bugs. A "StartupStuff" function may reduce the GfxRend function list by 60%. Unfortunately, coders may forget to add all of the parameters for what they want to do, and end up cursing over why their circles are all 1 pixel at (0,0). __________________________ |
|
Fladimir da Gorf
Member #1,565
October 2001
|
Quote: Would you like to include it in the distribution? It'll be a VC7 project, unfortunately, but still. Sure why not, as long as it compiles in GCC (I can do the required modifications if those are needed, though). Jim, I forgot to say that you can compile OpenLayer with -DOL_ANGLES_IN_DEGREES and the angles are then passed in degrees By the way, it seems that I forgot to mention that now OpenLayer uses an advanced FPS calculation system which tries to stabilize the game speed even better. The problem with the usual FPS calculation method is that if the FPS is calculated over only a few frames it won't be stable and accurate. On the other hand if the FPS is calculated over dozens of frames the game won't be able to act to sudden drops or jumps in the game speed (like an explosion which spits out thousands of particles). Therefore I decided to use a system which tries to combine the best parts of both methods by dynamically changing the number of frames over which the FPS is calculated depending on the situation. If the game speed drops or jumps suddenly the FPS calculator will be set to temporarily to use the higher frequency calculations increasing the responseability. Then when the FPS stabilizes it'll gradually switch to use the lower frequency calculations increasing the accuracy. OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori) |
|
Tobi Vollebregt
Member #1,031
March 2001
|
What about this code for SetOrthographicProjection (instead of the current code of course): void Settings:: SetOrthographicProjection(int w, int h) { glMatrixMode( GL_PROJECTION ); glPushMatrix(); glLoadIdentity(); glOrtho( 0, w, 0, h, -1, 1000 ); glScalef( 1, -1, 1 ); glTranslatef( 0, -h, 0 ); glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); glDisable( GL_DEPTH_TEST ); }
To preserve API compatibility add default arguments It allows you to write a program designed for 800x600 and run it in any resolution with all graphics automagically rescaled by OpenGL, by passing the real resolution to SetupScreen and the design resolution to SetOrthographicProjection. There are some issues with GK though which cause text to appear in different size. These can be solved by adding gfx_driver->w = DESIGN_W; gfx_driver->h = DESIGN_H; after SetOrthographicProjection. This causes SCREEN_W and SCREEN_H to return the design resolution to GK. Note: I grepped through Allegro's source and it appears to be quite safe to change these. Of course, it is still a dirty hack which might be less portable than normal Allegro code. So use it at your own risk! For example, demo in 1280x1024 fullscreen by changing the call to SetupScreen to: // Open the game in a 800 x 600 window // if( Setup::SetupScreen( 1280, 1024, FULLSCREEN ) == false ) { allegro_message( "Error while trying to set graphics mode!" ); //exit( -1 ); } Settings::SetOrthographicProjection( 800, 600 ); gfx_driver->w = 800; gfx_driver->h = 600;
________________________________________ |
|
fuzinavl
Member #4,105
December 2003
|
Quote: advanced FPS calculation system ...by dynamically changing the number of frames over which the FPS is calculated depending on the situation. great idea Fladimir: So, when OL can do hardware rendering to video BITMAPs, will all of the blit,text, and gfx_rend functions get an extra *BITMAP parameter, or will there be a global target *BITMAP? What additional functionalities would make openlayer complete? __________________________ |
|
Fladimir da Gorf
Member #1,565
October 2001
|
Sounds good, but I think I'll change the OpenGL port of Glyph Keeper instead of changing any internal values of Allegro. An another way to get the same effect would be Transforms::SetStretch( 800.0/1280.0, 600.0/1024.0 ) but then SetStretch couldn't be used to anything else (without multiplying the parameters with those parameters). Quote: So, when OL can do hardware rendering to video BITMAPs, will all of the blit,text, and gfx_rend functions get an extra *BITMAP parameter, or will there be a global target *BITMAP? I believe I just write Bitmap::SetAsDestination() or a similiar function. Of course I have to add a function to set the screen as the destination. In fact as it's possible to use the screen contents as a texture I could include a global screen variable as in Allegro. I'm not sure about this yet, though. Quote: What additional functionalities would make openlayer complete? Pixel shaders, for example. I've been designing a system I call ShaderLayer and it's intended to be an easy-to-use tool to make 2D shaders. And I've also thought about making an gui library for OpenLayer and then there's the rendering to Bitmaps. Quote: Given that, what do you want the final api to look like? Well, new stuff is always new stuff. The final API will just include more and do everything better but thus far the API looks fine for me... OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori) |
|
CGamesPlay
Member #2,559
July 2002
|
Hmm. You should only include files with "..." if the file is in the same directory. It seems MSVC doesn't like to search the include paths. (Working on the conversion now) [edit] [edit] -- Ryan Patterson - <http://cgamesplay.com/> |
|
|
|