Allegro.cc - Online Community

Allegro.cc Forums » The Depot » OpenLayer 1.9 Released!

This thread is locked; no one can reply to it. rss feed Print
 1   2   3 
OpenLayer 1.9 Released!
Fladimir da Gorf
Member #1,565
October 2001
avatar

Finally it has arrived! Grab your own ;)

Download, Web page, Manual and the Source only distribution

(I have to find out how to update the manual at the Retrospec's mirror...)

New graphics primitives (Thanks to Jim Sintha for the ideas and code structures of some of those)

New RenderModes and the ability to combine RenderModes with the sum operator!

Named parameter versions of the following functions have been included:

Others:

  • Added some simple demos which show how to load and show a bitmap, render text and write a game loop

  • Bitmaps are no longer stored in the memory unless you choose them to be

  • New Transforms -modifier: SetClipping - Sets the clipping region of the screen (Manual entry)

  • Fixed the manual to reflect some modifications in the past versions

  • Fixed the issue that the text would render always in black with some hardware

  • Now the demo uses the correct version of Allegro

  • Once again, several other minor stuff which were requested but I can't remember now ;)

Also now with the new RenderMode system, do you think that I should add a way to rotate and stretch the sprite with something like RotationMode and StretchMode?

I'd also like to know what's in fact the best way to render to a texture. PBuffers or frame buffer objects? What are the possible limitations or issues with them?

Also something like PixelShadedMode is in my mind but I'll have to implement a nifty system I have in my mind first and it may take some time...

EDIT: Added a few list entries that I had forgot about
EDIT2: I forgot to mention that now OpenLayer uses an advanced FPS calculation system which tries to stabilize the game speed even better

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)

kazzmir
Member #1,786
December 2001
avatar

Do you ship the correct Allegro .dll with the demo this time? I wont be using Windows for some time so I wont have a chance to test it before you can give me an answer, most likely.

Krzysztof Kluczek
Member #4,191
January 2004
avatar

Quote:

I'd also like to know what's in fact the best way to render to a texture. PBuffers or frame buffer objects? What are the possible limitations or issues with them?

PBuffers and framebuffer objects should work about the same (probably framebuffer object slightly better). PBuffers are IIRC Windows-only, you have to use WGL for them and have quite complex specifications, but framebuffer object isn't well supported (new NVidia drivers will support them, I have no idea when other vendors will start supporting them). :)

fuzinavl
Member #4,105
December 2003
avatar

Very nice! Lots of new stuff.

Rendermodes are easy to use and could really clean up some of the api. example:
Blit, BlitRotated, BlitStretched, BlitTransformed, BlitDistorted
now become... Blit :)
Then again, maybe all that extra Mode()+Mode()+Mode() typing would get tedious?
Maybe the *Mode()s could become Tint(), Flip(), Clip()

How does GainAlphaMode differ from other blenders? Should it be in the blender section?

What happens if I attempt to store a bitmap in video memory, but video memory is full?

It looks like the api is becoming inconsistent, but is improving at the same time. I see 1.9 as a transition phase. The api needs to remain clean, simple, consistent, sensibly organized, and small; but capable of a lot. It also needs to have a familiar look and feel for Allegro graphics function users.

Extreme Restructuring ?: I notice that individual things (bitmaps, ellipses, whatnot) all have similar transforms before the global transforms are applied. Strangely, they all have different interfaces. ...but I am too tired to think clearly now :(

__________________________
fuzinavl@hotmail.com (Pittsburgh)
__http://fuzinavl.tripod.com/__

Krzysztof Kluczek
Member #4,191
January 2004
avatar

Quote:

What happens if I attempt to store a bitmap in video memory, but video memory is full?

If OpenLayer isn't doing any strange things, the bitmap goes into system memory and OpenGL takes care of managing limited video memory space to make best use of it. :)

Fladimir da Gorf
Member #1,565
October 2001
avatar

Quote:

Then again, maybe all that extra Mode()+Mode()+Mode() typing would get tedious?

Maybe, and 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.

Quote:

How does GainAlphaMode differ from other blenders? Should it be in the blender section?

I don't think so. GainAlphaMode adds an extra alpha channel to the Bitmap when it's rendered. The two alpha channels (the Bitmap's own and the one from GainAlphaMode) are multiplied together to get a cumulative effect. I should add an example to show how to use this but the concept is pretty simple actually.

For example if you wish to blend a texture on top of a player:

Bitmap texture( ... );
Bitmap playerBmp( ... );

// Render player's Bitmap as usual //
playerBmp.Blit( x, y );

// Render the texture on top of it with 30% opacity //
texture.Blit( x, y, GainAlphaMode( playerBmp ), 0.30 );

Note that you can also choose the anchor point of the alpha Bitmap.

Quote:

Do you ship the correct Allegro .dll with the demo this time?

Actually it comes with a demo which uses the correct dll instead ;)

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)

Richard Phipps
Member #1,632
November 2001
avatar

Fladimir, have you considered looking at some of the threads and documents Korval did on the Allegro Pro blitting method? He seemed to be also debating similar issues. Perhaps some of that would help you? :)

Mika Halttunen
Member #760
November 2000
avatar

Just wanted to say that the demo game finally works as it should on my PC! :D Yayness! Good work, Fladimir! :)

---------------------------------------------
.:MHGames | @mhgames_ :.

Hrvoje Ban
Member #4,537
April 2004
avatar

You forgot to remove Allegro/AllegroGL headers from Source only distribution.

Fladimir da Gorf
Member #1,565
October 2001
avatar

Quote:

You forgot to remove Allegro/AllegroGL headers from Source only distribution.

OK, now it's fixed.

Quote:

Fladimir, have you considered looking at some of the threads and documents Korval did on the Allegro Pro blitting method? He seemed to be also debating similar issues. Perhaps some of that would help you?

I'll take a look at those then.

Quote:

Just wanted to say that the demo game finally works as it should on my PC! :D Yayness! Good work, Fladimir!

That's great indeed! :D I take it was the text rendering that didn't work correctly before?

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)

Mika Halttunen
Member #760
November 2000
avatar

Quote:

That's great indeed! :D I take it was the text rendering that didn't work correctly before?

Yeah the fonts were black, and the paddle tinting didn't work. Now it's all good :)

---------------------------------------------
.:MHGames | @mhgames_ :.

Zaphos
Member #1,468
August 2001

If I switch to drunken mode in the demo, I get lines diagonally through all the bricks (one line per brick) and lines through the background, too :(

Screeny here: [url http://www.andrew.cmu.edu/user/jandrews/lines_screeny.PNG]

Tobi Vollebregt
Member #1,031
March 2001

Seems that the triangles don't connect seamless in your case. Either OpenLayer isn't passing exactly the same coordinates for equal points (whic I doubt), or it's a bug in your driver.

Have you tried getting the latest version of video card drivers?

EDIT: Just noticed I've the same problem :-/

________________________________________
website || Zipfile reader @ Allegro Wiki || Download zipfile reader

Hrvoje Ban
Member #4,537
April 2004
avatar

Similar problem was reported in previous thread and was fixed by turning off antialiasing.

Fladimir da Gorf
Member #1,565
October 2001
avatar

The problem is in fact in the drivers or maybe with some graphics cards. I haven't experienced with my Radeon 9800 but many others have. OpenLayer renders everything by using GL_QUADS/GL_LINE_STRIP so the produced triangles should be seamlessly connected. But it seems that the bilinear filtering makes it to look uncorrect.

I should add a possibility to use multisampling instead of bilinear filtering, maybe then it would work with everyone. The problem would then be to choose when the bilinear filtering should be used or when multisampling should be used instead. Anyways it shoulds strange that the graphics cards just can't produce exact reasults...

If someone has found a good solution for this let me know!

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

Hrvoje Ban said:

Similar problem was reported in previous thread and was fixed by turning off antialiasing.

I just noticed that too:)

Fladimir da Gorf said:

bilinear filtering

I suppose you mean antialiasing?

Bilinear filtering can't cause this kind of artifacts.
I suggest two different functions: one to turn on/off bilinear filtering (or preferably choose between "nearest", "linear" and "linear_mipmap_linear" [with automatic mipmap generation:P]) and one to turn on/off antialiasing.

btw, I think you forgot to include the two changes in Includes.hpp I send you:
#include <gl/glu.h> --> #include <GL/glu.h>
#undef DestroyAll

doesn't matter too much though

________________________________________
website || Zipfile reader @ Allegro Wiki || Download zipfile reader

Bob
Free Market Evangelist
September 2000
avatar

Quote:

OpenLayer renders everything by using GL_QUADS/GL_LINE_STRIP so the produced triangles should be seamlessly connected. But it seems that the bilinear filtering makes it to look uncorrect.

If it does, it's a serious driver bug. Did you mean polygon smooth instead?

--
- Bob
[ -- All my signature links are 404 -- ]

Fladimir da Gorf
Member #1,565
October 2001
avatar

Quote:

btw, I think you forgot to include the two changes in Includes.hpp I send you:

Ah, sorry I should really make a todo log or something. Well, at least I changed those now.

About the anti-aliasing problem, could you try the version of the library I've attached in this post and tell me if it makes any difference?

Quote:

Did you mean polygon smooth instead?

Now when I think of it I believe this is the one which is guilty, too. That's why I posted a version of the library which uses only the GL_LINEAR texture parameter for anti-aliasing. After all the bilinear filtering is a texture raster thing which shouldn't affect the edges of the polygon.

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)

Fiddler
Member #5,385
January 2005

Do post this in Gamedev's news section. Openlayer could help a great many game developers in their search of hardware acceleration. And some publicity would be a good thing in the long run, both for Open Layer and Allegro.

The Open Toolkit: a game development library for .Net/Mono.
http://www.opentk.com

Tobi Vollebregt
Member #1,031
March 2001

Quote:

could you try the version of the library I've attached in this post and tell me if it makes any difference?

Sorry running Linux most of the time, so can't use the library. If you could attach the modified source files (or the entire Source/ dir or a patch) I can test it.

________________________________________
website || Zipfile reader @ Allegro Wiki || Download zipfile reader

Fladimir da Gorf
Member #1,565
October 2001
avatar

OK, I've attached the only file that is modified in the post. Thanks in advance!

Quote:

Do post this in Gamedev's news section. Openlayer could help a great many game developers in their search of hardware acceleration.

The reason for that I've only posted this to Allegro.cc thus far is that I've wanted to get it to a specific state (which is close) before releasing it to the wide public. Maybe now if the anti-aliasing fix works it's the time already.

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)

Carrus85
Member #2,633
August 2002
avatar

Quote:

PBuffers and framebuffer objects should work about the same (probably framebuffer object slightly better). PBuffers are IIRC Windows-only, you have to use WGL for them and have quite complex specifications, but framebuffer object isn't well supported (new NVidia drivers will support them, I have no idea when other vendors will start supporting them). :)

Perhaps a driver architecture could be used to help prevent such problems? I mean, you can detect supported extensions, it shouldn't be to hard to dynamically create a polymorphic class that operates slightly different than the base driver, thus providing what essentially is a 'driver' class. Heck, doing that you could even implement a software driver for really slow, really old, really crappy video cards.

Then again, this may be how it works currently anyway. But I dunno... Haven't done much with openlayer yet :-/

Fladimir da Gorf
Member #1,565
October 2001
avatar

Carrus, that's a great idea indeed! Actually I thought about separating Allegro's and AllegroGL's functions from the OpenLayer code the same way to make it easier to be ported to use other libraries instead. But I hadn't thought about using it in this case.

Quote:

Then again, this may be how it works currently anyway. But I dunno... Haven't done much with openlayer yet

Even if it did and you would've used OpenLayer you might still not know ;) After all, the "internal" stuff is separated from the actual interface and thus if you use the library it won't matter what the library actually does deep inside. All that you'd see would be functions like Bitmap::SetAsSurface and that's it.

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
avatar

I get the odd lines too (GeForce 6600GT).
It's worse in drunken mode BTW.

___________________________________
[ Facebook ]
Microsoft is not the Borg collective. The Borg collective has got proper networking. - planetspace.de
Bill Gates is in fact Shawn Hargreaves' ßî+çh. - Gideon Weems

Fladimir da Gorf
Member #1,565
October 2001
avatar

Steve, did you try the version of the library I attached to this post? (Of course you'd have to re-compile the demo. I'd attach a compiled version of the demo, too, but it's too large to attach)

EDIT: Whoah, the download rates of OpenLayer have jumped to a new high! ;D

EDIT2:

Quote:

I notice that individual things (bitmaps, ellipses, whatnot) all have similar transforms before the global transforms are applied. Strangely, they all have different interfaces.

Yeah, usually they need to select the rendering position, store the old transformation state first, select the color and things like that. You're right, maybe all the "startup stuff" should be put in a function.

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)

 1   2   3 


Go to: