sampling mode

Started by influt, November 04, 2008, 12:51:58 PM

Previous topic - Next topic

influt

Hello.

I am using a canvas renderer. Can I set sampling mode other than SAMPLINGMODE_NORMAL and how?
I've tried both setting mode to SAMPLINGMODE_GL_AA_2X and SAMPLINGMODE_GL_AA_4X, but that didn't make any effect. Although i saw that aptalkarga uses canvas renderer, too, and a user can switch between sampling modes there.

any help will be appreciated.

EgonOlsen

You are using the AWTGLCanvas-Renderer? If so, AA (i.e. the sampling mode) depends on your hardware. Which graphics card is that and do you have a screen shot? karga uses the software renderer, that's a different thing.

influt

Quote from: EgonOlsen on November 04, 2008, 06:35:49 PM
You are using the AWTGLCanvas-Renderer? If so, AA (i.e. the sampling mode) depends on your hardware. Which graphics card is that and do you have a screen shot?
Yes, it is AWTGLCanvas-Renderer. I'll make a screenshot a bit later..
Quote from: EgonOlsen on November 04, 2008, 06:35:49 PM
karga uses the software renderer, that's a different thing.
Ok, another question: How can i make a canvas renderer use software renderer mode? Because when i try to do the following:

canvas = buffer.enableGLCanvasRenderer(IRenderer.RENDERER_SOFTWARE);

it is the same as buffer.enableGLCanvasRenderer(IRenderer.MODE_LEGACY), as i understand, and LEGACY renderer is no longer supported

Melssj5

enableGLCanvasRenderer ... look at the GL word. it means it uses OPEN GL, that means hardware renderer. if you want to hace software render on a canvas just put the render stuff on the paint methos over an awt canvas. There are some examples over there. On the download section, there is a project called Maze, it was my first jpct applet, it may help you.
Nada por ahora

influt

Quote from: Melssj5 on November 04, 2008, 11:24:30 PM
enableGLCanvasRenderer ... look at the GL word. it means it uses OPEN GL, that means hardware renderer. if you want to hace software render on a canvas just put the render stuff on the paint methos over an awt canvas. There are some examples over there. On the download section, there is a project called Maze, it was my first jpct applet, it may help you.
Thanks, Melssj5. I understood. how could i have missed that..

Now about hardware renderer. Here is a screenshot done at 640x480 and SAMPLINGMODE_NORMAL:


when switching to AA_2X or AA_4X no error message occurs and i see a blank screen or exactly the same picture as with SAMPLINGMODE_NORMAL. The application is developed and tested on an on-board Intel 82915G/GV/910GL VGA with the latest drivers from Intel.

EgonOlsen

Intel onboard graphics stink when it comes to AA (well, not only then...). If the hardware and/or the driver doesn't support it, it doesn't work. Try to get a cheap ATI or NVidia (any will do) and you should get the AA you want.

influt

I can do so, of course, and i already have nvidia at home. But this app is developed for ordinary people, and big percent of those buy a pc with on-board-everything  ;) so i think that i should better use sw renderer..

Melssj5

BTW: Which app is it?

I am working on something via applets focused for ordinary people too. This app is about watching house plans, doing a virtual walkthrough, and making them able to change dinamicly the floors, wall, and ceiling textures to get and aproximation of the final cost of the construction project. Its a Thesis project but the 3d part is delayed until finishing all the  documentation and the web page to admin that.

Is your app something similar??
Nada por ahora

influt

No, i am making a simple metaverse, something similar to aptalkarga. Maybe, in the future the project will grow into something more complicated, maybe not :)

EgonOlsen

Quote from: influt on November 05, 2008, 02:15:45 PM
I can do so, of course, and i already have nvidia at home. But this app is developed for ordinary people, and big percent of those buy a pc with on-board-everything  ;) so i think that i should better use sw renderer..
The absence of AA on Intel onboard chips shouldn't prevent you from using the hardware renderer IMHO. I can only enable what the driver allows me to do. On Intel, you should spot some messages about "number of samples (xxx) not supported" when AA fails to initialize. That shouldn't really matter, because jPCT falls back to normal sampling in that case.
You may also support hardware and software renderer in one application.

influt

Hey, I've tested the same code on NVidia GeForce 2 MX 400 and the same problem occurred. That is, i can not init buffer with AA. When passing AA_2X or AA_4X to FrameBuffers' constructor, i see the same picture as without AA.

EgonOlsen

That's because a GF2 can't do multi sampling AA.