Commit Graph

77 Commits

Author SHA1 Message Date
Mathias Agopian
7272add7a5 we were not fetching the texture coords in the copybit case, so we were using garbage 2009-06-18 19:31:07 -07:00
Mathias Agopian
aa6e88b808 fix/add some comments 2009-06-17 21:58:18 -07:00
Mathias Agopian
6d2cad2c6c s/w OpenGL no detects and handles all any combinations of triangle fans corresponding to a rectangle
this allows fallback to faster copybit code in almost all cases.
2009-06-17 21:18:56 -07:00
Mathias Agopian
cf251b9e3b fix a scissor bug in the GLES-on-top-of copybit code 2009-06-16 18:08:29 -07:00
Mathias Agopian
b6822d7a3e Merge commit 'goog/master' into merge_master 2009-06-16 12:38:55 -07:00
Android (Google) Code Review
168f3c5201 am b4f7592b: Merge change 4299 into donut
Merge commit 'b4f7592b03c8424302c10e61474b0e2d0a71a630'

* commit 'b4f7592b03c8424302c10e61474b0e2d0a71a630':
  Allow pre-Donut apps to use indirect Buffers in GL11 Pointer methods.
  Fix IntentFilter constructor to properly process the action parameter.
2009-06-16 08:37:21 -07:00
Jack Palevich
c96812cb27 Allow pre-Donut apps to use indirect Buffers in GL11 Pointer methods.
Apps targeting Donut and newer will throw an exception.

We use a heuristic to determine whether an app is pre-Donut or not:
We take the address space's __progname, and use that as the application's
package name. For simple applications this is correct.
2009-06-15 21:03:24 -07:00
Mathias Agopian
0a3139a21e fix a bug where copybit only renders in the first buffer when used with s/w GL 2009-06-10 16:15:32 -07:00
Mathias Agopian
7e2a937c4f revive the copybit test. 2009-06-09 21:38:08 -07:00
Mathias Agopian
1a0c4cd5d8 Merge commit 'goog/master' into merge_master 2009-06-05 15:45:39 -07:00
Mathias Agopian
9648c1a2b9 make sure clear the draw and read EGLSurface when eglMakeCurrent() is called for unbinding from the thread 2009-06-03 19:00:53 -07:00
Mathias Agopian
f909cb6c69 remove some spurious debuging LOGD 2009-06-03 18:30:22 -07:00
Mathias Agopian
acdebe352d fix/clean these Android.mk following dbort and joeo's comments 2009-06-03 18:26:58 -07:00
Mathias Agopian
bee8b90e6e am cede1ed3: fix [1610840] Positional light doesn\'t work correctly on emulator
Merge commit 'cede1ed3e1721dc4a697a540388ef0f4b51c60eb'

* commit 'cede1ed3e1721dc4a697a540388ef0f4b51c60eb':
  fix [1610840] Positional light doesn't work correctly on emulator
2009-06-03 15:12:30 -07:00
Android (Google) Code Review
a35197e104 am 5de674e1: Merge change 3013 into donut
Merge commit '5de674e1cbd6e43b6d7954ccacf5cd709b30265d'

* commit '5de674e1cbd6e43b6d7954ccacf5cd709b30265d':
  Adding missing callback onJsConfirm to dismiss any confirmation dialogs
  fix a bug in GL lighting where the specular component could be ommited when vertex material was disabled.
2009-06-03 15:12:28 -07:00
Mathias Agopian
69ca17a124 fix [1610840] Positional light doesn't work correctly on emulator
This bug was introduced when lighting computations was changed from eye-space to object-space.
The light position need to be transformed back to object-space each time the modelview matrix changes which requires us to compute the inverse of the modelview matrix. This computation was done with the assumption that normals where transformed (which was the case when the computation was made in eye-space), however, normals only require the inverse of the upper 3x3 matrix while transforming positions requires the inverse of the whole matrix.
This caused the interesting behavior that lights were more-or-less transformed properly, but not translated at all, which caused improper lighting with directional lights in particular.

There was also another smaller bug affecting directional lights: when vertices are read, only the active component are read, the other ones are ignored, later, the transformation operations are set up to ignore the unset values, howver, in the case of lighting, we use the vertex in object space (that is, before it is transformed), and therefore were using uninitalized values; in particular w.
2009-06-03 15:09:52 -07:00
Android (Google) Code Review
2216b95610 Merge change 3013 into donut
* changes:
  fix a bug in GL lighting where the specular component could be ommited when vertex material was disabled.
2009-06-03 15:07:26 -07:00
Android (Google) Code Review
cddc40a4f3 am 5f784df5: Merge change 3011 into donut
Merge commit '5f784df5680e07f6cbc5d929560dfadc0e22db3b'

* commit '5f784df5680e07f6cbc5d929560dfadc0e22db3b':
  simplify this test
2009-06-02 22:56:05 -07:00
Mathias Agopian
50aba6d31d fix a bug in GL lighting where the specular component could be ommited when vertex material was disabled.
the specular enable flag wasn't computed in that case.
2009-06-02 22:51:09 -07:00
Mathias Agopian
17836acabf simplify this test 2009-06-02 18:35:48 -07:00
Android (Google) Code Review
cb1ae92655 am 7728be03: Merge change 2896 into donut
Merge commit '7728be035f5b3b814ef4455d1742d069dbcffb61'

* commit '7728be035f5b3b814ef4455d1742d069dbcffb61':
  added a test that exhibits some lighting issues in the software renderer. see external bug 1709
2009-06-02 00:36:42 -07:00
Mathias Agopian
4d661eb62c added a test that exhibits some lighting issues in the software renderer. see external bug 1709 2009-06-01 18:59:44 -07:00
Mathias Agopian
de58697644 implement a real loader for EGL drivers
we now look for a config file in /system/lib/egl/egl.cfg that describes the association of a display to a driver.
these drivers are named: /system/lib/egl/lib{[EGL|GLESv1_CM|GLESv2] | GLES}_$TAG.so
2009-05-28 20:31:40 -07:00
Mathias Agopian
b1a39d67be Added most of the support needed for GLES 2.x 2009-05-27 20:38:06 -07:00
Mathias Agopian
a3d66a834f minor modifications to the official GLES 2.x headers
- changed glTexImage2D() declaration so it matches that of GLES 1.x; otherwise we can't include both headers (!!!)
- added parameter names to the declaration of some extensions (this is needed by glapigen and glentrygen)
2009-05-27 20:32:20 -07:00
Mathias Agopian
48efd95015 add GLES 2.x headers 2009-05-27 20:31:18 -07:00
Mathias Agopian
310f8da0c3 merge master to master_gl 2009-05-22 02:16:08 -07:00
Android (Google) Code Review
e6b922ab30 am bb7b7b31: Merge change 2152 into donut
Merge commit 'bb7b7b316a6a15f4df6af3c62a293920c68c7b00'

* commit 'bb7b7b316a6a15f4df6af3c62a293920c68c7b00':
  make sure to fail to software when the h/w renderer cannot be initialized
2009-05-20 22:44:06 -07:00
Mathias Agopian
5c846bd6cf make sure to fail to software when the h/w renderer cannot be initialized 2009-05-20 17:58:36 -07:00
Mathias Agopian
c5b2c0bf80 move libbinder's header files under includes/binder 2009-05-20 12:55:03 -07:00
Mathias Agopian
208059f67e checkpoint: split libutils into libutils + libbinder 2009-05-20 12:55:02 -07:00
Mathias Agopian
614ecde4cb libGLESv1_CM.so doesn't need to depend on libutils or libui 2009-05-18 13:42:18 -07:00
Mathias Agopian
d8fb7b586f remove libEGL and libGLESv1_CM dependencies on libutils and libui 2009-05-17 18:50:16 -07:00
Jack Palevich
6eedc8d3b5 Fix bug 1856713 gl Pointer functions should use Buffer position
JSR239 and android.opengl gl Pointer functions (glColorPointer, etc.)
now respect the current setting of the Buffer position.

This fixes a regression introduced when we started requiring the
Buffers passed to the Pointer functions to be direct Buffers.
2009-05-15 18:13:34 -07:00
Mathias Agopian
d717598616 Merge commit 'goog/master' into merge_master
Conflicts:
	opengl/libagl/Android.mk
	opengl/libs/Android.mk
	opengl/libs/egl_impl.h
2009-05-14 22:44:23 -07:00
Mathias Agopian
eccc8cfb2f should help fix the Simulator build. 2009-05-13 00:19:22 -07:00
Mathias Agopian
d373c6348a remove the gl{Vertex|Color|TexCoord|Normal}PointerBounds() "extension" fro eglext.h 2009-05-08 17:18:55 -07:00
Mathias Agopian
94aa09680a should fix the build. 2009-05-08 16:05:23 -07:00
Mathias Agopian
48685c45bb only export the GL entry-points, hide everything else.
Conflicts:

	opengl/libagl/Android.mk
	opengl/libs/Android.mk
	opengl/libs/egl_impl.h
2009-05-08 15:23:38 -07:00
Mathias Agopian
5958661507 Merge commit 'goog/master' into merge_master 2009-05-08 13:13:12 -07:00
Jack Palevich
46d25a371d Require native-order direct buffers for glXXXPointer APIs.
This was always a documented restriction, but was not enforced by the runtime until now.

Until now, if you passed in some other kind of buffer, it would sometimes work, and
sometimes fail. The failures happened when the Java VM moved the buffer data while
OpenGL was still holding a pointer to it.

Now we throw an exception rather than leaving the system in a potentially bad state.
2009-05-07 18:28:29 -07:00
Mathias Agopian
e6bf8b32b6 fix EGL extension string names 2009-05-07 15:07:52 -07:00
Mathias Agopian
df3ca30bf6 created an new EGL extension called ANDROID_swap_rectangle
ANDROID_swap_rectangle allows to specify the rectangle affected by eglSwapBuffers(), anything outside of this rectangle is unchanged. in particular EGL_BUFFER_DESTROYED only applies to that rectangle. This extension as well as EGL_BUFFER_PRESERVED allow major optimizations on surfaceflinger, which can redraw only the dirty area during compositing.

However, ANDROID_swap_rectangle allows further optimizations in EGL by reducing the amount of copy-back needed. ANDROID_swap_rectangle is particularily important for software implementations.
2009-05-07 15:07:33 -07:00
Jack Palevich
593f203ba3 Fix automatically generated code for glGet
Remove include of an internal agl header file. We should not depend on any implementation details
of our software renderer, since they may not be correct if another renderer is used.
Fix glGet number-of-elements logic for GL_FOG_COLOR GL_LIGHT_MODEL_AMBIENT,
and GL_COMPRESSED_TEXTURE_FORMATS.
2009-05-07 10:52:18 -07:00
Mathias Agopian
58a79f4745 move android_native_buffer_t declaration into its own private/ui/android_native_priv.h header, since user code should never have access to it. 2009-05-05 18:21:32 -07:00
Mathias Agopian
7189c0054e move opengl/include/EGL/android_natives.h to include/ui/egl/android_natives.h and don't include it from egl.h
the android_native_ types are just forward declared in egl.h
2009-05-05 18:11:11 -07:00
Mathias Agopian
21c59d0070 get rid of android_native_buffer_t::getHandle() and replace it with an handle field
this abstraction was not necessary. things are easier now.
2009-05-05 00:59:23 -07:00
Mathias Agopian
e71212ba53 removed the "bits" attribute from android_native_buffer_t.
"bits" can never be trusted now that we need to call lock() on the handle to get the virtual address of the buffer.
2009-05-05 00:37:46 -07:00
Mathias Agopian
0926f50664 update surfaceflinger, libui and libagl to the new gralloc api
- Currently the lock/unlock path is naive and is done for each drawing operation (glDrawElements and glDrawArrays). this should be improved eventually.
- factor all the lock/unlock code in SurfaceBuffer.
- fixed "showupdate" so it works even when we don't have preserving eglSwapBuffers().
- improved the situation with the dirty-region and fixed a problem that caused GL apps to not update.
- make use of LightRefBase() where needed, instead of duplicating its implementation
- add LightRefBase::getStrongCount()
- renamed EGLNativeWindowSurface.cpp to FramebufferNativeWindow.cpp

- disabled copybits test, since it clashes with the new gralloc api

- Camera/Video will be fixed later when we rework the overlay apis
2009-05-04 14:17:04 -07:00
Mathias Agopian
7be3e5d2d8 Merge commit 'goog/master' into merge_master
Conflicts:
	libs/surfaceflinger/Layer.cpp
	libs/surfaceflinger/SurfaceFlinger.cpp
	opengl/libagl/egl.cpp
	opengl/libs/EGL/egl.cpp
	opengl/libs/GLES_CM/gl.cpp
	opengl/libs/GLES_CM/gl_api.in
	opengl/libs/gl_entries.in
	opengl/libs/tools/glapigen
2009-04-30 14:43:18 -07:00