Pages: « 1 2
  Print  
Author Topic: window_handle() is messed up  (Read 4653 times)
Offline (Unknown gender) TheExDeus
Reply #15 Posted on: September 18, 2014, 06:43:39 AM

Developer
Joined: Apr 2008
Posts: 1872

View Profile
In terms of FPS, it probably would be 0. Could depend on the hardware, because on older PC's rendering to FBO is a little slower than rendering on main framebuffer directly. But on any decent hardware there should be 0 difference in performance. You can actually try it yourself by drawing on a surface and then drawing the surface on the screen. I just tried on my very old laptop with ATI card, and when I draw 10000 objects with sprites, I get 7fps without surfaces, and 7fps when drawing on a surface. If I draw 1000 object with sprites, I get 71fps without surfaces, and 68fps when drawing with surfaces. As I said, the difference is negligible. The only performance hit I can imagine is switching between render targets. On any newer hardware the difference should be even smaller or 0. I will try on my home PC as well.

Even if it had a minor speed impact, application_surface is a feature I very much would like. It allows for post-process effects (you know, like bloom, color changes, motion blur etc.) without the need of managing the rendering on a surface yourself.
Logged
Offline (Male) time-killer-games
Reply #16 Posted on: September 18, 2014, 11:46:47 AM

Contributor
Location: Virginia Beach
Joined: Jan 2013
Posts: 1164

View Profile Email
That's really good news HaRRi! It's good to know. I don't know where I got the idea it would make games slower, I'm glad I was wrong. :D
Logged
Offline (Male) Goombert
Reply #17 Posted on: September 19, 2014, 03:09:38 PM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3108

View Profile
Ok well I've got nothing but good news, the implementation is working great and fixes numerous bugs.
https://github.com/enigma-dev/enigma-dev/pull/821

Some of our basic window functions were also break, for instance window_get_width() was reporting the minimized window size when in fullscreen. I have to run through and fix a lot of this for XLIB as well. All the scaling is now implemented through our viewports.
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) sorlok_reaves
Reply #18 Posted on: September 19, 2014, 03:42:16 PM
Contributor
Joined: Dec 2013
Posts: 261

View Profile
for instance window_get_width() was reporting the minimized window size when in fullscreen

Ah, that might explain another bug I was running into. I'll test this later this weekend. Thanks!
Logged
Offline (Unknown gender) Darkstar2
Reply #19 Posted on: September 19, 2014, 07:50:19 PM
Member
Joined: Jan 2014
Posts: 1244

View Profile Email
Thanks Robert, really good stuff happening with ENIGMA.

Cheers
Logged
Offline (Male) time-killer-games
Reply #20 Posted on: September 19, 2014, 09:55:45 PM

Contributor
Location: Virginia Beach
Joined: Jan 2013
Posts: 1164

View Profile Email
Holy pussy-dick hybrid! Fuck yeah, son!!!
Logged
Offline (Male) Goombert
Reply #21 Posted on: September 21, 2014, 08:57:09 PM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3108

View Profile
Alright everyone sorlok offered some testing for other platforms and I have decided to merge the pull request. Please fetch the changes and test them TKG and everyone!
https://github.com/enigma-dev/enigma-dev/pull/821
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) sorlok_reaves
Reply #22 Posted on: September 21, 2014, 09:07:29 PM
Contributor
Joined: Dec 2013
Posts: 261

View Profile
You might want to wait 2 minutes on that; I just found a tiny bug in the Windows backend (forgot to re-introduce extern int windowColor). I'll issue a pull request as soon as this test build completes.
Logged
Offline (Unknown gender) sorlok_reaves
Reply #23 Posted on: September 21, 2014, 11:20:44 PM
Contributor
Joined: Dec 2013
Posts: 261

View Profile
Ok, the fix has been merged. Feel free to test now.

FYI, there's a small regression on OS-X, whereby the background color does not display properly for windows that have out-of-bounds regions (usually only happens when views force a smaller region).

I can probably fix this (related to windowColor), and I don't think it should hold up the merge.
Logged
Offline (Male) Goombert
Reply #24 Posted on: September 21, 2014, 11:47:10 PM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3108

View Profile
That's actually not a regression sorlok, we now like Studio and GM8.1< create the backbuffer for the whole window, since well we only have 1 window. So we have to clear the window when it is resized with the window color, and we also need the native implementation for window color so that it shows while resizing the window. You just have to copy it to the graphics bridges for Cocoa, I can't test so that is why I haven't.

https://github.com/RobertBColton/enigma-dev/blob/master/ENIGMAsystem/SHELL/Bridges/xlib-OpenGL1/graphics_bridge.cpp#L72
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) sorlok_reaves
Reply #25 Posted on: September 22, 2014, 12:39:22 PM
Contributor
Joined: Dec 2013
Posts: 261

View Profile
Shouldn't be too hard; I'll have a look.
Logged
Pages: « 1 2
  Print