Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Blessed

Member Since 10 Jun 2008
Offline Last Active Oct 10 2013 05:13 AM

Posts I've Made

In Topic: [ES 2.0] Texture rendering problem

23 September 2013 - 07:54 AM

For posterity, I found the problem. It was in the frustum setup. I have set the near plane to 0.001f and far to 10000.0f which caused some rounding errors probably. Changing the near plane to 10.0f eliminated the  problem.

 

Thanks!


In Topic: [ES 2.0] Texture rendering problem

23 September 2013 - 02:17 AM

Looks like z-fighting. The curling part of the page (on the cylinder, as you say) looks like it's actually partially intersecting the flat part of the page - make sure your depth buffer is properly setup.

 

Thanks for your reply!

 

If I understand it properly z-fighting takes place whenever the z values of the vertices are very close, but in my case the weird thing is that they are very well separated. Please explain me this if I'm wrong.

 

As per the depth test I call:

    glEnable(GL_DEPTH_TEST);
    glDepthFunc(GL_LEQUAL);

 

The EGL initialization is as follows:

EGLint numConfigs = 1;
	EGLint eglConfigList[] =
	{ EGL_RED_SIZE, 8, EGL_GREEN_SIZE, 8, EGL_BLUE_SIZE, 8, EGL_ALPHA_SIZE, 0, EGL_DEPTH_SIZE, 8, EGL_SURFACE_TYPE,
			EGL_WINDOW_BIT, EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_NONE } ;

	EGLint eglContextList[] =
	{ EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE } ;

	eglBindAPI(EGL_OPENGL_ES_API);
	m_Display = eglGetDisplay((EGLNativeDisplayType)EGL_DEFAULT_DISPLAY);
	if (m_Display == EGL_NO_DISPLAY)
		return -1;

	if (eglInitialize(m_Display, null, null) != EGL_TRUE)
		return -1;

	if (eglChooseConfig(m_Display, eglConfigList, &m_eglConfig, 1, &numConfigs) != EGL_TRUE)
		return -1;

	if ((m_eglSurface = eglCreateWindowSurface(m_Display, m_eglConfig, (EGLNativeWindowType)m_pForm, null)) == EGL_NO_SURFACE)
		return -1;

	if ((m_eglContext = eglCreateContext(m_Display, m_eglConfig, EGL_NO_CONTEXT, eglContextList)) == EGL_NO_CONTEXT)
		return -1;

	if (eglMakeCurrent(m_Display, m_eglSurface, m_eglSurface, m_eglContext) != EGL_TRUE)
		return -1;

	return 0;

Shouldn't this be enough?


In Topic: [SOLVED]Another Ball to Ball collision written in Java

10 June 2008 - 10:12 PM

Hey!

Thanks for your really good help and answer. Now the balls dont overlapp each other and this problem is gone. But the method you gave me for collision response acts like it didn't conserve momentum. And that's not what I'm trying to achieve. After some time the balls just slow down, and it looks like kinetic energy would get lost somewhere. Is it because of the coefficient of restitution? If i set it to zero then the balls don't respond to the collision. But the bigger it is the faster the balls are loosing on speed. Oh and in addition i was rather trying to make the answer being mass dependent. Once again thank you, coz you were a great help for me! If you would just give me an answer to the second question then i would be grateful.

This is my method which i was using before you answered me http://rafb.net/p/Em6Czb97.html

EDIT: I have worked it out! Now my problem is solved. Than you for your precious help.

[Edited by - Blessed on June 11, 2008 11:12:11 AM]

PARTNERS