October 22, 2014 Re: GDC & Pandaboard/QEMU & Framebuffer | ||||
---|---|---|---|---|
| ||||
Posted in reply to John A | > Next step for me, is to create a small opengl test app: > - does it cross-compile (on Ubunutu)? > - does it run in QEMU? > - does it run on a Pandaboard? Here's the result: DerelictGL3 and DerelictUtil cross-compiles ok with no gdc-arm failures. On the other hand, a very simple app has linker errors: import derelict.opengl3.gl3; void main() { // DerelictGL3.load(); // DerelictGL3.reload(); printf("Start opengl: version %s\n", DerelictGL3.loadedVersion); } I'm using -nophoboslib so there are linker errors related to phobos. If I don't use -nophoboslib I still get errors: make testgl3 /home/arrizza/x-tools/arm-cortexa9_neon-linux-gnueabihf/bin/arm-cortexa9_neon-linux-gnueabihf-gdc -I./DerelictUtil/source -I./DerelictGL3/source -Llib testgl3.d -o opengl3 /tmp/ccSSbl9j.o: In function `_Dmain': testgl3.d:(.text+0x40): undefined reference to `_D8derelict7opengl33gl311DerelictGL3C8derelict7opengl33gl317DerelictGL3Loader' testgl3.d:(.text+0x44): undefined reference to `_D8derelict7opengl33gl311DerelictGL3C8derelict7opengl33gl317DerelictGL3Loader' testgl3.d:(.text+0x58): undefined reference to `_D8derelict7opengl33gl311DerelictGL3C8derelict7opengl33gl317DerelictGL3Loader' testgl3.d:(.text+0x5c): undefined reference to `_D8derelict7opengl33gl311DerelictGL3C8derelict7opengl33gl317DerelictGL3Loader' /tmp/ccSSbl9j.o:(.data+0xc): undefined reference to `_D8derelict7opengl33gl312__ModuleInfoZ' collect2: error: ld returned 1 exit status make: *** [testgl3] Error 1 I was stuck, so I started on a different front. I created a variant of the framebuffer test (in C for now) that sets every pixel in the framebuffer while I kept track of the time. The results are interesting. In QEMU: ./fbrate time 1140000 11ms 90 fps on the Pandaboard: ./fbrate time 40000 4ms 250 fps (that's with -03 btw). The idea is that I can now convert this to D and see what the frame rate is then. But before I did, I tried to see if mouse events could be captured in a D app. I found out the QEMU distro has mev in it and so that was an even simpler first step. If that works, I would then find the (open) source code for mev and convert that to D. Unfortunately, it didn't work. The mouse capture in my version of QEMU is not working like I expect and so I don't see any mouse events coming out of QEMU. Haven't tried mev on the Pandaboard yet. Any advice? |
October 22, 2014 Re: GDC & Pandaboard/QEMU & Framebuffer | ||||
---|---|---|---|---|
| ||||
Posted in reply to John A | Am Wed, 22 Oct 2014 06:26:56 +0000
schrieb "John A" <nospam@some.com>:
> > Next step for me, is to create a small opengl test app:
> > - does it cross-compile (on Ubunutu)?
> > - does it run in QEMU?
> > - does it run on a Pandaboard?
>
> Here's the result:
> DerelictGL3 and DerelictUtil cross-compiles ok with no gdc-arm
> failures.
>
> On the other hand, a very simple app has linker errors:
>
> import derelict.opengl3.gl3;
> void main()
> {
> // DerelictGL3.load();
> // DerelictGL3.reload();
> printf("Start opengl: version %s\n", DerelictGL3.loadedVersion);
> }
>
> I'm using -nophoboslib so there are linker errors related to phobos. If I don't use -nophoboslib I still get errors:
>
> make testgl3
> /home/arrizza/x-tools/arm-cortexa9_neon-linux-gnueabihf/bin/arm-cortexa9_neon-linux-gnueabihf-gdc
> -I./DerelictUtil/source -I./DerelictGL3/source -Llib testgl3.d
> -o opengl3
> /tmp/ccSSbl9j.o: In function `_Dmain':
> testgl3.d:(.text+0x40): undefined reference to
> `_D8derelict7opengl33gl311DerelictGL3C8derelict7opengl33gl317DerelictGL3Loader'
> testgl3.d:(.text+0x44): undefined reference to
> `_D8derelict7opengl33gl311DerelictGL3C8derelict7opengl33gl317DerelictGL3Loader'
> testgl3.d:(.text+0x58): undefined reference to
> `_D8derelict7opengl33gl311DerelictGL3C8derelict7opengl33gl317DerelictGL3Loader'
> testgl3.d:(.text+0x5c): undefined reference to
> `_D8derelict7opengl33gl311DerelictGL3C8derelict7opengl33gl317DerelictGL3Loader'
> /tmp/ccSSbl9j.o:(.data+0xc): undefined reference to
> `_D8derelict7opengl33gl312__ModuleInfoZ'
> collect2: error: ld returned 1 exit status
> make: *** [testgl3] Error 1
>
You also have to link against DerelictGL3 and maybe DerelictUtil: -lDerelictGL3 -lDerelictUtil
|
October 23, 2014 Re: GDC & Pandaboard/QEMU & Framebuffer | ||||
---|---|---|---|---|
| ||||
Posted in reply to Johannes Pfau | On Wednesday, 22 October 2014 at 07:49:24 UTC, Johannes Pfau wrote: > You also have to link against DerelictGL3 and maybe DerelictUtil: > -lDerelictGL3 -lDerelictUtil Sorry for the confusion. When I compile DerelictGL3 and DerelictUtil, I create archives libopengl3.a and libutil.a in a local 'lib' directory. And when I add to the compilation line: -L./lib -lopengl3 -lutil I get the same link errors: $ make testgl3 /home/arrizza/x-tools/arm-cortexa9_neon-linux-gnueabihf/bin/arm-cortexa9_neon-linux-gnueabihf-gdc -I./DerelictUtil/source -I./DerelictGL3/source -Llib -lopengl3 -lutil testgl3.d -o opengl3 /tmp/ccLpFyC8.o: In function `_Dmain': testgl3.d:(.text+0x40): undefined reference to `_D8derelict7opengl33gl311DerelictGL3C8derelict7opengl33gl317DerelictGL3Loader' testgl3.d:(.text+0x44): undefined reference to `_D8derelict7opengl33gl311DerelictGL3C8derelict7opengl33gl317DerelictGL3Loader' testgl3.d:(.text+0x58): undefined reference to `_D8derelict7opengl33gl311DerelictGL3C8derelict7opengl33gl317DerelictGL3Loader' testgl3.d:(.text+0x5c): undefined reference to `_D8derelict7opengl33gl311DerelictGL3C8derelict7opengl33gl317DerelictGL3Loader' /tmp/ccLpFyC8.o:(.data+0xc): undefined reference to `_D8derelict7opengl33gl312__ModuleInfoZ' collect2: error: ld returned 1 exit status make: *** [testgl3] Error 1 Now here's the strange part. If I dump the symbols in the libopengl3.a's, the name above exists: $ nm libopengl3.a | grep _D8derelict7opengl33gl311DerelictGL3C8derelict7opengl33gl317DerelictGL3Loader 00000000 B _D8derelict7opengl33gl311DerelictGL3C8derelict7opengl33gl317DerelictGL3Loader What am I missing? |
October 23, 2014 Re: GDC & Pandaboard/QEMU & Framebuffer | ||||
---|---|---|---|---|
| ||||
Posted in reply to John A | On Thursday, 23 October 2014 at 04:12:45 UTC, John A wrote:
> What am I missing?
To answer my own question, I put the source file in the wrong spot:
BAD:
$(ARM-GDC) $(INCDIR) -L$(LIBDIR) -lopengl3 -lutil -ldl testgl3.d -o testgl3
Good:
$(ARM-GDC) $(INCDIR) testgl3.d -L$(LIBDIR) -lopengl3 -lutil -ldl -o testgl3
Note: I had to add the -ldl because of unresolved dlopen, dlclose, etc. symbols.
Next up, running the ./testgl3 on QEMU causes a seg fault.
|
October 24, 2014 Re: GDC & Pandaboard/QEMU & Framebuffer | ||||
---|---|---|---|---|
| ||||
Posted in reply to John A | > Next up, running the ./testgl3 on QEMU causes a seg fault.
Ok, it's working:
import derelict.opengl3.gl3;
extern (C) void printf(const char*, ...);
void main()
{
printf("Start opengl: \n");
DerelictGL3.load();
printf("Start opengl: version %d\n", DerelictGL3.loadedVersion);
}
prints this in QEMU
Start opengl:
Start opengl: version 11
Next, create a triangle.
|
Copyright © 1999-2021 by the D Language Foundation