Platform: Win32
I want a GL context without create a window.
(to compress RAW RGB(A) textures to DXT1 DXT3 DXT5)
Is this possible?
|
|
0
|
|
|
|
Reply
|
Chameleon
|
7/12/2004 5:37:12 PM |
|
<- Chameleon -> wrote:
> Platform: Win32
>
> I want a GL context without create a window.
> (to compress RAW RGB(A) textures to DXT1 DXT3 DXT5)
>
> Is this possible?
>
No, but you can create a 1x1 pixel window with
style WS_POPUP and nobody will ever notice it...
--
<\___/>
/ O O \
\_____/ FTB. For email, remove my socks.
Governments, like diapers, should be changed often,
and for the same reason.
|
|
0
|
|
|
|
Reply
|
fungus
|
7/12/2004 5:37:19 PM
|
|
"<- Chameleon ->" <cham_gss@hotmail.NOSPAM.com> wrote in message
news:ccuhvt$cj$1@nic.grnet.gr...
> Platform: Win32
>
> I want a GL context without create a window.
> (to compress RAW RGB(A) textures to DXT1 DXT3 DXT5)
>
> Is this possible?
No offense, but wouldn't this be easier to do using DirectX's D3DX library?
If you insist on using OGL, can't you use something equivalent to a pbuffer?
WTH
|
|
0
|
|
|
|
Reply
|
WTH
|
7/12/2004 5:52:31 PM
|
|
WTH wrote:
>
> If you insist on using OGL, can't you use something equivalent to a pbuffer?
>
You can't make a pbuffer without an open window.
--
<\___/>
/ O O \
\_____/ FTB. For email, remove my socks.
Governments, like diapers, should be changed often,
and for the same reason.
|
|
0
|
|
|
|
Reply
|
fungus
|
7/12/2004 6:05:33 PM
|
|
On Mon, 12 Jul 2004 20:37:12 +0300, "<- Chameleon ->"
<cham_gss@hotmail.NOSPAM.com> wrote:
>Platform: Win32
>
>I want a GL context without create a window.
>(to compress RAW RGB(A) textures to DXT1 DXT3 DXT5)
>
>Is this possible?
>
You can create a 'PFD_DRAW_TO_BITMAP' OpenGL context, but it will be
software-only (i.e., not hardware accelerated) and limited to OGL
version 1.1. Chapter 18 of the OpenGL Superbible has the details.
Matt Feinstein
--
There is no virtue in believing something that can be proved to be true.
|
|
0
|
|
|
|
Reply
|
Matt
|
7/12/2004 7:32:49 PM
|
|
<- Chameleon -> wrote:
> Platform: Win32
>
> I want a GL context without create a window.
> (to compress RAW RGB(A) textures to DXT1 DXT3 DXT5)
Why would you need to use OpenGL to convert textures? There are utilities that
will convert from many formats to DXT.
> Is this possible?
>
>
--
Phil Frisbie, Jr.
Hawk Software
http://www.hawksoft.com
|
|
0
|
|
|
|
Reply
|
Phil
|
7/12/2004 9:03:48 PM
|
|
Matt Feinstein wrote:
>
>>Platform: Win32
>>
>>I want a GL context without create a window.
>>(to compress RAW RGB(A) textures to DXT1 DXT3 DXT5)
>>
>>Is this possible?
>>
>
> You can create a 'PFD_DRAW_TO_BITMAP' OpenGL context, but it will be
> software-only (i.e., not hardware accelerated) and limited to OGL
> version 1.1. Chapter 18 of the OpenGL Superbible has the details.
>
One problem: The GDI renderer doesn't know how
to compress textures so it won't be much use...
--
<\___/>
/ O O \
\_____/ FTB. For email, remove my socks.
Governments, like diapers, should be changed often,
and for the same reason.
|
|
0
|
|
|
|
Reply
|
fungus
|
7/12/2004 10:21:21 PM
|
|
<- Chameleon -> wrote:
> Platform: Win32
>
> I want a GL context without create a window.
> (to compress RAW RGB(A) textures to DXT1 DXT3 DXT5)
>
> Is this possible?
There are 2 ways (under windows) :
1 - render to a bitmap by setting PFD_RENDER_TO_BITMAP flag in your
pixel format descriptor ... it will be slow like hell.
2 - render to a hidden window (don't call ShowWindow( hwnd,
SW_SHOWNORMAL) after creating it) ... simplest method ever.
|
|
0
|
|
|
|
Reply
|
g
|
7/13/2004 7:03:15 AM
|
|
..g wrote:
> 2 - render to a hidden window (don't call ShowWindow( hwnd,
> SW_SHOWNORMAL) after creating it) ... simplest method ever.
3 - create a render context in a hidden window and allocate a
pbuffer fot this context. Then render to this pbuffer.
Wolfgang
|
|
0
|
|
|
|
Reply
|
Wolfgang
|
7/13/2004 9:03:52 AM
|
|
..g wrote:
> <- Chameleon -> wrote:
>
>> Platform: Win32
>>
>> I want a GL context without create a window.
>> (to compress RAW RGB(A) textures to DXT1 DXT3 DXT5)
>>
>> Is this possible?
>
>
> There are 2 ways (under windows) :
>
> 1 - render to a bitmap by setting PFD_RENDER_TO_BITMAP flag in your
> pixel format descriptor ... it will be slow like hell.
>
....and won't have texture compression (does anybody
actually *read* the original posts?)
> 2 - render to a hidden window (don't call ShowWindow( hwnd,
> SW_SHOWNORMAL) after creating it) ... simplest method ever.
There's no such thing as a "hidden window". To use
OpenGL you need an open window on the device where
you want to render something. That's the law. It
might work on some drivers but not on all.
--
<\___/>
/ O O \
\_____/ FTB. For email, remove my socks.
Governments, like diapers, should be changed often,
and for the same reason.
|
|
0
|
|
|
|
Reply
|
fungus
|
7/13/2004 9:29:44 AM
|
|
fungus wrote:
> .g wrote:
>
>> <- Chameleon -> wrote:
>>
>>> Platform: Win32
>>>
>>> I want a GL context without create a window.
>>> (to compress RAW RGB(A) textures to DXT1 DXT3 DXT5)
>>>
>>> Is this possible?
>>
>>
>>
>> There are 2 ways (under windows) :
>>
>> 1 - render to a bitmap by setting PFD_RENDER_TO_BITMAP flag in your
>> pixel format descriptor ... it will be slow like hell.
>>
>
> ...and won't have texture compression (does anybody
> actually *read* the original posts?)
You're right.
>> 2 - render to a hidden window (don't call ShowWindow( hwnd,
>> SW_SHOWNORMAL) after creating it) ... simplest method ever.
>
>
> There's no such thing as a "hidden window". To use
> OpenGL you need an open window on the device where
> you want to render something. That's the law. It
> might work on some drivers but not on all.
On windows, you can Get a device context from a hidden window (which you
haven't shown). A double buffered context may help. A color buffer is
just an array of pixels located in the memory of your graphic card ...
there is no overlay involved.
I've tested it many times and it works.
|
|
0
|
|
|
|
Reply
|
g
|
7/15/2004 5:17:00 AM
|
|
fungus <openglMY@SOCKSartlum.com> bored us with:
> WTH wrote:
>>
>> If you insist on using OGL, can't you use something equivalent to a
>> pbuffer?
>>
>
> You can't make a pbuffer without an open window.
Surely the 'hidden' part of "window" is implicit, if you read about pbuffers
and their various purposes.
WTH
|
|
0
|
|
|
|
Reply
|
WTH
|
7/15/2004 7:35:12 AM
|
|
..g wrote:
>
> On windows, you can Get a device context from a hidden
> window (which you haven't shown).
>
> I've tested it many times and it works.
"It works on my machine so it must be ok...!!!"
What does the documentation actually say...?
Have you tried that on machines with multiple
monitors/graphics cards?
--
<\___/>
/ O O \
\_____/ FTB. For email, remove my socks.
Governments, like diapers, should be changed often,
and for the same reason.
|
|
0
|
|
|
|
Reply
|
fungus
|
7/15/2004 9:50:17 AM
|
|
fungus wrote:
> .g wrote:
>
>>
>> On windows, you can Get a device context from a hidden window (which
>> you haven't shown).
>>
>> I've tested it many times and it works.
>
>
> "It works on my machine so it must be ok...!!!"
>
> What does the documentation actually say...?
> Have you tried that on machines with multiple
> monitors/graphics cards?
I came up with this solution myself and found not to be the only one
latter so it might work on a lot of configurations. Let's make it the
other way ... prove me wrong ... tell me why on earth a backbuffer
should get impaired because of its owning window being hidden.
|
|
0
|
|
|
|
Reply
|
g
|
7/16/2004 6:36:41 AM
|
|
..g wrote:
> prove me wrong ... tell me why on earth a backbuffer
> should get impaired because of its owning window being hidden.
Ummmm....how many times have you seen the question
"I did a glReadPixels() but it doesn't work when
the window is obscured" posted here?
It's a FAQ...
http://www.opengl.org/resources/faq/technical/rasterization.htm#rast0070
Now if the window isn't even open then what chance
has it got?
--
<\___/>
/ O O \
\_____/ FTB. For email, remove my socks.
Governments, like diapers, should be changed often,
and for the same reason.
|
|
0
|
|
|
|
Reply
|
fungus
|
7/16/2004 7:36:51 AM
|
|
> Ummmm....how many times have you seen the question
> "I did a glReadPixels() but it doesn't work when
> the window is obscured" posted here?
>
> It's a FAQ...
>
> http://www.opengl.org/resources/faq/technical/rasterization.htm#rast0070
>
> Now if the window isn't even open then what chance
> has it got?
I don't exactly understand what you mean by *opened* windows.
|
|
0
|
|
|
|
Reply
|
g
|
7/16/2004 11:30:56 AM
|
|
..g wrote:
>
> I don't exactly understand what you mean by *opened* windows.
Ummm, a window which is, er, "open", ie. visible on screen.
--
<\___/>
/ O O \
\_____/ FTB. For email, remove my socks.
Governments, like diapers, should be changed often,
and for the same reason.
|
|
0
|
|
|
|
Reply
|
fungus
|
7/16/2004 2:19:44 PM
|
|
fungus wrote:
> .g wrote:
>
>>
>> I don't exactly understand what you mean by *opened* windows.
>
>
> Ummm, a window which is, er, "open", ie. visible on screen.
Ok, I was babbling about "created" windows that are not "shown".
|
|
0
|
|
|
|
Reply
|
g
|
7/18/2004 9:28:36 PM
|
|
|
17 Replies
439 Views
(page loaded in 0.153 seconds)
|