Search found 146 matches

by kazade
Tue Aug 14, 2018 3:53 am
Forum: Programming Discussion
Topic: Compiler bug?
Replies: 1
Views: 357

Re: Compiler bug?

OK, embarrassing...

Turns out that my texture memory allocation code was always calculating *zero* as the size required, so all texture uploads were trashing data.

Presumably this is just a side-effect of that :/
by kazade
Tue Aug 14, 2018 1:59 am
Forum: Programming Discussion
Topic: Compiler bug?
Replies: 1
Views: 357

Compiler bug?

I just want to make sure I'm not being stupid: if(tx1 != NULL && tx1->data == NULL) { fprintf(stderr, "No data for texture! (%p) %d\n", tx1, tx1->index); } Is printing: No data for texture! (0x0) 0 How can it be not NULL, but print 0x0? This is while investigating weird corruption ...
by kazade
Mon Aug 13, 2018 3:20 am
Forum: Programming Discussion
Topic: GLdc - Call for testers!
Replies: 50
Views: 10285

Re: GLdc - Call for testers!

@KingCrazy Fixed! Thanks for letting me know!
by kazade
Mon Aug 13, 2018 1:25 am
Forum: Programming Discussion
Topic: GLdc - Call for testers!
Replies: 50
Views: 10285

Re: GLdc - Call for testers!

Ah this looks like a mistake on my part. Leave it with me.
by kazade
Thu Aug 09, 2018 3:48 am
Forum: Programming Discussion
Topic: GLdc - Call for testers!
Replies: 50
Views: 10285

Re: GLdc - Call for testers!

OK so mipmapping is now implemented: Loading VQ compressed data with mipmaps is supported by using specific constants when calling glCompressedTexImage2D (e.g. GL_COMPRESSED_ARGB_4444_VQ_MIPMAP_KOS) glGenerateMipmapEXT() is implemented to generate a full set of mipmaps from a base texture uploaded v...
by kazade
Wed Aug 08, 2018 5:38 am
Forum: Programming Discussion
Topic: GLdc - Call for testers!
Replies: 50
Views: 10285

Re: GLdc - Call for testers!

What's the layout for mipmap data that the PVR expects? Is it base level, followed by the smaller levels (e.g. 256x256, then 128x128, 64x64 etc.) or is it some other ordering?
by kazade
Wed Aug 08, 2018 3:52 am
Forum: Programming Discussion
Topic: GLdc - Call for testers!
Replies: 50
Views: 10285

Re: GLdc - Call for testers!

OK for now I've gone with comparing the calculated uncompressed size with the actual data size and making a guess based on the ratio: https://github.com/Kazade/GLdc/blob/master/GL/texture.c#L227 glCompressedTexImage2D now works great. It supports compressed, twiddled and mipmapped formats. Sample he...
by kazade
Tue Aug 07, 2018 3:09 pm
Forum: Programming Discussion
Topic: GLdc - Call for testers!
Replies: 50
Views: 10285

Re: GLdc - Call for testers!

OK so here's an interesting conundrum... I've been working on glCompressedTexImage2D and use a "DTEX" compressed image for testing. I have it working for non-mipmapped tex files, but if the texture has mipmap data I have two options: 1. Throw an error. The user should upload each level ind...
by kazade
Mon Aug 06, 2018 1:13 pm
Forum: Programming Discussion
Topic: GLdc - Call for testers!
Replies: 50
Views: 10285

Re: GLdc - Call for testers!

You got a sample texture file for me to test with? I'll see what I can do :)
by kazade
Mon Aug 06, 2018 1:27 am
Forum: Programming Discussion
Topic: NullDC Flicker when Compiling Parallax Examples
Replies: 3
Views: 552

Re: NullDC Flicker when Compiling Parallax Examples

FWIW I see the same flickering on NullDC running under WINE on Linux. I thought it might have been a bug in my OpenGL library but apparently not!
by kazade
Sat Aug 04, 2018 2:13 pm
Forum: Programming Discussion
Topic: GLdc - Call for testers!
Replies: 50
Views: 10285

Re: GLdc - Call for testers!

Excellent! I've made good progress on multitexture, just need to write a good test sample for it and then fix up any breakage. *Update* Just pushed a completely untested multitexture implementation. I'll test and improve tomorrow. https://github.com/Kazade/GLdc/commit/6942e597f4f2f8983d463b6358a069e...
by kazade
Fri Aug 03, 2018 4:17 pm
Forum: Programming Discussion
Topic: GLdc - Call for testers!
Replies: 50
Views: 10285

Re: GLdc - Call for testers!

Interesting, thanks!

I don't suppose you know how I can view the compiled ASM for a function? I could really do with being able to see what functions are being compiled down to.
by kazade
Fri Aug 03, 2018 6:20 am
Forum: Programming Discussion
Topic: GLdc - Call for testers!
Replies: 50
Views: 10285

Re: GLdc - Call for testers!

Cool, OK I'll make sure I prefix non static functions with _gl. I've got a bug to fix in lighting, and then I'll shove in multitexture support. I could really use someone who understands the SH4/PVR to look over my code and suggest performance improvements. At the moment: - I only send polygon heade...
by kazade
Thu Aug 02, 2018 2:18 pm
Forum: Programming Discussion
Topic: GLdc - Call for testers!
Replies: 50
Views: 10285

Re: GLdc - Call for testers!

I think it might be an idea to ship it in kos-ports alongside libGL (e.g. libGLdc + /usr/include/GLdc/gl.h). Simply because it will avoid ambiguity of which version someone is using, and also, GLdc won't be exactly compatible (it has different header constants and glKosSwapBuffers() instead of glut ...
by kazade
Tue Jul 31, 2018 2:36 pm
Forum: Programming Discussion
Topic: How to enable flat shading?
Replies: 1
Views: 334

Re: How to enable flat shading?

Ah, it seems to be lxdream :/
by kazade
Tue Jul 31, 2018 1:13 pm
Forum: Programming Discussion
Topic: How to enable flat shading?
Replies: 1
Views: 334

How to enable flat shading?

GLdc implements glShadeModel(GL_FLAT) in the same way that libGL did; by setting `cxt.gen.shading = PVR_SHADE_FLAT`, but it doesn't seem to work.

As far as I can tell the output is the same as PVR_SHADE_GOURAUD.

Any ideas?
by kazade
Sun Jul 29, 2018 10:48 am
Forum: Programming Discussion
Topic: GLdc - Call for testers!
Replies: 50
Views: 10285

Re: GLdc - Call for testers!

Well GLdc is ready for use aside from the caveats listed in the README and the issues here: https://github.com/Kazade/GLdc/issues I've basically done the hard-slog 80% but need help to get the final 20% done. The key missing feature you'll probably find is multitexturing isn't there yet, neither is ...
by kazade
Sat Jun 16, 2018 8:09 am
Forum: Programming Discussion
Topic: A bunch of sound questions...
Replies: 1
Views: 649

A bunch of sound questions...

I'm looking into implementing DC sound support in my game engine, and after digging around in the SDK docs I have a bunch of questions: 1. You can only create 4 streams (SND_STREAM_MAX), is that because you can only play 4 sounds simultaneously? 2. What's the advantage of using the sfx stuff over st...
by kazade
Sat Jun 09, 2018 10:35 am
Forum: Programming Discussion
Topic: Questions about Perspective Divide + Z-Clipping
Replies: 5
Views: 1103

Re: Questions about Perspective Divide + Z-Clipping

Yeah FWIW your complaints about libGL influenced my decision to write a new one. Mine focuses on memory usage and correctness over performance (for now). Hopefully I can solve these issues there. Maybe.
by kazade
Thu Jun 07, 2018 11:27 am
Forum: Programming Discussion
Topic: Questions about Perspective Divide + Z-Clipping
Replies: 5
Views: 1103

Re: Questions about Perspective Divide + Z-Clipping

Thanks! Glad to see you back 111 :)

I'll do some playing around, but if anyone else stumbles on this topic this is the best explanation of perspective division that I've found: http://www.learnopengles.com/tag/perspective-divide/