Commit Graph

90 Commits

Author SHA1 Message Date
Stefano Ceccherini
effcdf2e6a Implemented locking for BGLView direct mode. Tested with GLTeapot and
GLDirectTest. Seems to work fine


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20844 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-26 20:23:10 +00:00
Jérôme Duval
7cfdfca2e2 GLView :
window_bounds are now coordinates of the view on the screen (was the window before)
this eases dramatically the drawing of the clip from the buffer
now allocates m_clip_info whenever needed as some apps call EnableDirectMode() after DirectConnected(), ie GLTeapot.
MesaSoftwareRenderer:
implemented DirectConnected() support in Mesa Software Renderer
tested with GLTeapot on QEmu, B_RGB16 mode only


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20797 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-24 17:37:51 +00:00
Jérôme Duval
285d5ce2ea we need view bounds in the window coordinates, they can then be offset with the window bounds for clipping
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20785 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-23 22:05:14 +00:00
Stefano Ceccherini
22cf4a3be6 sizeof(B_PAGE_SIZE) != B_PAGE_SIZE. Fixed bug 1151. Sorry for the silly
typo. Also uses calloc() so that the direct_buffer_info struct is 
initialized to 0.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20663 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-12 13:15:06 +00:00
Stefano Ceccherini
5f2316263f Implemented BGLView::DirectConnected(). I don't know if it works, since
the gldirect_mode test app crashes at startup (also before this commit). 
Style changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20636 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-10 14:11:32 +00:00
Philippe Houdoin
abbdc51e90 Applied Troeglazov "3dEyes**" Gerasim's patches: adds keys up and mouse wheel events support.
Thanks.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20141 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-16 11:37:36 +00:00
Jérôme Duval
c34e204a4e updated mesa to 6.5.2
updated the mesa software addon to work again (maybe would need more work)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20137 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-15 23:40:43 +00:00
Philippe Houdoin
a3d2f8eea7 Be prepared a renderer refuse to serve us/our GL view ;-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19467 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-12 01:40:38 +00:00
Philippe Houdoin
fb2b8194c2 Moved GLRenderer instanciation at window attachment time, not GLView creation time.
Hardware GLRenderers will surely needs to check which screen device (so which window)
a GLView beg him to render to as fast as possible.
Unless such hardware is not serving this screen...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19464 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-12 00:59:23 +00:00
Jérôme Duval
a00a227627 Stop gcc4 complaining about "type qualifiers ignored on function return type" (from a next mesa release)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19438 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-06 21:34:04 +00:00
Philippe Houdoin
18741bc6ea * Fixed a crashing bug when no renderer add-on can be found.
std::map [] creates a new entry when none can be found!
* Disabled libmesa.a being build with DEBUG turn on, as it's broken ATM.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19357 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-22 00:09:06 +00:00
Philippe Houdoin
1da73a7b9b Enhanced the GL_RENDERER string returned.
Re-enabled SSE assembly code except for haiku target, until SSE stop crashing Haiku...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19353 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-21 21:52:02 +00:00
Jérôme Duval
74ef7b9cb8 forgot these files, gcc4 build fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18903 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-21 12:39:49 +00:00
Marcus Overhagen
891a127fec various gcc 4 related build fixes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18876 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-17 17:34:22 +00:00
Jérôme Duval
55815ae60b restored glapi.c as it seems needed by libGL.so, maybe it should be placed in another object file
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18823 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-12 13:42:29 +00:00
Jérôme Duval
98e3c1a41e removed glapi.c from libmesa.a as suggested by phoudoin
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18819 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-12 09:49:49 +00:00
Jérôme Duval
1b6515a714 deactivated SSE for now
cleanup


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18778 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-08 12:56:41 +00:00
Jérôme Duval
1d08e70ac5 added a call to _mesa_make_current
not yet working but a bit better : 
GLTeapot display is now white instead of black :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18776 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-07 21:13:53 +00:00
Jérôme Duval
9a2240212a passed options to the renderer
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18774 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-07 14:36:43 +00:00
Jérôme Duval
b785569a0d added a simple GLRendererRoster
imported missing pieces of mesa
GLView now gets a renderer correctly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18772 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-07 14:02:34 +00:00
Jérôme Duval
10bb21518c moved mesa addon to opengl addons
misc clean up


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18770 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-06 14:35:26 +00:00
Jérôme Duval
07a6f763c2 moved GLRenderer.h to public opengl headers
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18769 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-06 09:47:34 +00:00
Jérôme Duval
51f05ea6fc work in progress on Mesa renderer
TODO : reorganization for GLRenderer.h MesaRenderer.* and libmesa.a


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18765 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-05 16:00:15 +00:00
Jérôme Duval
c2c939699f remove CVS dir
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18747 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-05 11:03:53 +00:00
Philippe Houdoin
5522045320 As reported by Fredrik Ekdahli, the GL viewport should be set by default as soon as the view is attached to a window.
But the default size is the view one, not the view's window size, which doesn't make much sense.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17798 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-12 15:50:27 +00:00
Philippe Houdoin
e0da42a8fa Ooops, some GL calls were exported mangled, some not. While I dunno why this split, OpenGL is a C API!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17579 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-24 13:33:13 +00:00
Philippe Houdoin
6e23537d47 Removed main/dispatch.c from libmesa.a: the GL API dispatching is added in libGL.so by GLDispather.cpp (and eventually some assembly code like glapi_x86.S for x86 architecture).
On PPC, both dispatch.c and GLDispatcher.cpp were exporting gl* OpenGL API. Twice is not better, even when "none" was the previous state for PPC port ;-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17578 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-24 13:08:15 +00:00
Axel Dörfler
06bf290c26 Fixed indentation, still doesn't build correctly on PPC, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17564 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-23 12:41:35 +00:00
Philippe Houdoin
d6b1b60ed4 Try to be smarter regarding $(TARGET_ARCH) dependent symbols when building libGL.so.
Untested for non x86 architecture. Axel, could you check if it now build fine under PPC?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17532 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-22 15:48:12 +00:00
Axel Dörfler
b0bc48fbd3 Some more GCC 4 and PPC fixes.
* Mesa doesn't compile yet, as some PPC specific stuff seems to be
  missing, Philippe?
* Cortex and some other stuff has been marked x86-only, although
  it's more of a "GCC 2.95.3"-only.
* I'm not sure if it's a bug in GCC 4, or if that's what the C
  standard demands, but sizeof(some_type::some_field) is not
  valid anymore :-/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17515 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-19 15:52:21 +00:00
Axel Dörfler
01fdd314e5 Some GCC 4.1.0 related build fixes (under Linux/PPC).
Doesn't build yet, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17500 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-17 20:54:12 +00:00
Philippe Houdoin
c1a34c9be2 One more small step toward libGL.so renderer API.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17486 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-16 21:27:20 +00:00
Philippe Houdoin
41fc107e0a Ooops II, the comeback. The future RenderersManager is not there yet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17409 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-09 22:11:44 +00:00
Philippe Houdoin
3f70d609a9 First small step toward OpenGL renderers interface.
Our libGL.so GLView is still a stub, drawing "No OpenGL renderer available!"
instead ;-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17406 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-09 21:56:08 +00:00
Philippe Houdoin
b8c43bc75e Fixed building libGL.so for non haiku targets.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15100 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-24 05:21:04 +00:00
Philippe Houdoin
49af301b35 Fixed build for non haiku targets.
Added dummy support for glutKeyboardUpFunc(), glutSpecialFunc() and glutJoystickFunc().
To be implemented later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15099 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-24 05:11:01 +00:00
Ingo Weinhold
338b8dc301 Merged changes from branch build_system_redesign at revision 14573.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-29 16:27:43 +00:00
Philippe Houdoin
f73ec094df Small changes to GLDispacher class.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13835 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-27 09:37:05 +00:00
Philippe Houdoin
41a84d9ccb Fixed a typo and try to make clearer image.h include issue.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13389 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-01 14:42:07 +00:00
Philippe Houdoin
006a9e008b Add a first draft OpenGL kit.
The OpenGL software renderer add-on should follow soon.
Allow to link GLTeapot as native, but without renderer, nothing is displayed ;-)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13283 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-26 20:21:09 +00:00