dunno, opengl is pretty darn easy
OpenGL
DirectX
dunno, opengl is pretty darn easy
always looking, make an offer. get me out of this place.
Well since most major games are made using one of these API's then you can be pretty safe that they will work on most people's computers. As for which is easier i would go for OpenGL however i haven't done much DX stuff so its up to you.I have seen that. you can't play the game?
VC++ 6
Ok I guess I'll go with OpenGL Wish me luck
what does signature stand for?
sorry, for dissapearing.
>I'm not sure about this cause I never got an answer out of anyone here but I think OpenGL is not thread safe and DirectX is.
OpenGL is thread safe. you just have to synchronize multiple RC's yourself.
>OpenGL is a "state machine" which means everything is global states.
"State machine" just means everything is done using states and state switching, such as the current matrix, texture modes, ect.
state are exclusive to their respective RC's
>With DirectX, game manufacturers are able to distribute it.
not quite just newer versions of the software renderer, only on windows, software OpenGL ships with windows, all versions above 2 i think. on linux you may have to manually install mesaGL for software.
ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.
Thread safe means that you can enter the library in multiple threads at the same time. Since you have to switch the "current" RC before you can act on another, you aren't able to enter the library from the thread handling the second RC. the second thread has to wait. therefore it is not threadsafe.Originally posted by no-one
OpenGL is thread safe. you just have to synchronize multiple RC's yourself.
wglMakeCurrent(HDC, HGLRC);Originally posted by no-one "State machine" just means everything is done using states and state switching, such as the current matrix, texture modes, ect.
state are exclusive to their respective RC's
This is a prime example of a global state. All others depend on at least this being set globally. The instance is switched at that function and you CAN'T enter OpenGL to work on another instance until you switch it globally again. thread has to wait. Not threadsafe
always looking, make an offer. get me out of this place.
Geazz...And you thought i didn't understand multitasking. j/k. OpenGL works very well and none of this theretical - doesn't apply to real life - programming stuff is going to change that. However so does DX so if silly things like that really annoy you then sure go with DX but the choice is yours.
VC++ 6
Have any one seen any tutorials for Opengl or DirectX for C#/.NET ?.
>
Thread safe means that you can enter the library in multiple threads at the same time.
<
yeah you can.
>
Since you have to switch the "current" RC before you can act on another.
<
no you don't, only if the RC's are sharing a DC, which is the limiting factor. The Host OS/system/hardware.
>
you aren't able to enter the library from the thread handling the second RC.
<
because the second RC(if sharing the same DC) are in the same library instance.
> the second thread has to wait. therefore it is not threadsafe.
OpenGL is thread safe, it only has to wait because of the host system.
anyway, on a single processor system multithreading is faked so it doesn't really matter.
>
This is a prime example of a global state. All others depend on at least this being set globally. The instance is switched at that function and you CAN'T enter OpenGL to work on another instance until you switch it globally again. thread has to wait. Not threadsafe
<
wrong, see the above.
ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.
sunlight's site has some for directx 8. Though you might want to wait for DX 9.Originally posted by Barjor
Have any one seen any tutorials for Opengl or DirectX for C#/.NET ?.
I shall call egypt the harmless dragon
-Isaiah 30.7
Wow, is that a lack of understanding of Windows or what!?!?Originally posted by no-one
>
Thread safe means that you can enter the library in multiple threads at the same time.
<
yeah you can.
>
Since you have to switch the "current" RC before you can act on another.
<
no you don't, only if the RC's are sharing a DC, which is the limiting factor. The Host OS/system/hardware.
>
you aren't able to enter the library from the thread handling the second RC.
<
because the second RC(if sharing the same DC) are in the same library instance.
> the second thread has to wait. therefore it is not threadsafe.
OpenGL is thread safe, it only has to wait because of the host system.
anyway, on a single processor system multithreading is faked so it doesn't really matter.
>
This is a prime example of a global state. All others depend on at least this being set globally. The instance is switched at that function and you CAN'T enter OpenGL to work on another instance until you switch it globally again. thread has to wait. Not threadsafe
<
wrong, see the above.
In a single process you have ONE instance of a loaded library. No matter how many times you LoadLibrary() you will have the same set of global variables in the dll address space. OpenGL loaded in multiple threads is still a single address space. You don't get multiple instances across threads in a single process. I am shocked that you have been thinking this way this whole time.
always looking, make an offer. get me out of this place.
perhaps an pseudocode example is necessary:
//working in thread1
SetCurrentRC (rc1)
glClear()
glBegin(GL_POLYGON)
//Context switch
//working in thread2
list2 = CreateDisplayList()
glBegin(GL_POLYGON)
glVertex(ptr,....)
//Context switch
//working in thread1
glVertex(ptr,...)
glVertex(ptr...)
glVertex(ptr...)
glEnd()
if you really look at this you'll understand why openGL is not thread-safe. Context switching in the middle of an openGL procedure will KILL what you're trying to do. Sorry if I'm being a bit nasty now but you're being way more cocky than your knowledge should allow
always looking, make an offer. get me out of this place.
Microsoft DX is pushed by advertising and big dollars, while OpenGL is used because it renders high quality 3d graphics. They are both used on the Microsoft OS but in taking a wider view of computers, OpenGL is the only solution. In addition the monopoly is trying to steal OpenGL I hear.
>
In a single process you have ONE instance of a loaded library. No matter how many times you LoadLibrary() you will have the same set of global variables in the dll address space. OpenGL loaded in multiple threads is still a single address space. You don't get multiple instances across threads in a single process. I am shocked that you have been thinking this way this whole time.
<
honetly, its beside the point.
>
if you really look at this you'll understand why openGL is not thread-safe. Context switching in the middle of an openGL procedure will KILL what you're trying to do.
<
wtf are you talking about!!!!!!!!
READ MY PREVIOUS POST!!!! besides that, your code is not legal anyway, and its using two rc's!!!!! to the same DC!!!!!!!! wtf?!!!
you must synchronise the RC's as is said, if one is drawing THEN DON'T LET THE OTHER ONE DRAW!!!
if it was not thread safe you would get a damned illegal operation every two seconds with multiple.
>
Sorry if I'm being a bit nasty now but you're being way more cocky than your knowledge should allow
<
i think not, i was making an example, multiple library instances is irellevant.
let me clarify.
lets say you have a DC, right? and then you make two RC's in two threads.
and you have one thread drawing lets say an object, and the other drawing a gui. will this work? yes! why? OpenGL is thread safe.
ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.
no-one, have you worked with mesaGL? If so, what is your experience with it. What kind of apps can you build with it.
Let's try this again with some extra comments....
//working in thread1
//Sets the current RC, the only RC I'm even Mentioning
SetCurrentRC (rc1)
//clear the RC
glClear()
//Get ready to draw a polygon on said DC
glBegin(GL_POLYGON)
//Context switch because Windows has preemptive multitasking!
//working in thread2
//second thread is creating a display list
list2 = CreateDisplayList() //illegal call!!!! inside glBegin and glEnd!
glBegin(GL_POLYGON) //two glBegins before a glEnd()!!!!
glVertex(ptr,....)// which glBegin is this for?
//Context switch
//working in thread1
glVertex(ptr,...) //this was intended to draw to the dc but somehow it seems to be in the display list
glVertex(ptr...)
glVertex(ptr...)
glEnd() //for which glBegin?
multi-threading is overlapping. this destroys any procedural nature that OpenGL requires. Is your mind that small?