As far as I understand, SDL_SetVideoMode() is used to
generate a window and it also stated that
SDL_SetVideoMode() can be re-called to resize a
window.
My questions:
When I call SDL_SetVideoMode() for the second time
I’m not passing any information of the existing
window. Won’t it allocate a new surface?
If it doesn’t allocate new surface and simply
update (e.g. resize) the existing one, does that mean
I can’t have 2 windows? Is there another way to create
2 windows?
thanks
Phuoc Can HUA===== /_/_/_/_/_/_ www.huaonline.com
My Homepage is my Castle
I can’t speak to whether or not you can force 2 windows using standard
SDL functions,
especially SDL_SetVideoMode(), but I DO know that you can generate a new
window
using OS specific functions/classes and put a new SDL context in that,
under the same
program but probably with a different thread. However I know none of
the details, but
I seem to remember there being a discussion of putting SDL into part of
a window a
month or two back.
-TomT64
Phuoc Can Hua wrote:>As far as I understand, SDL_SetVideoMode() is used to
generate a window and it also stated that
SDL_SetVideoMode() can be re-called to resize a
window.
My questions:
When I call SDL_SetVideoMode() for the second time
I’m not passing any information of the existing
window. Won’t it allocate a new surface?
If it doesn’t allocate new surface and simply
update (e.g. resize) the existing one, does that mean
I can’t have 2 windows? Is there another way to create
2 windows?
Is there a way I can search for old posting? In the
SDL archive there’s no search feature. Do you still
remember some keywords in that discussion? so that I
can search for.
thanks
PC HUA
— TomT64 wrote:> I can’t speak to whether or not you can force 2
windows using standard
SDL functions,
especially SDL_SetVideoMode(), but I DO know that
you can generate a new
window
using OS specific functions/classes and put a new
SDL context in that,
under the same
program but probably with a different thread.
However I know none of
the details, but
I seem to remember there being a discussion of
putting SDL into part of
a window a
month or two back.
-TomT64
Phuoc Can Hua wrote:
As far as I understand, SDL_SetVideoMode() is used
to
generate a window and it also stated that
SDL_SetVideoMode() can be re-called to resize a
window.
My questions:
When I call SDL_SetVideoMode() for the second
time
I’m not passing any information of the existing
window. Won’t it allocate a new surface?
If it doesn’t allocate new surface and simply
update (e.g. resize) the existing one, does that
mean
I can’t have 2 windows? Is there another way to
create
2 windows?
I have a large bmp that I did a SDL_FillRect() to blue on. I then blit
in several other images from another bmp, but they are appearing as
black on the screen even though they are white and green.
I have another routine (put_pixel example from SDL source) that I’m
using to write color directly to certain areas, but they too are showing
up incorrectly. 0x00ff00 which should be green shows up as yellow, and
0x00ffff shows up as white.
Any ideas where I’m messing up?
Thanks,
Jason.—
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.726 / Virus Database: 481 - Release Date: 7/22/2004
if 0x00ff00 shows up as yellow and 0x00ffff shows up as white it looks like
something red is being blended w/ it cause adding red to those colors would
cause that problem.
no idea how that would happen but maybe that will help you debug, maybe
alpha blending or something is going on?> ----- Original Message -----
From: jclark@ccpu.com (Jason Clark)
To: "‘A list for developers using the SDL library. (includes SDL-announce)’"
Sent: Monday, August 09, 2004 9:32 PM
Subject: [SDL] Color issues…
I have a large bmp that I did a SDL_FillRect() to blue on. I then blit
in several other images from another bmp, but they are appearing as
black on the screen even though they are white and green.
I have another routine (put_pixel example from SDL source) that I’m
using to write color directly to certain areas, but they too are showing
up incorrectly. 0x00ff00 which should be green shows up as yellow, and
0x00ffff shows up as white.
Any ideas where I’m messing up?
Thanks,
Jason.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.726 / Virus Database: 481 - Release Date: 7/22/2004
if 0x00ff00 shows up as yellow and 0x00ffff shows up as white it looks
like
something red is being blended w/ it cause adding red to those colors
would
cause that problem.
no idea how that would happen but maybe that will help you debug,
maybe
alpha blending or something is going on?
announce)’"
I have a large bmp that I did a SDL_FillRect() to blue on. I then
blit
in several other images from another bmp, but they are appearing as
black on the screen even though they are white and green.
I have another routine (put_pixel example from SDL source) that I’m
using to write color directly to certain areas, but they too are
showing
up incorrectly. 0x00ff00 which should be green shows up as yellow,
and> -----Original Message-----
From: sdl-bounces+jclark=ccpu.com at libsdl.org [mailto:sdl-
Sent: Monday, August 09, 2004 10:49 PM
To: A list for developers using the SDL library.
Subject: Re: [SDL] Color issues…
----- Original Message -----
From: “Jason Clark” <@Jason_Clark>
To: "'A list for developers using the SDL library. (includes SDL-
Sent: Monday, August 09, 2004 9:32 PM
Subject: [SDL] Color issues…
0x00ffff shows up as white.
Any ideas where I’m messing up?
Thanks,
Jason.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.726 / Virus Database: 481 - Release Date: 7/22/2004
You can have 2 or more windows by having your program spawn child processes
that each have their own SDL environment. The technique of spawning child
processes is different for each OS, but this can be handled by conditional
compilation. You’ll also want to set up interprocess communication between
the parent and child processes.
If you’d like an example, email me privately and I’ll send you some sample
code.
JeffOn Monday 09 August 2004 07:20 pm, Phuoc Can Hua wrote:
My questions:
When I call SDL_SetVideoMode() for the second time
I’m not passing any information of the existing
window. Won’t it allocate a new surface?
If it doesn’t allocate new surface and simply
update (e.g. resize) the existing one, does that mean
I can’t have 2 windows? Is there another way to create
2 windows?
Another option to consider is using one of the many SDL GUI libraries
(or making your own) and creating your own graphical windows by
yourself. You didn’t make it clear why you wanted to do this, so I just
thought I’d drop this suggestion.On Aug 10, 2004, at 2:13 AM, Jeff wrote:
On Monday 09 August 2004 07:20 pm, Phuoc Can Hua wrote:
My questions:
When I call SDL_SetVideoMode() for the second time
I’m not passing any information of the existing
window. Won’t it allocate a new surface?
If it doesn’t allocate new surface and simply
update (e.g. resize) the existing one, does that mean
I can’t have 2 windows? Is there another way to create
2 windows?
You can have 2 or more windows by having your program spawn child
processes
that each have their own SDL environment. The technique of spawning
child
processes is different for each OS, but this can be handled by
conditional
compilation. You’ll also want to set up interprocess communication
between
the parent and child processes.
If you’d like an example, email me privately and I’ll send you some
sample
code.
if 0x00ff00 shows up as yellow and 0x00ffff shows up as white it looks
like
something red is being blended w/ it cause adding red to those colors
would
cause that problem.
no idea how that would happen but maybe that will help you debug,
maybe
alpha blending or something is going on?
----- Original Message -----
From: “Jason Clark”
To: "‘A list for developers using the SDL library. (includes SDL-
announce)’"
Sent: Monday, August 09, 2004 9:32 PM
Subject: [SDL] Color issues…
I have a large bmp that I did a SDL_FillRect() to blue on. I then
blit
in several other images from another bmp, but they are appearing as
black on the screen even though they are white and green.
I have another routine (put_pixel example from SDL source) that I’m
using to write color directly to certain areas, but they too are
showing
up incorrectly. 0x00ff00 which should be green shows up as yellow,
and
0x00ffff shows up as white.
Any ideas where I’m messing up?
Thanks,
Jason.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.726 / Virus Database: 481 - Release Date: 7/22/2004
Can’t we have a piece of this conditionnal windows handling ?
Thank you
Jeff a ?crit :> On Monday 09 August 2004 07:20 pm, Phuoc Can Hua wrote:
My questions:
When I call SDL_SetVideoMode() for the second time
I’m not passing any information of the existing
window. Won’t it allocate a new surface?
If it doesn’t allocate new surface and simply
update (e.g. resize) the existing one, does that mean
I can’t have 2 windows? Is there another way to create
2 windows?
You can have 2 or more windows by having your program spawn child processes
that each have their own SDL environment. The technique of spawning child
processes is different for each OS, but this can be handled by conditional
compilation. You’ll also want to set up interprocess communication between
the parent and child processes.
If you’d like an example, email me privately and I’ll send you some sample
code.
Did you see a second question or the word “answer” anywhere in my post?
The previous answers I’ve received were very helpful and I felt that it
was polite to thank those that helped, and let others know that I had
been helped. I imagine it took you longer to post a reply that
criticizes my thanks that it would have taken you to simply delete it.
Before the rest of the list fires off, yes I see the irony! I too could
have simply deleted this reply. Snide and non-helpful comments are
becoming so common I had to finally say something.
If you don’t have something nice to say (or helpful), then don’t say
anything at all!
Okay, that’ll do for my totally off-topic rant. Thanks again for all
the help everyone’s given me, without it, I’d never make progress!
if 0x00ff00 shows up as yellow and 0x00ffff shows up as white it
looks
like
something red is being blended w/ it cause adding red to those
colors> -----Original Message-----
From: sdl-bounces+jclark=ccpu.com at libsdl.org [mailto:sdl-
Sent: Tuesday, August 10, 2004 8:40 AM
To: A list for developers using the SDL library. (includes
Subject: Re: [SDL] Color issues…
-----Original Message-----
From: sdl-bounces+jclark=ccpu.com at libsdl.org [mailto:sdl-
Sent: Monday, August 09, 2004 10:49 PM
To: A list for developers using the SDL library.
Subject: Re: [SDL] Color issues…
would
cause that problem.
no idea how that would happen but maybe that will help you debug,
maybe
alpha blending or something is going on?
----- Original Message -----
From: “Jason Clark” <@Jason_Clark>
To: "‘A list for developers using the SDL library. (includes SDL-
announce)’"
Sent: Monday, August 09, 2004 9:32 PM
Subject: [SDL] Color issues…
I have a large bmp that I did a SDL_FillRect() to blue on. I then
blit
in several other images from another bmp, but they are appearing as
black on the screen even though they are white and green.
I have another routine (put_pixel example from SDL source) that I’m
using to write color directly to certain areas, but they too are
showing
up incorrectly. 0x00ff00 which should be green shows up as yellow,
and
0x00ffff shows up as white.
Any ideas where I’m messing up?
Thanks,
Jason.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.726 / Virus Database: 481 - Release Date: 7/22/2004
You will see that by clicking “reply” on “[SDL] Newbie: Can I generate
more than one Window?” and then changing the subject line, you have
added your “Color Issues” thread onto the end of an existing thread.
It would be better next time to create a new mail and address it to
sdl at libsdl.org
I’m guilty of doing this in the past. I learned to stop it because it
looks ugly if you have a mail client that supports threading.
Did you see a second question or the word “answer” anywhere in my
post?> -----Original Message-----
From: sdl-bounces+jclark=ccpu.com at libsdl.org [mailto:sdl-
Sent: Tuesday, August 10, 2004 2:20 PM
To: sdl at libsdl.org
Subject: RE: [SDL][OT] Color issues…
You will see that by clicking “reply” on “[SDL] Newbie: Can I generate
more than one Window?” and then changing the subject line, you have
added your “Color Issues” thread onto the end of an existing thread.
It would be better next time to create a new mail and address it to
sdl at libsdl.org
I’m guilty of doing this in the past. I learned to stop it because it
looks ugly if you have a mail client that supports threading.
Which SDL GUI library would you recommend? free?
although I don’t think I’ll use more 3rd party
libraries in my program I’ll take a look ( because I’m
already using Kyra, for sprites). It also provides
some widgets which I can use. What I want is to create
control panels in separate windows.
PC HUA
— Donny Viszneki wrote:> Another option to consider is using one of the many
SDL GUI libraries
(or making your own) and creating your own graphical
windows by
yourself. You didn’t make it clear why you wanted to
do this, so I just
thought I’d drop this suggestion.
Google does a good job of site searching, just go to Google and type in
" site:www.libsdl.org WordsToSearchFor" and you should get a lot of
listings from old SDL mail archives.
Phuoc Can Hua wrote:>Is there a way I can search for old posting? In the
SDL archive there’s no search feature. Do you still
remember some keywords in that discussion? so that I
can search for.
Which SDL GUI library would you recommend? free?
although I don’t think I’ll use more 3rd party
libraries in my program I’ll take a look ( because I’m
already using Kyra, for sprites). It also provides
some widgets which I can use. What I want is to create
control panels in separate windows.
Another option to consider is using one of the many
SDL GUI libraries
(or making your own) and creating your own graphical
windows by
yourself. You didn’t make it clear why you wanted to
do this, so I just
thought I’d drop this suggestion.
Which SDL GUI library would you recommend? free?
although I don’t think I’ll use more 3rd party
libraries in my program I’ll take a look ( because I’m
already using Kyra, for sprites). It also provides
some widgets which I can use. What I want is to create
control panels in separate windows.