[gameprogrammer] Re: OpenGL + SDL + multi-threading + Theora

This isn't a forum, we pay as much atention to any email-thread started.
Don't latch into an existing thread, if anything it will be reason for
people to NOT pay atention to your email (sometimes I just archive a
conversation with gmail without reading it) if anything, change the subject.
Now, for 3D, you're getting a bit ahead of yourself there. It's hard, even
when people know it. I'll give you my recomendation

-Learn a language real well (my tip is start with C++ or even pure C), learn
it's special things (pointers in C/++ Trash colecting in java) because they
will be source of problems.
-Learn to program 2D games, they actually teach you the basics of 2D tricks
and resource managment, plus all the basics of what you need for a game
(input, sound, AI, physics, etc.) You can do this as you learn the language.
-Now to jump to 3D programming I reccomend that you start with something
basic, like NeHe's OpenGL tutorials (google) or such. Some people start from
top to bottom, starting with a engine, but in my personal case it was easier
to understand how a game engine did something first and then make sense of
how and why it can and can't do certain things. You could instead begin with
the next tip though.
-Get a 3d engine, Torque if you're willing to spend the cash, or Irrlitch or
Ogre3d, or another one which I haven't talked about but you find out. Learn
it, use it.

Just a tip for the other interesting language, C#. The big library you'd be
using in that case would be the XNA (check microsoft's website). I still
believe you must program in 2D first because 3D can be really hard for
begginers, so try to focus on babystep objectives with the XNA aka. First do
a Pong/Tetris/Pacman, then we go and do a full blown FPS with photorealistic
graphics :P

On 8/28/07, (r)£$ǖv@M$Ħ ¢(c) $........... <theamericansushi@xxxxxxxxx> wrote:
>
> hey dude i really wanna make a 3d game an im still learniing could u tell
> me wat engine or language to use thanx
>
> On 8/28/07, richard sabbarton < richard.sabbarton@xxxxxxxxx> wrote:
> >
> > Excellent...  Glad I could help!
> >
> > I have not used SDL so I am afraid I don't have any suggestions
> > regarding the audio.  Start a new thread if you have problems.
> >
> > Rich
> >
> >
> > On 28/08/07, Husam Zakaria <hzcppff@xxxxxxxxx > wrote:
> > >
> > > Sorry to be late for my replay, thank you for you suggestion, it's
> > > working fine, I rendered it to a memory bitmap and then in the main 
> > > thread I
> > > rendered it from the memory bitmap, and as you said I used a BMP pair to
> > > avoid errors and set a flag to show which one the main thread will use, 
> > > and
> > > it's working fine.
> > >
> > > now I'll have to work for the sound, which will use virbos, so any
> > > suggestions for how I can do it in with SDL_Mixer?
> > >
> > >
> > > On 8/22/07, richard sabbarton <richard.sabbarton@xxxxxxxxx > wrote:
> > > >
> > > > Hi There,
> > > >
> > > > I ran into similar problem with OpenGL and Multi-Threading.  I was
> > > > able to generate textures without errors but they never displayed 
> > > > correctly
> > > > in the application.  I think you run into problems because of the 
> > > > glBegin()
> > > > and glEnd() in your Main Thread.  You can't manipulate Textures between
> > > > these (I think from memory) and you cannot guaranty the current status 
> > > > of
> > > > you main thread when generating the texture.
> > > >
> > > > What you could try is decoding the video frames to a Memory Bitmap
> > > > and then generate the Texture in your main thread from the memory BMP.
> > > > Also, you could use a BMP pair and alternate between them for each 
> > > > frame.
> > > > You can then set a flag to show which one the main thread should use.  
> > > > This
> > > > will avoid errors as you are likely to render each frame a different 
> > > > number
> > > > of times depending on the speed of your main thread.
> > > >
> > > > I have not done this myself but it should be possible.  This was my
> > > > planned workaround but I never got as far as coding it. My wife had a 
> > > > baby
> > > > and I haven't looked at a line of code since!  He's two months old now.
> > > > Maybe I can start sneaking back to the keyboard while my wife isn't
> > > > looking...
> > > >
> > > > Let me know if it works or if you try it.
> > > >
> > > > Rich
> > > >
> > > >
> > > >  On 22/08/07, Husam Zakaria < hzcppff@xxxxxxxxx > wrote:
> > > >
> > > > > Hi, every one
> > > > >
> > > > > I am working on an application that can play theora ogg file using
> > > > > OpenGL and SDL, and I looked at the Nebula Device 2
> > > > > nOggTheoraplayer
> > > > > class at this link:
> > > > >
> > > > > http://nebuladevice.cubik.org/documentation/nebula2/classnOggTheoraPlayer.shtml
> > > > >
> > > > >
> > > > > and build my class the same way they build it, but the problem is
> > > > > that
> > > > > I don't know how to play the video with such heirarcy.
> > > > > so I decide to create a thread that decode the video frames and
> > > > > render
> > > > > the decoded frames to a texture, and in the main thread I will
> > > > > render
> > > > > this texture to the screen for every frame.
> > > > >
> > > > > the problem is that I created the texture in the main thread and
> > > > > then
> > > > > I created the thread that will render to this texture, and when I
> > > > > want
> > > > > to render to this texture I call the following code to be sure
> > > > > that
> > > > > the texture has been created:
> > > > >
> > > > >     assert(glIsTexture(texture_id));
> > > > >
> > > > > when the application run the assertion will cut the program
> > > > > indecating
> > > > > that the texture isn't valid, so why does that happend?!! I am
> > > > > sure
> > > > > that I create the texture in the main thread with the same id, so
> > > > > what
> > > > > I can do to solve this?
> > > > >
> > > > > ---------------------
> > > > > To unsubscribe go to http://gameprogrammer.com/mailinglist.html
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>
>
> --
> Reply,
> (r)(((???£   Ŝǖ"v@ˉ˘MśĦ ¢  ???)))(c)

Other related posts: