Show Posts
|
|
Pages: [1]
|
|
1
|
Java Game APIs & Engines / JOGL Development / XOR with texture masked
|
on: 2005-08-30 21:37:09
|
|
Hi,
I'm working in a 2D editor ( polygons, rectangles, circles, lines, images, etc). Images are represented by textured polygons. To translate the shapes fast I use the xor operation. My problem is when I translating a masked image.
The xor operation don't respect the alpha channel, and the masked area from image appear white.
Any idea?
Thank's.
Stiva
|
|
|
|
|
3
|
Java Game APIs & Engines / JOGL Development / Re: Using a GLCanvas with SWT ?
|
on: 2005-05-27 11:24:55
|
|
To use GLCanvas with swt, I do this:
- First I extend a Panel and add a GLCanvas:
public class GLPanel extends Panel{ private GLCanvas canvas = null; private GL gl; private GLU glu;
public GLPanel(){ GLCapabilities cap = new GLCapabilities(); this.canvas = GLDrawableFactory.getFactory().createGLCanvas(cap); this.setLayout(new BorderLayout()); this.add(canvas); }
..... }
- Then I add the GLCanvas to a SWT Composite, with SWT_AWT bridje.
private void addGlCanvas(Composite parent) { FillLayout fl = new FillLayout(); parent.setLayout(fl); Composite glCompo = new Composite(parent, SWT.EMBEDDED); // bridje swt -> awt fDrawSurface = new GLPanel(); fDrawSurface.addAdjustmentListener(this);
Frame awtFrame = SWT_AWT.new_Frame(glCompo); awtFrame.add(fDrawSurface); }
Work's fine.
|
|
|
|
|
4
|
Java Game APIs & Engines / JOGL Development / Xor operation
|
on: 2005-05-24 19:40:25
|
|
Hi,
I need to draw elements of feedback with the user as marquee of selection, mouse cursors , etc... I do not want to render all drawing to each movement of mouse. Exists some more performatic alternative, as xor operation (to invert pixels)?
thanks
|
|
|
|
|
7
|
Java Game APIs & Engines / JOGL Development / Quality for small polygons
|
on: 2005-04-20 20:30:35
|
|
Hi,
I am drawing characters from poligonos returned from the Freetype library. I am having problem when apply zoom out, because the text is unreadable. The fine poligonos disappear or are distorted.
Exists some filter that improves the quality to the poligonos?
|
|
|
|
|
9
|
Java Game APIs & Engines / JOGL Development / Problem with glGetIntegerv/glGetDoublev
|
on: 2005-03-21 15:15:46
|
|
Hi,
I have a problem to get values for modelMatrix, projectionMatrix and viewport. I only obtain the values for this matrices if the respective init function are called in Display() method.
Follows the code:
private YxxfGfxPointW DCStoMCS(YxxfGfxPointS pt) { int[] viewport = new int[4]; double[] matrizModelo = new double[16]; double[] matrizProjecao = new double[16]; int winY; double[] x = new double[1]; double[] y = new double[1]; double[] z = new double[1]; // get the matrix values gl.glGetIntegerv(GL.GL_VIEWPORT, viewport); winY = viewport[3] - pt.y - 1; gl.glGetDoublev(GL.GL_MODELVIEW_MATRIX, matrizModelo); gl.glGetDoublev(GL.GL_PROJECTION_MATRIX, matrizProjecao); ...
somebody knows the reason?
MaurĂcio
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|