当前位置: 首页>>代码示例>>Java>>正文


Java GLES11.glHint方法代码示例

本文整理汇总了Java中android.opengl.GLES11.glHint方法的典型用法代码示例。如果您正苦于以下问题:Java GLES11.glHint方法的具体用法?Java GLES11.glHint怎么用?Java GLES11.glHint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.opengl.GLES11的用法示例。


在下文中一共展示了GLES11.glHint方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initializeGl

import android.opengl.GLES11; //导入方法依赖的package包/类
private void initializeGl() {
	float ratio = (float) windowWidth / (float) windowHeight;	     
       GLES11.glMatrixMode(GLES11.GL_PROJECTION);
       GlUtils.setViewport(visibleArea);
       GLES11.glLoadIdentity();
       GlUtils.gluPerspective(game, 45.0f, ratio, 10.0f, 1000.0f);
       GLES11.glMatrixMode(GLES11.GL_MODELVIEW);
       GLES11.glLoadIdentity();        
       GLES11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
       GLES11.glClear(GLES11.GL_COLOR_BUFFER_BIT | GLES11.GL_DEPTH_BUFFER_BIT);
       GLES11.glHint(GLES11.GL_PERSPECTIVE_CORRECTION_HINT, GLES11.GL_NICEST);		        
       GLES11.glEnable(GLES11.GL_DEPTH_TEST);
       GLES11.glDepthFunc(GLES11.GL_LEQUAL);
	GLES11.glEnable(GLES11.GL_BLEND);
	GLES11.glBlendFunc(GLES11.GL_ONE, GLES11.GL_ONE);
}
 
开发者ID:CmdrStardust,项目名称:Alite,代码行数:17,代码来源:AboutScreen.java

示例2: render

import android.opengl.GLES11; //导入方法依赖的package包/类
void render() {		
       GLES11.glEnable(GLES11.GL_FOG);
	GLES11.glDisable(GLES11.GL_CULL_FACE);
       GLES11.glDisable(GLES11.GL_LIGHTING);
	GLES11.glDisableClientState(GLES11.GL_NORMAL_ARRAY);
	GLES11.glEnableClientState(GLES11.GL_VERTEX_ARRAY);
	GLES11.glDisableClientState(GLES11.GL_TEXTURE_COORD_ARRAY);
	GLES11.glDisableClientState(GLES11.GL_COLOR_ARRAY);
	GLES11.glEnableClientState(GLES11.GL_POINT_SIZE_ARRAY_OES);		
	GLES11.glVertexPointer(3, GLES11.GL_FLOAT, 0, dustParticles);
	GLES11.glPointSizePointerOES(GLES11.GL_FLOAT, 0, particleSizes);
	GLES11.glColor4f(0.7f, 0.7f, 1.0f, 0.8f);
	alite.getTextureManager().setTexture("textures/glow_mask.png");
       GLES11.glEnable(GLES11.GL_POINT_SPRITE_OES);
       GLES11.glTexEnvf(GLES11.GL_POINT_SPRITE_OES, GLES11.GL_COORD_REPLACE_OES, GLES11.GL_TRUE);
       GLES11.glEnable(GLES11.GL_BLEND);
       GLES11.glBlendFunc(GLES11.GL_ONE, GLES11.GL_ONE);
       GLES11.glHint(GLES11.GL_POINT_SMOOTH_HINT, GLES11.GL_NICEST);
	GLES11.glDisable(GLES11.GL_DEPTH_TEST);
	GLES11.glDrawArrays(GLES11.GL_POINTS, 0, particleCount);
	GLES11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
	GLES11.glPointSize(1.0f);
	GLES11.glDisableClientState(GLES11.GL_POINT_SIZE_ARRAY_OES);
	GLES11.glDisableClientState(GLES11.GL_COLOR_ARRAY);
	GLES11.glEnableClientState(GLES11.GL_NORMAL_ARRAY);
	GLES11.glEnableClientState(GLES11.GL_TEXTURE_COORD_ARRAY);
	GLES11.glEnable(GLES11.GL_LIGHTING);
	GLES11.glEnable(GLES11.GL_CULL_FACE);
	GLES11.glDisable(GLES11.GL_BLEND);
	GLES11.glDisable(GLES11.GL_FOG);
}
 
开发者ID:CmdrStardust,项目名称:Alite,代码行数:32,代码来源:StarDust.java

示例3: initGl

import android.opengl.GLES11; //导入方法依赖的package包/类
private void initGl() {
	Rect visibleArea = ((AndroidGraphics) game.getGraphics()).getVisibleArea();
	int windowWidth = visibleArea.width();
	int windowHeight = visibleArea.height();

	float ratio = (float) windowWidth / (float) windowHeight;
	GlUtils.setViewport(visibleArea);
	GLES11.glDisable(GLES11.GL_FOG);
	GLES11.glPointSize(1.0f);
       GLES11.glLineWidth(1.0f);

       GLES11.glBlendFunc(GLES11.GL_ONE, GLES11.GL_ONE_MINUS_SRC_ALPHA);
       GLES11.glDisable(GLES11.GL_BLEND);
       
	GLES11.glMatrixMode(GLES11.GL_PROJECTION);
	GLES11.glLoadIdentity();
	GlUtils.gluPerspective(game, 45.0f, ratio, 1.0f, 900000.0f);
	GLES11.glMatrixMode(GLES11.GL_MODELVIEW);
	GLES11.glLoadIdentity();

	GLES11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
	GLES11.glShadeModel(GLES11.GL_SMOOTH);
	
	GLES11.glLightfv(GLES11.GL_LIGHT1, GLES11.GL_AMBIENT, lightAmbient, 0);
	GLES11.glLightfv(GLES11.GL_LIGHT1, GLES11.GL_DIFFUSE, lightDiffuse, 0);
	GLES11.glLightfv(GLES11.GL_LIGHT1, GLES11.GL_SPECULAR, lightSpecular, 0);
	GLES11.glLightfv(GLES11.GL_LIGHT1, GLES11.GL_POSITION, lightPosition, 0);
	GLES11.glEnable(GLES11.GL_LIGHT1);

	GLES11.glLightfv(GLES11.GL_LIGHT2, GLES11.GL_AMBIENT, sunLightAmbient, 0);
	GLES11.glLightfv(GLES11.GL_LIGHT2, GLES11.GL_DIFFUSE, sunLightDiffuse, 0);
	GLES11.glLightfv(GLES11.GL_LIGHT2, GLES11.GL_SPECULAR, sunLightSpecular, 0);
	GLES11.glLightfv(GLES11.GL_LIGHT2, GLES11.GL_POSITION, sunLightPosition, 0);
	GLES11.glEnable(GLES11.GL_LIGHT2);

	GLES11.glEnable(GLES11.GL_LIGHTING);
	
	GLES11.glClear(GLES11.GL_COLOR_BUFFER_BIT);
	GLES11.glHint(GLES11.GL_PERSPECTIVE_CORRECTION_HINT, GLES11.GL_NICEST);
	GLES11.glHint(GLES11.GL_POLYGON_SMOOTH_HINT, GLES11.GL_NICEST);
	GLES11.glEnable(GLES11.GL_CULL_FACE);	
}
 
开发者ID:CmdrStardust,项目名称:Alite,代码行数:43,代码来源:ShipEditorScreen.java

示例4: initGl

import android.opengl.GLES11; //导入方法依赖的package包/类
private void initGl() {
	Rect visibleArea = ((AndroidGraphics) game.getGraphics()).getVisibleArea();
	int windowWidth = visibleArea.width();
	int windowHeight = visibleArea.height();

	float ratio = (float) windowWidth / (float) windowHeight;
	GlUtils.setViewport(visibleArea);
	GLES11.glDisable(GLES11.GL_FOG);
	GLES11.glPointSize(1.0f);
   GLES11.glLineWidth(1.0f);

   GLES11.glBlendFunc(GLES11.GL_ONE, GLES11.GL_ONE_MINUS_SRC_ALPHA);
   GLES11.glDisable(GLES11.GL_BLEND);

	GLES11.glMatrixMode(GLES11.GL_PROJECTION);
	GLES11.glLoadIdentity();
	GlUtils.gluPerspective(game, 45.0f, ratio, 1.0f, 900000.0f);
	GLES11.glMatrixMode(GLES11.GL_MODELVIEW);
	GLES11.glLoadIdentity();

	GLES11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
	GLES11.glShadeModel(GLES11.GL_SMOOTH);

	GLES11.glLightfv(GLES11.GL_LIGHT1, GLES11.GL_AMBIENT, lightAmbient, 0);
	GLES11.glLightfv(GLES11.GL_LIGHT1, GLES11.GL_DIFFUSE, lightDiffuse, 0);
	GLES11.glLightfv(GLES11.GL_LIGHT1, GLES11.GL_SPECULAR, lightSpecular, 0);
	GLES11.glLightfv(GLES11.GL_LIGHT1, GLES11.GL_POSITION, lightPosition, 0);
	GLES11.glEnable(GLES11.GL_LIGHT1);

	GLES11.glLightfv(GLES11.GL_LIGHT2, GLES11.GL_AMBIENT, sunLightAmbient, 0);
	GLES11.glLightfv(GLES11.GL_LIGHT2, GLES11.GL_DIFFUSE, sunLightDiffuse, 0);
	GLES11.glLightfv(GLES11.GL_LIGHT2, GLES11.GL_SPECULAR, sunLightSpecular, 0);
	GLES11.glLightfv(GLES11.GL_LIGHT2, GLES11.GL_POSITION, sunLightPosition, 0);
	GLES11.glEnable(GLES11.GL_LIGHT2);

	GLES11.glEnable(GLES11.GL_LIGHTING);

	GLES11.glClear(GLES11.GL_COLOR_BUFFER_BIT);
	GLES11.glHint(GLES11.GL_PERSPECTIVE_CORRECTION_HINT, GLES11.GL_NICEST);
	GLES11.glHint(GLES11.GL_POLYGON_SMOOTH_HINT, GLES11.GL_NICEST);
	GLES11.glEnable(GLES11.GL_CULL_FACE);
}
 
开发者ID:CmdrStardust,项目名称:Alite,代码行数:43,代码来源:ShipIntroScreen.java

示例5: initGl

import android.opengl.GLES11; //导入方法依赖的package包/类
private void initGl() {		
		Rect visibleArea = ((AndroidGraphics) game.getGraphics()).getVisibleArea();
		int windowWidth = visibleArea.width();
		int windowHeight = visibleArea.height();

		float ratio = (float) windowWidth / (float) windowHeight;
		GlUtils.setViewport(visibleArea);
		GLES11.glDisable(GLES11.GL_FOG);
		GLES11.glPointSize(1.0f);
        GLES11.glLineWidth(1.0f);

        GLES11.glBlendFunc(GLES11.GL_ONE, GLES11.GL_ONE_MINUS_SRC_ALPHA);
        GLES11.glDisable(GLES11.GL_BLEND);
        
		GLES11.glMatrixMode(GLES11.GL_PROJECTION);
		GLES11.glLoadIdentity();
		GlUtils.gluPerspective(game, 45.0f, ratio, 1.0f, 900000.0f);
		GLES11.glMatrixMode(GLES11.GL_MODELVIEW);
		GLES11.glLoadIdentity();

		GLES11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
		GLES11.glShadeModel(GLES11.GL_SMOOTH);
		
		GLES11.glLightfv(GLES11.GL_LIGHT1, GLES11.GL_AMBIENT, lightAmbient, 0);
		GLES11.glLightfv(GLES11.GL_LIGHT1, GLES11.GL_DIFFUSE, lightDiffuse, 0);
		GLES11.glLightfv(GLES11.GL_LIGHT1, GLES11.GL_SPECULAR, lightSpecular, 0);
		GLES11.glLightfv(GLES11.GL_LIGHT1, GLES11.GL_POSITION, lightPosition, 0);
		GLES11.glEnable(GLES11.GL_LIGHT1);

		GLES11.glLightfv(GLES11.GL_LIGHT2, GLES11.GL_AMBIENT, sunLightAmbient, 0);
		GLES11.glLightfv(GLES11.GL_LIGHT2, GLES11.GL_DIFFUSE, sunLightDiffuse, 0);
		GLES11.glLightfv(GLES11.GL_LIGHT2, GLES11.GL_SPECULAR, sunLightSpecular, 0);
		GLES11.glLightfv(GLES11.GL_LIGHT2, GLES11.GL_POSITION, sunLightPosition, 0);
		GLES11.glEnable(GLES11.GL_LIGHT2);

		GLES11.glEnable(GLES11.GL_LIGHTING);
		

		GLES11.glClear(GLES11.GL_COLOR_BUFFER_BIT);
		GLES11.glHint(GLES11.GL_PERSPECTIVE_CORRECTION_HINT, GLES11.GL_NICEST);
		GLES11.glHint(GLES11.GL_POLYGON_SMOOTH_HINT, GLES11.GL_NICEST);
//		GLES11.glEnable(GLES11.GL_TEXTURE_2D);
		GLES11.glEnable(GLES11.GL_CULL_FACE);	
		
	}
 
开发者ID:CmdrStardust,项目名称:Alite,代码行数:46,代码来源:PlanetScreen.java

示例6: initializeGl

import android.opengl.GLES11; //导入方法依赖的package包/类
public void initializeGl(final Rect visibleArea) {		
	float ratio = (float) windowWidth / (float) windowHeight;
	GlUtils.setViewport(visibleArea);
	GLES11.glDisable(GLES11.GL_FOG);
	GLES11.glPointSize(1.0f);
       GLES11.glLineWidth(1.0f);

       GLES11.glTexEnvf(GLES11.GL_TEXTURE_ENV, GLES11.GL_TEXTURE_ENV_MODE, GLES11.GL_MODULATE);
       
    GLES11.glBlendFunc(GLES11.GL_SRC_ALPHA, GLES11.GL_ONE_MINUS_SRC_ALPHA);
       GLES11.glDisable(GLES11.GL_BLEND);
       
	GLES11.glMatrixMode(GLES11.GL_PROJECTION);
	GLES11.glLoadIdentity();
	GlUtils.gluPerspective(game, 45.0f, ratio, 1.0f, 900000.0f);
	GLES11.glMatrixMode(GLES11.GL_MODELVIEW);
	GLES11.glLoadIdentity();

	GLES11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
	GLES11.glShadeModel(GLES11.GL_SMOOTH);
	
	GLES11.glLightfv(GLES11.GL_LIGHT1, GLES11.GL_AMBIENT, lightAmbient, 0);
	GLES11.glLightfv(GLES11.GL_LIGHT1, GLES11.GL_DIFFUSE, lightDiffuse, 0);
	GLES11.glLightfv(GLES11.GL_LIGHT1, GLES11.GL_SPECULAR, lightSpecular, 0);
	GLES11.glLightfv(GLES11.GL_LIGHT1, GLES11.GL_POSITION, lightPosition, 0);
	GLES11.glEnable(GLES11.GL_LIGHT1);

	GLES11.glLightfv(GLES11.GL_LIGHT2, GLES11.GL_AMBIENT, sunLightAmbient, 0);
	GLES11.glLightfv(GLES11.GL_LIGHT2, GLES11.GL_DIFFUSE, sunLightDiffuse, 0);
	GLES11.glLightfv(GLES11.GL_LIGHT2, GLES11.GL_SPECULAR, sunLightSpecular, 0);
	GLES11.glLightfv(GLES11.GL_LIGHT2, GLES11.GL_POSITION, sunLightPosition, 0);
	GLES11.glEnable(GLES11.GL_LIGHT2);

	GLES11.glEnable(GLES11.GL_LIGHTING);
	
	GLES11.glClear(GLES11.GL_COLOR_BUFFER_BIT);
	GLES11.glHint(GLES11.GL_PERSPECTIVE_CORRECTION_HINT, GLES11.GL_NICEST);
	GLES11.glHint(GLES11.GL_POLYGON_SMOOTH_HINT, GLES11.GL_NICEST);
	GLES11.glEnable(GLES11.GL_TEXTURE_2D);
	GLES11.glEnable(GLES11.GL_CULL_FACE);			
}
 
开发者ID:CmdrStardust,项目名称:Alite,代码行数:42,代码来源:FlightScreen.java


注:本文中的android.opengl.GLES11.glHint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。