linux app fixes

This commit is contained in:
Vadim Lopatin 2014-04-01 19:30:33 +04:00
parent 0b7f59bd95
commit da09eeed1c
3 changed files with 20 additions and 3 deletions

View File

@ -175,6 +175,10 @@
</Compile>
<Compile Include="3rdparty\X11\X.d" />
<Compile Include="3rdparty\X11\Xlib.d" />
<Compile Include="src\dlangui\core\i18n.d" />
<Compile Include="src\dlangui\core\linestream.d" />
<Compile Include="src\dlangui\widgets\lists.d" />
<Compile Include="src\dlangui\widgets\tabs.d" />
</ItemGroup>
<ItemGroup>
<Folder Include="src\dlangui\platforms\x11\" />

View File

@ -105,7 +105,7 @@ extern (C) int UIAppMain(string[] args) {
ListWidget list = new ListWidget("tab2", Orientation.Vertical);
WidgetListAdapter listAdapter = new WidgetListAdapter();
for (int i = 0; i < 1000; i++)
for (int i = 0; i < 30; i++)
listAdapter.widgets.add((new TextWidget()).text("List item "d ~ to!dstring(i)));
list.ownAdapter = listAdapter;
list.layoutWidth(FILL_PARENT).layoutHeight(FILL_PARENT);

View File

@ -64,7 +64,8 @@ version(linux) {
uint mask;
uint values[3];
//_enableOpengl = false;
// disable opengl for testing
_enableOpengl = false;
/* create black graphics context */
if (true || !_enableOpengl) {
_g = xcb_generate_id(_xcbconnection);
@ -265,6 +266,16 @@ version(linux) {
_drawable = _glxwindow;
if (!_derelictgl3Reloaded) {
int count;
glGetIntegerv( GL_NUM_EXTENSIONS, &count );
Log.d("Number of extensions: ", count);
for( int i=0; i<count; ++i ) {
auto e = glGetStringi( GL_EXTENSIONS, i );
Log.d("Extension: ", fromStringz(e));
}
Log.e("Reloading DerelictGL3");
_derelictgl3Reloaded = true;
_context = glXCreateNewContext(_display, _fb_config, GLX_RGBA_TYPE, null, true);
@ -287,7 +298,9 @@ version(linux) {
// Get the default screen's GLX extension list
const char *glxExts = glXQueryExtensionsString( _display,
DefaultScreen( _display ) );
Log.d("Extensions: ", fromStringz(glxExts));
Log.d("GLX Extensions: ", fromStringz(glxExts));
const char * exts = glGetString( GL_EXTENSIONS );
Log.d("Extensions: ", fromStringz(exts));
Log.d("GLX_ARB_get_proc_address=", GLX_ARB_get_proc_address);