本文整理汇总了Java中android.opengl.GLES11.glDisable方法的典型用法代码示例。如果您正苦于以下问题:Java GLES11.glDisable方法的具体用法?Java GLES11.glDisable怎么用?Java GLES11.glDisable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.opengl.GLES11
的用法示例。
在下文中一共展示了GLES11.glDisable方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: drawText
import android.opengl.GLES11; //导入方法依赖的package包/类
@Override
public void drawText(String text, int x, int y, long color, GLText font) {
if (font == null) {
return;
}
float alpha = (float) ((((long) color) & (long) 0xFF000000) >> 24) / 255.0f;
float red = ((color & 0x00FF0000) >> 16) / 255.0f;
float green = ((color & 0x0000FF00) >> 8) / 255.0f;
float blue = (color & 0x000000FF) / 255.0f;
GLES11.glEnable(GLES11.GL_BLEND);
GLES11.glBlendFunc(GLES11.GL_ONE, GLES11.GL_ONE);
font.begin(red, green, blue, alpha);
y -= (int) (font.getSize());
font.draw(text, transX(x), transY(y));
font.end();
GLES11.glDisable(GLES11.GL_BLEND);
textureManager.setTexture(null);
}
示例2: render
import android.opengl.GLES11; //导入方法依赖的package包/类
public void render() {
alite.getTextureManager().setTexture(null);
GLES11.glDisable(GLES11.GL_CULL_FACE);
GLES11.glDisableClientState(GLES11.GL_TEXTURE_COORD_ARRAY);
GLES11.glEnableClientState(GLES11.GL_VERTEX_ARRAY);
GLES11.glVertexPointer(3, GLES11.GL_FLOAT, 0, lineBuffer);
GLES11.glColor4f(r, g, b, a);
GLES11.glDisable(GLES11.GL_LIGHTING);
GLES11.glLineWidth(5);
GLES11.glDrawArrays(GLES11.GL_LINES, 0, 24);
GLES11.glLineWidth(1);
GLES11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
GLES11.glEnable(GLES11.GL_LIGHTING);
GLES11.glEnableClientState(GLES11.GL_TEXTURE_COORD_ARRAY);
GLES11.glEnable(GLES11.GL_CULL_FACE);
}
示例3: render
import android.opengl.GLES11; //导入方法依赖的package包/类
public void render() {
GLES11.glEnable(GLES11.GL_TEXTURE_2D);
if (!textureManager.checkTexture(fileName)) {
textureManager.addTexture(fileName, bitmap);
}
GLES11.glEnableClientState(GLES11.GL_VERTEX_ARRAY);
GLES11.glEnableClientState(GLES11.GL_TEXTURE_COORD_ARRAY);
GLES11.glVertexPointer(2, GLES11.GL_FLOAT, 0, vertexBuffer);
GLES11.glTexCoordPointer(2, GLES11.GL_FLOAT, 0, texCoordBuffer);
GLES11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
GLES11.glEnable(GLES11.GL_BLEND);
GLES11.glBlendFunc(GLES11.GL_SRC_ALPHA, GLES11.GL_ONE_MINUS_SRC_ALPHA);
textureManager.setTexture(fileName);
GLES11.glDrawArrays(GLES11.GL_TRIANGLE_STRIP, 0, 4);
GLES11.glDisable(GLES11.GL_BLEND);
GLES11.glDisable(GLES11.GL_TEXTURE_2D);
textureManager.setTexture(null);
GLES11.glDisableClientState(GLES11.GL_VERTEX_ARRAY);
GLES11.glDisableClientState(GLES11.GL_TEXTURE_COORD_ARRAY);
}
示例4: displayShip
import android.opengl.GLES11; //导入方法依赖的package包/类
public void displayShip() {
Rect visibleArea = ((AndroidGraphics) game.getGraphics()).getVisibleArea();
float aspectRatio = (float) visibleArea.width() / (float) visibleArea.height();
GLES11.glEnable(GLES11.GL_TEXTURE_2D);
GLES11.glEnable(GLES11.GL_CULL_FACE);
GLES11.glMatrixMode(GLES11.GL_PROJECTION);
GLES11.glLoadIdentity();
GlUtils.gluPerspective(game, 45.0f, aspectRatio, 1.0f, 900000.0f);
GLES11.glMatrixMode(GLES11.GL_MODELVIEW);
GLES11.glLoadIdentity();
GLES11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
GLES11.glEnableClientState(GLES11.GL_NORMAL_ARRAY);
GLES11.glEnableClientState(GLES11.GL_VERTEX_ARRAY);
GLES11.glEnableClientState(GLES11.GL_TEXTURE_COORD_ARRAY);
GLES11.glEnable(GLES11.GL_DEPTH_TEST);
GLES11.glDepthFunc(GLES11.GL_LESS);
GLES11.glClear(GLES11.GL_DEPTH_BUFFER_BIT);
GLES11.glPushMatrix();
GLES11.glMultMatrixf(currentShip.getMatrix(), 0);
currentShip.render();
GLES11.glPopMatrix();
GLES11.glDisable(GLES11.GL_DEPTH_TEST);
GLES11.glDisable(GLES11.GL_TEXTURE_2D);
setUpForDisplay(visibleArea);
}
示例5: renderText
import android.opengl.GLES11; //导入方法依赖的package包/类
protected void renderText() {
if (currentLine != null) {
currentY = currentLine.getY();
currentHeight = currentLine.getHeight();
if (currentHeight != 0 && textData != null && textData.length > 0) {
currentHeight = textData[textData.length - 1].y + 30 - currentY;
if (currentY + currentHeight > 1080) {
AliteLog.e("Overfull VBox", "Attention: Overfull VBox for " + currentLine.getText() + " => " + (currentY + currentHeight));
}
currentLine.setHeight(currentHeight);
}
currentX = currentLine.getX();
currentWidth = currentLine.getWidth();
}
if (currentLine == null || currentLine.getText().isEmpty()) {
return;
}
Graphics g = alite.getGraphics();
GLES11.glBlendFunc(GLES11.GL_ONE, GLES11.GL_ONE_MINUS_SRC_ALPHA);
GLES11.glEnable(GLES11.GL_BLEND);
if (currentX != -1 && currentY != -1) {
g.gradientRect(currentX, currentY, currentWidth, currentHeight, true, true, AliteColors.get().tutorialBubbleDark(), AliteColors.get().tutorialBubbleLight());
}
GLES11.glDisable(GLES11.GL_BLEND);
if (currentX != -1 && currentY != -1) {
g.rec3d(currentX, currentY, currentWidth, currentHeight, 4, AliteColors.get().tutorialBubbleLight(), AliteColors.get().tutorialBubbleDark());
}
if (currentLine != null && textData != null) {
displayText(g, textData);
}
}
示例6: setClip
import android.opengl.GLES11; //导入方法依赖的package包/类
@Override
public void setClip(int x1, int y1, int x2, int y2) {
if (x1 == -1 && y1 == -1 && x2 == -1 && y2 == -1) {
GLES11.glDisable(GLES11.GL_SCISSOR_TEST);
return;
}
x1 = x1 == -1 ? Math.max(visibleArea.left - 1, 0) : transX(x1);
y1 = y1 == -1 ? Math.max(visibleArea.top - 1, 0) : transY(y1);
x2 = x2 == -1 ? Math.min(visibleArea.right + 1, visibleArea.width()) : transX(x2);
y2 = y2 == -1 ? Math.min(visibleArea.bottom + 1, visibleArea.height()) : transY(y2);
GLES11.glEnable(GLES11.GL_SCISSOR_TEST);
GLES11.glScissor(x1, y1, x2 - x1 + 1, y2 - y1 + 1);
}
示例7: render
import android.opengl.GLES11; //导入方法依赖的package包/类
@Override
public void render() {
if (additionalParameters != null) {
additionalParameters.setUp();
}
GLES11.glDisable(GLES11.GL_DEPTH_TEST);
sphere.render();
GLES11.glEnable(GLES11.GL_DEPTH_TEST);
if (additionalParameters != null) {
additionalParameters.tearDown();
}
}
示例8: render
import android.opengl.GLES11; //导入方法依赖的package包/类
void render() {
boolean enabled = GLES11.glIsEnabled(GLES11.GL_CULL_FACE);
if (enabled) {
GLES11.glDisable(GLES11.GL_CULL_FACE);
}
alite.getTextureManager().setTexture(textureFilename);
GLES11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
GLES11.glVertexPointer(3, GLES11.GL_FLOAT, 0, vertexBuffer);
GLES11.glNormalPointer(GLES11.GL_FLOAT, 0, normalBuffer);
GLES11.glTexCoordPointer(2, GLES11.GL_FLOAT, 0, texCoordBuffer);
GLES11.glDrawArrays(GLES11.GL_TRIANGLES, 0, numberOfVertices);
if (enabled) {
GLES11.glEnable(GLES11.GL_CULL_FACE);
}
}
示例9: setUp
import android.opengl.GLES11; //导入方法依赖的package包/类
protected void setUp() {
GLES11.glDisable(GLES11.GL_LIGHTING);
GLES11.glEnableClientState(GLES11.GL_VERTEX_ARRAY);
GLES11.glEnableClientState(GLES11.GL_TEXTURE_COORD_ARRAY);
GLES11.glVertexPointer(2, GLES11.GL_FLOAT, 0, vertexBuffer);
GLES11.glTexCoordPointer(2, GLES11.GL_FLOAT, 0, texCoordBuffer);
alite.getTextureManager().setTexture(textureFilename);
GLES11.glDisable(GLES11.GL_CULL_FACE);
GLES11.glEnable(GLES11.GL_BLEND);
GLES11.glBlendFunc(GLES11.GL_ONE, GLES11.GL_ONE_MINUS_SRC_ALPHA);
}
示例10: initDisplay
import android.opengl.GLES11; //导入方法依赖的package包/类
private void initDisplay(final Rect visibleArea) {
float aspectRatio = (float) visibleArea.width() / (float) visibleArea.height();
GLES11.glEnable(GLES11.GL_TEXTURE_2D);
GLES11.glEnable(GLES11.GL_CULL_FACE);
GLES11.glMatrixMode(GLES11.GL_PROJECTION);
GLES11.glLoadIdentity();
GlUtils.gluPerspective(game, 45.0f, aspectRatio, 1.0f, 900000.0f);
GLES11.glMatrixMode(GLES11.GL_MODELVIEW);
GLES11.glLoadIdentity();
GLES11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
GLES11.glEnableClientState(GLES11.GL_NORMAL_ARRAY);
GLES11.glEnableClientState(GLES11.GL_VERTEX_ARRAY);
GLES11.glEnableClientState(GLES11.GL_TEXTURE_COORD_ARRAY);
GLES11.glPushMatrix();
GLES11.glMultMatrixf(skysphere.getMatrix(), 0);
skysphere.render();
GLES11.glPopMatrix();
GLES11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
GLES11.glEnableClientState(GLES11.GL_NORMAL_ARRAY);
GLES11.glEnableClientState(GLES11.GL_VERTEX_ARRAY);
GLES11.glEnableClientState(GLES11.GL_TEXTURE_COORD_ARRAY);
GLES11.glEnable(GLES11.GL_DEPTH_TEST);
GLES11.glDepthFunc(GLES11.GL_LESS);
GLES11.glClear(GLES11.GL_DEPTH_BUFFER_BIT);
GLES11.glDisable(GLES11.GL_BLEND);
}
示例11: renderTargetBox
import android.opengl.GLES11; //导入方法依赖的package包/类
public void renderTargetBox(float distSq) {
if (!Settings.targetBox || targetBox == null || distSq <= SpaceObjectAI.SHOOT_DISTANCE_SQ) {
return;
}
float alpha = (distSq - SpaceObjectAI.SHOOT_DISTANCE_SQ) / (LaserManager.MAX_ENEMY_DISTANCE_SQ - SpaceObjectAI.SHOOT_DISTANCE_SQ);
targetBox.setAlpha(alpha);
GLES11.glEnable(GLES11.GL_BLEND);
GLES11.glBlendFunc(GLES11.GL_SRC_ALPHA, GLES11.GL_ONE);
targetBox.render();
GLES11.glDisable(GLES11.GL_BLEND);
}
示例12: render
import android.opengl.GLES11; //导入方法依赖的package包/类
public void render() {
GLES11.glDepthFunc(GLES11.GL_LESS);
GLES11.glDepthMask(false);
GLES11.glEnable(GLES11.GL_BLEND);
GLES11.glDisable(GLES11.GL_CULL_FACE);
GLES11.glDisableClientState(GLES11.GL_TEXTURE_COORD_ARRAY);
GLES11.glEnableClientState(GLES11.GL_COLOR_ARRAY);
GLES11.glDisable(GLES11.GL_LIGHTING);
GLES11.glBlendFunc(GLES11.GL_SRC_ALPHA, GLES11.GL_ONE);
MathHelper.copyMatrix(getMatrix(), saveMatrix);
for (int i = 0; i < 2; i++) {
GLES11.glPushMatrix();
GLES11.glMultMatrixf(getMatrix(), 0);
GLES11.glVertexPointer(3, GLES11.GL_FLOAT, 0, diskBuffer);
GLES11.glColorPointer(4, GLES11.GL_FLOAT, 0, colorBuffer1);
GLES11.glDrawArrays(GLES11.GL_TRIANGLE_FAN, 0, 10);
GLES11.glVertexPointer(3, GLES11.GL_FLOAT, 0, cylinderBuffer);
GLES11.glColorPointer(4, GLES11.GL_FLOAT, 0, colorBuffer2);
GLES11.glDrawArrays(GLES11.GL_TRIANGLE_STRIP, 0, 18);
GLES11.glPopMatrix();
scale(0.4f, 0.4f, 1.2f);
}
MathHelper.copyMatrix(saveMatrix, currentMatrix);
extractVectors();
GLES11.glEnable(GLES11.GL_CULL_FACE);
GLES11.glEnable(GLES11.GL_LIGHTING);
GLES11.glEnableClientState(GLES11.GL_TEXTURE_COORD_ARRAY);
GLES11.glDisableClientState(GLES11.GL_COLOR_ARRAY);
GLES11.glDepthFunc(GLES11.GL_LESS);
GLES11.glDepthMask(true);
GLES11.glDisable(GLES11.GL_BLEND);
}
示例13: performPresent
import android.opengl.GLES11; //导入方法依赖的package包/类
@Override
public void performPresent(float deltaTime) {
if (isDisposed) {
return;
}
GLES11.glDisable(GLES11.GL_CULL_FACE);
GLES11.glClear(GLES11.GL_COLOR_BUFFER_BIT | GLES11.GL_DEPTH_BUFFER_BIT);
counter += 0.72f;
if (counter > 360) {
counter = 0;
}
switch (increase) {
case 0: red += 0.002f; if (red > 1.0f) red = 1.0f; break;
case 1: green += 0.002f; if (green > 1.0f) green = 1.0f; break;
case 2: blue += 0.002f; if (blue > 1.0f) blue = 1.0f; break;
}
GLES11.glLoadIdentity();
lookAt(-3.5f, 0, 0,
-3.5f, 1.0f, 0,
(float) Math.sin(Math.toRadians(counter)), 0.0f, (float) Math.cos(Math.toRadians(counter)));
GLES11.glRotatef(counter * 2, 0.0f, 0.0f, 1.0f);
GLES11.glVertexPointer(3, GLES11.GL_FLOAT, 0, vertexBuffer);
GLES11.glTexCoordPointer(2, GLES11.GL_FLOAT, 0, textureBuffer);
GLES11.glMatrixMode(GLES11.GL_TEXTURE);
GLES11.glTranslatef(0.0f, -0.015f, 0.0f);
GLES11.glMatrixMode(GLES11.GL_MODELVIEW);
GLES11.glColor4f(red, green, blue, 1.0f);
GLES11.glDrawArrays(GLES11.GL_TRIANGLE_STRIP, 0, totalIndices);
GLES11.glEnable(GLES11.GL_CULL_FACE);
GLES11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
}
示例14: 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);
}
示例15: end
import android.opengl.GLES11; //导入方法依赖的package包/类
public void end() {
batch.endBatch(); // End Batch
GLES11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); // Restore Default Color/Alpha
GLES11.glDisable(GLES11.GL_TEXTURE_2D);
}