Jump to content
  • Advertisement
Sign in to follow this  
TwilightShade

OpenGL D3D to OpenGL

This topic is 5142 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi folks... first of all, im a noob concerning c(++), opengl, and so on, so plz be explanative ;) Im currently working on wine, an windows layer for unix (not an emulator), especially on the d3d8 implemention. As directx isnt available for unix systems the d3d function calls are simply mapped to opengl calls, eg d3drs_lineantialias is mapped to gl_line_smooth). Of course this isnt always that simple *sigh* ... My current targets are the d3drs_multisampleantialias and the d3drs_multisamplemask function calls. Googling around, i found jittering to be one method which could do that job. Would this be okay or is there a better solution? I thought of deriving it someway from this site. Thx in advance TwilightShade

Share this post


Link to post
Share on other sites
Advertisement
hrm... sorry this is more of a bump than anything, but i wouldnt reccomend doing jittering yourself... thats a waste of computation, i dont know what to say to do it... i guess the best way would be simply to learn the gl way, and do it with gl (even if just taht part) since its really using gl the whole time anyways (as truely using d3d and gl at the same time is a BAD idea, and not useful at all, if its even possible)

hope that helps
-Dan

Share this post


Link to post
Share on other sites
Hmm, i guess i described it wrong... there isnt any d3d available at all, so all d3d calls are simply passed to opengl, but sometimes there is no function in opengl which matches the d3d function exactly. BTW, i thought jittering IS part of opengl? (was 100% sure about that... as mentioned earlier, im a damned noob :) ).
Okay, so how is it done the opengl way? How can i blur a full scene like multisampleantialias does?

Thx for the reply
TwilightShade

Share this post


Link to post
Share on other sites
Multisampling does _not_ blur the screen. It adds information to the screen.
Are you sure that you are up to the task if you don't even know what multisampling is?

Share this post


Link to post
Share on other sites
LOL, im totally sure that im NOT, but thats the linux way, learn by doing and at this project every helping hand is needed. So tell me, IS antialiasing bluring or not? I only made a logical conclusion. BTW, i already did 2 such callpassings.
So, after discussing my skills, how can this be done?

Cheers
TwilightShade

Share this post


Link to post
Share on other sites
I'd help you out, if I knew jack about 3D stuff.

However, clickies on what the things he's trying to implement..

is this what you're talking about?
Quote:
D3DRS_MULTISAMPLEANTIALIAS

BOOL value that determines how individual samples are computed when using a multisample render-target buffer. When set to TRUE, the multiple samples are computed so that full-scene antialiasing is performed by sampling at different sample positions for each multiple sample. When set to FALSE, the multiple samples are all written with the same sample value, sampled at the pixel center, which allows non-antialiased rendering to a multisample buffer. This render state has no effect when rendering to a single sample buffer. The default value is TRUE.

D3DRS_MULTISAMPLEMASK

Each bit in this mask, starting at the least significant bit (LSB), controls modification of one of the samples in a multisample render target. Thus, for an 8-sample render target, the low byte contains the eight write enables for each of the eight samples. This render state has no effect when rendering to a single sample buffer. The default value is 0xFFFFFFFF.

This render state enables use of a multisample buffer as an accumulation buffer, doing multipass rendering of geometry where each pass updates a subset of samples.

If there are n multisamples and k enabled samples, the resulting intensity of the rendered image should be k/n. Each component RGB of every pixel is factored by k/n.

Share this post


Link to post
Share on other sites
Wow, you are a newbie and yet you are actually working on Wine, and adding D3D functionality.
You truly have my respect [smile].

I must say I dont really know what that function does but seems like there is plenty of Open GL Multisampling at google to check out.

if it has something to do with motion blur effects, then perhaps the Motion Blur example at game tutorials might help you too.

[edit] just found the ARB_multisample extension.

Share this post


Link to post
Share on other sites
Yes, it is.

Well, when reading this (read it before) the first thing coming to my mind is jittering as the image is sampled several times, each time with some little difference in position, isnt it?
So, concluding from this, the multisampleantialias function would set the jittering value and the multisamplemask would control which value is aplied to which sample?

Share this post


Link to post
Share on other sites
@Kwizatz
Thx =) but i dont earn any congratulatories yet, my patches arent commited (and wont be until the wined3d lib is finished) yet! (dont want to be theatralic, even if it sounds so......... :/ )

Thx for your help, i think this is going to help a little :) (wondering why i didnt found this yet... :/ ) Motionblur belongs to somewhere else i think, but thx anyway!

BTW, the whole stuff isnt _that_ hard (you just need to understand what a call is good for ^^), just have a look at some scripts, etc (not necesseraly wine) and try to understand them!

Cheers
TwilightShade

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!