Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


NewDisplayName

Member Since 29 Nov 2007
Offline Last Active Jun 25 2013 02:54 AM

Topics I've Started

Running games in browser plugin window

19 March 2013 - 11:16 AM

As generic as it sounds, I want to be able to run a game within the plugin window on my browser (across OSes) itself.

I am aware of going the current conventional method of using HTML5 or Flash(?) to develop games which can be embedded in browser easily.

But what if I actually want to run some multiplayer classics like AOE, WoW, etc. (maybe even single player games as well) from inside the plugin window itself.

 

There is technically one way to do this by running these games on a VM (with OS that supports these games) and then screen scraping to render the same on the plugin window on browser. (I have working prototypes of this and it's possible)

But then ofcourse, it's going to introduce latency issues, slowness, bad user experience, etc.

 

So from a native handling perspective, if I am correct, the biggest pain point will be D3D based games, which might not be written for non-fullscreen mode.

Other than this what else can be an issue?

 

I am quite serious about this stuff and want to know some really good ways of doing this.

 

You may assume that I have plugin and UI components already in place to handle everything, just the game embedding bit is left.


Anisotropic filtering : Safe to assume with PS_2_0?

27 December 2012 - 11:12 PM

Hi folks,

 

I have been using a (Min,Mag,Mip) all Linear, in my effects file. With a ps_2_0 compile option, can I assume that my GPU will always be capable to support Anisotropy? I know that it's always safer to define an alternate 2D sampler for anisotropy filtering, and use that technique when GPU caps indicate the anisotropic support. But isn't ps_2_0 already sort of ensuring those capabilities?

 

On a side note, I am observing a pixel-wide edge on top and left of my rendering window, which kinda looks like some sort of noise that is imitating the main window. Is this some filtering related issue or something else?

 

I am using direct3d9 APIs for rendering.


glGrab for screen capture on mac os

04 July 2012 - 08:45 AM

Hi,

I am trying to reuse the glGrab code for writing a screen capture tool of my own, on Mac OS.
I am able to get the context right, with proper height, width, bits per component, etc, as I could check using CG methods.

But glReadPixels (which is also not returning any gl error) always creates a buffer with all color value being 0.

The code snippet of the glReadPixels from glGrab below :

glReadPixels((GLint)srcRect.origin.x, (GLint)srcRect.origin.y, width, height, GL_BGRA, #if defined(__BIG_ENDIAN__) GL_UNSIGNED_INT_8_8_8_8_REV, #elif defined(__LITTLE_ENDIAN__) GL_UNSIGNED_INT_8_8_8_8, #else #error Do not know the endianess of this architecture #endif data);


I am checking the value of each pixel on the buffer using below code snippet from here and it always gives a value of 0.


for(size_t row = 0; row < height; row++)
{
for(size_t col = 0; col < width; col++)
{
const uint8_t* pixel =
&bytes[row * bpr + col * bytes_per_pixel];

printf("(");
for(size_t x = 0; x < bytes_per_pixel; x++)
{
printf("%d", (int)pixel[x]);
if( x < bytes_per_pixel - 1 )
printf(",");
}

printf(")");
if( col < width - 1 )
printf(", ");
}

printf("\n");
}
That's probably the reason that everytime I render the captured screen inside my local renderer, I receive a black screen.

Please suggest if there is something that I have missed about how to use the glGrab code.
Also, on a side note is it safe to assume that the destination bytestream generated by glReadPixels is the same as the one generated by GetDIBits on Windows?

thanks

Multi-Texturing using single texture

12 March 2012 - 05:21 AM

Hi guys,

I have been able to significantly enhance the quality of a video stream over UDP using multi-texturing in a slightly tweaked manner.
I am creating one texture for the video and then assigning it to 4 different samplers. On every sampler I am using Anisotropic filtering.
Somehow 4 has turned out to be the magic figure. Below 4, there is still some aliasing and gas in texts, and above 4 there is no significant change in video quality.

PFB the code snippet (Pardon my laziness, I am yet to put this in a loop) :


.....
_pd3dDevice->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
_pd3dDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
_pd3dDevice->SetSamplerState(0, D3DSAMP_MIPFILTER, D3DTEXF_ANISOTROPIC);
_pd3dDevice->SetSamplerState(0, D3DSAMP_MAXANISOTROPY, 4);
_pd3dDevice->SetTexture(0, textureFromChannel);
_pd3dDevice->SetSamplerState(1, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
_pd3dDevice->SetSamplerState(1, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
_pd3dDevice->SetSamplerState(1, D3DSAMP_MIPFILTER, D3DTEXF_ANISOTROPIC);
_pd3dDevice->SetSamplerState(1, D3DSAMP_MAXANISOTROPY, 4);
_pd3dDevice->SetTexture(1, textureFromChannel);
_pd3dDevice->SetSamplerState(2, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
_pd3dDevice->SetSamplerState(2, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
_pd3dDevice->SetSamplerState(2, D3DSAMP_MIPFILTER, D3DTEXF_ANISOTROPIC);
_pd3dDevice->SetSamplerState(2, D3DSAMP_MAXANISOTROPY, 4);
_pd3dDevice->SetTexture(2, textureFromChannel);
_pd3dDevice->SetSamplerState(3, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
_pd3dDevice->SetSamplerState(3, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
_pd3dDevice->SetSamplerState(3, D3DSAMP_MIPFILTER, D3DTEXF_ANISOTROPIC);
_pd3dDevice->SetSamplerState(3, D3DSAMP_MAXANISOTROPY, 4);
_pd3dDevice->SetTexture(3, textureFromChannel);

// Draw stream
_pd3dDevice->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);
.....

I am assuming 2 things here: 1) RAM is not a concern 2) Graphics card is not a concern

Of course, internet bandwidth is a major concern, but till now haven't faced any issues for speeds as low as 512 kbps.

I am just keen to know that what can be the possible negatives out of this approach.

thanks

PARTNERS