Request for GRAPHICS_HIDDEN flag

BlitzMax Forums/BlitzMax Programming/Request for GRAPHICS_HIDDEN flag

JoshK(Posted 2007) [#1]
I am very happy with some of the recent developments of BlitzMax.

I wanted to suggest that a GRAPHICS_HIDDEN flag be added. I have come across two uses:

-A bsp compiler or similar program that performs processing in a 3D engine, without actually wanting or needing to display graphics.

-Multisampling in OpenGL requires a graphics context to be initialized before OpenGL functions can be retrieved to create a second anti-aliased graphics context (see "Antialias in OpenGL" in the module tweaks section). In fact, any sort of graphics initialization that requires gl functions will need an initial hidden window to start with.

The antialias thread includes some code towards the bottom that will add the GRAPHICS_HIDDEN flag under Windows.

It would be better of there were official support for this simple feature. I try to write my code to work under the BlitzMax paradigms, it's better if users don't have to edit modules to get certain features.

Thanks!


ImaginaryHuman(Posted 2007) [#2]
I think it would be a good idea for BlitzMax to provide an easy way to create whatever type of context/pixel format you want, so that you can have things like Floating Point backbuffer or HDR backbuffers, as well as providing the option to make it multisampled and hideable.


Who was John Galt?(Posted 2007) [#3]
Handy for screen savers. I'm in.


MGE(Posted 2007) [#4]
As long as it supports DX and OGL, I'm in too. :)


marksibly(Posted 2007) [#5]

As long as it supports DX and OGL, I'm in too. :)


Which is exactly what makes it tricky...


JoshK(Posted 2007) [#6]
I thought compatibility for this was an issue of which OS you are running on, not which graphics API you are using. I mean, it is just a matter of creating a hidden window.

Can DX not initialize on a hidden window?


marksibly(Posted 2007) [#7]

Can DX not initialize on a hidden window?


Actually, from memory I think it's MacOS that has problems with that - gl context is not valid until window is visible or something.

Have you tried a 0,0 width,height graphics?

In retrospect, I messed up with the 'core' graphics module - it's redundant and shouldn't be there. Would love to clean it up but have 1001 other things to do first!