Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Vziuh

Pages: [1]
2
Support / Re: screen is blinking
« on: December 05, 2011, 02:38:06 pm »
thanks alot

3
Support / Re: screen is blinking
« on: December 04, 2011, 09:10:41 am »
thx for reply

i didn't know that if i won't call gl function, the frame will be drawn anyway.
is there any methods to output only one framebuufer, FrameBuffer object from jPCT-AE ?

4
Support / screen is blinking
« on: December 03, 2011, 12:11:51 pm »
hi people
i had problem
i need to output blue screen, and everything seems to be ok, but it's blinking =(

here's the link on vido ( i've recorded this blinking )
http://dl.dropbox.com/u/30723020/Video1.avi

thank you in advance for your help

main class:

Code: [Select]
import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;

public class Main extends Activity
{

View_container vc = null ;

//=====================================
    public void onCreate(Bundle savedInstanceState)
    {
           super.onCreate(savedInstanceState);
       
           vc = new View_container ( this  ) ;
     
           setContentView( vc.glsv );
    }
}


this is class with GLSurfaceView object

Code: [Select]
public class View_container
{
public GLSurfaceView glsv = null ;

private Renderer      rend = null ;

public View_container ( Context context  )
{
glsv = new GLSurfaceView( context  ) ;

glsv.setEGLConfigChooser(
new GLSurfaceView.EGLConfigChooser()
{
public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display)
{
// Ensure that we get a 16bit framebuffer. Otherwise, we'll fall
// back to Pixelflinger on some device (read: Samsung I7500)

int[] attributes = new int[] {
   EGL10.EGL_DEPTH_SIZE, 16, EGL10.EGL_NONE
};
   EGLConfig[] configs = new EGLConfig[1];
   
   int[] result = new int[1];
   egl.eglChooseConfig(display, attributes, configs, 1, result);
   
   return configs[0];
}
}
   );

rend = new Renderer () ;

glsv.setRenderer( rend ) ;   
}
}



render class:

Code: [Select]

public class Renderer implements GLSurfaceView.Renderer
{

private FrameBuffer fb = null ;

@Override
public void onDrawFrame(GL10 gl)
{
fb.display() ;
}

@Override
public void onSurfaceChanged(GL10 gl, int width, int height)
{
fb = new FrameBuffer  ( gl , width , height ) ;
fb.clear( new RGBColor ( 75 , 150 , 225 ) ) ;
}

@Override
public void onSurfaceCreated(GL10 gl, EGLConfig config)
{
// TODO Auto-generated method stub
}

}







5
Support / Re: Interface adaptation for different screens
« on: August 11, 2011, 01:16:24 pm »
ok, thanks, i'll use this method than

6
Support / Interface adaptation for different screens
« on: August 11, 2011, 01:08:34 pm »
   Hi everyone, i found that there is alot of different screens for android device
here's the  list:

240 x 320
240 x 640
320 x 480
480 x 854
540 x 960
640 x 960
 
320 x 240
400 x 240
800 x 480
800 x 600
1024 x 600
1280 x 800
1366 x 768

   I decide to make all my interface pictures for biggest screen from this list: 1366 x 768,
and if game will be started on android devise with smaller screen,  all pictures will be resized and adopted to screen dimension.

   At the moment Iím using    frame_buffer.blit method to output all images and rescale them.
My question is, if this method is fast enough or itís better to redraw image in smaller RGB array and crate smaller texture.

7
YEY it works ! thx a lot !

8
Bliting works almost very fine, thanks a lot !

But I see that semitransparent pixels didnít output

here is initial png picture:




and here's what i have on the screen:






I thought  that I need to use .setEffect() method, but didnít find how to work with ITextureEffect interface

9
sure this was one of the problems, but thatís not all, my screen is still blank =(
     

Code: [Select]

sv1.set( 0 , 0 , 0 ) ;
sv2.set( 1 , 0 , 0 ) ;
sv3.set( 0 , 1 , 0 ) ;



also i have proposal, people can complete documentation about this game engine, they could attach their source code in description, so after reading theory part you'll be able to see how to use it.

I didnít understand how to use BLITing and google didnít help me.

10
The method with adding triangles would be great if it will work =)

As result I have blank screen

Hereís code where I create plane


Code: [Select]
                  public Picture_plane ( Context context , String address )
    {

object = new Object3D ( 1 ) ;

SimpleVector sv1 = new SimpleVector () ;
SimpleVector sv2 = new SimpleVector () ;
SimpleVector sv3 = new SimpleVector () ;

float u1 ;
float v1 ;

float u2 ;
float v2 ;

float u3 ;
float v3 ;

sv1.set( 0 , 0 , 0 ) ;
sv1.set(  2 , 0 , 0 ) ;
sv1.set( 0 ,  2 , 0 ) ;

u1 = 0.0f ;
v1 = 0.0f ;

u2 = 0.0f ;
v2 = 1.0f ;

u3 = 1.0f ;
v3 = 0.0f ;

object.addTriangle( sv1 , u1 , v1 , sv2 , u2 , v2 , sv3 , u3 , v3 ) ;


Texture texture = new Texture ( loade_texture ( context , address ) ) ;
TextureManager.getInstance().addTexture ( "diffuse" , texture ) ;

object.setTexture( "diffuse" ) ;

object.strip() ;
object.build() ;

    }


Hereís code where Iím adding this plane to the world object and onDrawFrame function

Code: [Select]

public void onSurfaceChanged(GL10 gl , int w , int h )
{

world = new World () ;

world.addObject(  Storage_2d.picture_plane[ 0 ].object ) ;

Camera cam = world.getCamera();

SimpleVector sv = Storage_2d.picture_plane [ 0 ].object.getTransformedCenter() ;

cam.lookAt ( sv ) ;

cam.moveCamera(Camera.CAMERA_MOVEOUT, 50);

frame_buffer = new FrameBuffer ( gl , w , h ) ;

}



Code: [Select]

public void onDrawFrame( GL10 gl )
{

frame_buffer.clear( back_color ) ;

world.renderScene ( frame_buffer )  ;
world.draw             ( frame_buffer )  ;

frame_buffer.display();

}


I've tried to create another objects from Primitives class, and if I create cube everything is ok, i can see it on the screen, but this plane.


Apart from that, i usually blit my interface components to the screen using the methods in FrameBuffer. But then again, my interfaces are pretty simple...

Can you share example of code how to blit.

11
Hello everyone, Iím working on interface classes, main idea is, to create a plan ( at the moment I donít  know how to set adequate dimensions to this plane, so my 2d image what i use like texture for interface will look without changes )

But, thing is that I need to set this image like texture on the plane, I need to create some UV coordinates, but I didnít find how to assign them to the object.

Help me plz, if you have some better ideas about how to create interface =) share please.

12
Support / Re: ERROR: Bounding box missing in this mesh!
« on: July 11, 2011, 06:26:41 pm »
didn't have much time to test it till today.
 thx  for answer, it works ! at last !

13
Support / ERROR: Bounding box missing in this mesh!
« on: June 12, 2011, 11:05:07 am »
hi everyone.

i'm newbie in 3D graphic programming.

when i tried to load animated model and i've got such error:

 ERROR: Bounding box missing in this mesh!

I would be grateful for the help.

here's the method i use to load animation.

Code: [Select]

public static void load_animation ( Context context , String model_address , String texture_address , int model_index )
{

Object3D model ;

Animation anim = new Animation ( 5 ) ;

anim.createSubSequence ( "bend" ) ;

for ( int i = 0 ; i < 5 ; i ++ )
{

String num = "models/bend/bend"   ;  
        num += String.valueOf( i ) ;
        num += ".3DS"              ;  

   model= model_laoder ( context , num) ;
   
   anim.addKeyFrame( model.getMesh() ) ; // i've get error in this line
}
}
//=================================================================================================
private static Object3D model_laoder ( Context context , String model_address )
{

Loader.setVertexOptimization(false) ;

InputStream is    ;

try
{
is  = context.getAssets().open( model_address ) ;

return Loader.load3DS( is , 1f ) [ 0 ] ;

}
catch ( IOException e )
{
Log.v   ("World_output", "error:"+e.getMessage() );
Log.v ("World_output", e.toString());
is    = null ;
return null ;
}
}



Pages: [1]